View Monitor for DataKit¶
DataKit provides relatively complete output of basic observable information. By looking at the monitor output of DataKit, we can clearly know the current operation of DataKit.
View Monitor¶
Execute the following command to get the running status of the native DataKit.
Tip
You can see more monitor options through the datakit help monitor
.
The DataKit Basic Monitor page information is shown in the following figure:
The elements in this diagram can be manipulated by mouse or keyboard. Blocks selected by the mouse are highlighted in bilateral boxes (as shown in the Basic Info
block in the upper left corner of the above figure), and can also be browsed through the mouse wheel or the up and down arrow keys of the keyboard (or J/K of vim).
The information of each UI block in the above figure is:
-
Basic Info
is used to show the basic information of DataKit, such as version number, host name, runtime and so on. From here, we can have a basic understanding of the current situation of DataKit. Now select a few fields to explain separately:Version
: Current version number of DataKitUptime
: Startup time of DataKitBranch
: The current code branch of DataKit, which is generally masterBuild
:DataKit release dateResource Limit
: Show the resource limit configuration of the current DataKit, where mem refers to the maximum memory limit and cpu refers to the usage limit (If cgroup not set, the value is-
)Hostname
: Current hostnameOS/Arch
: Current software and hardware platforms of DataKitElected
: Election info(See Election)From
: The DataKit address of the current Monitor, such ashttp://localhost:9529/metrics
-
Runtime Info
Runtime Info is used to show the basic running consumption of Datakit (mainly related to memory and Goroutine):Goroutines
: The number of Goroutines currently runningMem
: The actual number of bytes of memory currently consumed by the DataKit process (excluding externally running collectors)System
: Virtual memory currently consumed by the DataKit process (excluding externally running collectors)GC Paused
: Time elapsed and count of Golang GC (garbage collection) since DataKit started
Info
For Runtime Info here, see Golang doc
-
Enabled Inputs
displays a list of open collectors:Input
: Refer to the collector(input) name, which is fixed and cannot be modifiedCount
: Refer to the number of the collector turned onCrashed
: Refer to the number of crashes of the collector
-
Inputs Info
: It is used to show the running status of each collector. There is more information here:Input
: Refer to the collector name. In some cases, this name is collector-specific (such as Log Collector/Prom Collector)Cat
: Refer to the type of data collected by the collector (M (metrics)/L (logs)/O (objects...)Feeds
: Total updates(collects) since Datakit startedTotalPts
: Total points collected of the collectorLast Feed
: Time of last update(collect), relative to current timeAvg Cost
: Average cost of each collectErrors
: Collect error count(if no error, empty here)
-
The prompt text at the bottom tells you how to exit the current Monitor program and displays the current Monitor refresh rate.
If the verbose option (-V
) is specified when Monitor is run, additional information is output, as shown in the following figure:
Goroutine Groups
shows the existing Goroutine Groups in the DataKit (the number of Goroutines in the group < = the number ofGoroutines
in the panel above).HTTP APIs
: HTTP API request infoFilter
: Pull of blacklist filtering rulesFilter Rules
: Filtering of each type of blacklistPipeline Info
: Pipeline running infoIO Info
: Data upload infoDataWay APIs
: Dataway API request info
FAQ¶
How to show only the operation of the specified module?¶
You can specify a list of module names (multiple modules are separated by English commas): Version-1.5.7
datakit monitor -M inputs,filter
# or
datakit monitor --module inputs,filter
# use thd module abbreviation
datakit monitor -M in,f
How to show only the operation of the specified collector?¶
You can specify a list of collector names (multiple collectors are separated by English commas):
How to display too long text?¶
When some collectors report errors, their error information will be very long and incomplete in the table.
Complete information can be displayed by setting the column width of the display:
How to change the Monitor refresh rate?¶
It can be changed by setting the refresh frequency:
Attention
Note that the units here must be the following: s (seconds)/m (minutes)/h (hours). If the time range is less than 1s, refresh according to 1s.
How to Monitor other DataKits?¶
Sometimes, the DataKit installed does not use the default 9529 port, and this time, an error like the following will occur:
We can view its monitor data by specifying the DataKit address: