System
The system collector collects system load, uptime, the number of CPU cores, and the number of users logged in.
Configuration¶
After successfully installing and starting DataKit, the system collector will be enabled by default without the need for manual activation.
Collector Configuration¶
Go to the conf.d/host
directory under the DataKit installation directory, copy system.conf.sample
and name it system.conf
. Examples are as follows:
[[inputs.system]]
##(optional) collect interval, default is 10 seconds
interval = '10s'
[inputs.system.tags]
# some_tag = "some_value"
# more_tag = "some_other_value"
After configuration, restart DataKit.
Can be turned on by ConfigMap Injection Collector Configuration or Config ENV_DATAKIT_INPUTS .
Can also be turned on by environment variables, (needs to be added as the default collector in ENV_DEFAULT_ENABLED_INPUTS):
-
ENV_INPUT_SYSTEM_INTERVAL
Collect interval
Type: Duration
input.conf:
interval
Default: 10s
-
ENV_INPUT_SYSTEM_TAGS
Customize tags. If there is a tag with the same name in the configuration file, it will be overwritten
Type: Map
input.conf:
tags
Example: tag1=value1,tag2=value2
Metric¶
For all of the following data collections, a global tag named host
is appended by default (the tag value is the host name of the DataKit), or other tags can be specified in the configuration through [inputs.system.tags]
:
system
¶
Basic information about system operation.
- Tags
Tag | Description |
---|---|
host | hostname |
- Metrics
Metric | Description |
---|---|
cpu_total_usage | The percentage of used CPU. Type: float Unit: percent,percent |
load1 | CPU load average over the past 1 minute. Type: float Unit: N/A |
load15 | CPU load average over the past 15 minutes. Type: float Unit: N/A |
load15_per_core | CPU single core load average over the past 15 minutes. Type: float Unit: N/A |
load1_per_core | CPU single core load average over the past 1 minute. Type: float Unit: N/A |
load5 | CPU load average over the past 5 minutes. Type: float Unit: N/A |
load5_per_core | CPU single core load average over the last 5 minutes. Type: float Unit: N/A |
memory_usage | The percentage of used memory. Type: float Unit: percent,percent |
n_cpus | CPU logical core count. Type: int Unit: count |
n_users | User number. Type: int Unit: count |
process_count | Number of Processes running on the machine. Type: int Unit: count |
uptime | System uptime. Type: int Unit: time,s |
conntrack
¶
Connection track metrics (Linux only).
- Tags
Tag | Description |
---|---|
host | hostname |
- Metrics
Metric | Description |
---|---|
entries | Current number of connections. Type: int Unit: count |
entries_limit | The size of the connection tracking table. Type: int Unit: count |
stat_drop | The number of packets dropped due to connection tracking failure. Type: int Unit: count |
stat_early_drop | The number of partially tracked packet entries dropped due to connection tracking table full. Type: int Unit: count |
stat_found | The number of successful search entries. Type: int Unit: count |
stat_ignore | The number of reports that have been tracked. Type: int Unit: count |
stat_insert | The number of packets inserted. Type: int Unit: count |
stat_insert_failed | The number of packages that failed to insert. Type: int Unit: count |
stat_invalid | The number of packets that cannot be tracked. Type: int Unit: count |
stat_search_restart | The number of connection tracking table query restarts due to hash table size modification. Type: int Unit: count |
filefd
¶
System file handle metrics (Linux only).
- Tags
Tag | Description |
---|---|
host | hostname |
- Metrics
Metric | Description |
---|---|
allocated | The number of allocated file handles. Type: int Unit: count |
maximum_mega | The maximum number of file handles, unit M(10^6). Type: float Unit: count |
FAQ¶
Why no cpu_total_usage
?¶
Some CPU acquisition features are not supported on some platforms, such as macOS.