Skip to content

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/samples 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]:

 [inputs.system.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"
  # ...

system

Host-wide CPU, load, memory, process, user, and uptime summary metrics.

Tags & Fields Description
cpu_total_usage Percentage of host CPU time currently in use.
Type: float | (gauge)
Unit: percent,percent
load1 One-minute system load average.
Type: float | (gauge)
Unit: N/A
load15 Fifteen-minute system load average.
Type: float | (gauge)
Unit: N/A
load15_per_core Fifteen-minute load average normalized by logical CPU count.
Type: float | (gauge)
Unit: N/A
load1_per_core One-minute load average normalized by logical CPU count.
Type: float | (gauge)
Unit: N/A
load5 Five-minute system load average.
Type: float | (gauge)
Unit: N/A
load5_per_core Five-minute load average normalized by logical CPU count.
Type: float | (gauge)
Unit: N/A
memory_usage Percentage of host memory currently in use.
Type: float | (gauge)
Unit: percent,percent
n_cpus CPU logical core count.
Type: int | (gauge)
Unit: count
n_users Number of logged-in users.
Type: int | (gauge)
Unit: count
process_count Number of processes currently running on the host.
Type: int | (gauge)
Unit: count
uptime Time since the host last booted.
Type: int | (gauge)
Unit: time,s

conntrack

Linux connection-tracking table usage and cumulative conntrack event counters.

Tags & Fields Description
host
(tag)
hostname
entries Current number of connections.
Type: int | (gauge)
Unit: count
entries_limit The size of the connection tracking table.
Type: int | (gauge)
Unit: count
stat_drop Cumulative number of packets dropped because connection tracking failed.
Type: int | (count)
Unit: count
stat_early_drop Cumulative number of tracked entries dropped because the conntrack table was full.
Type: int | (count)
Unit: count
stat_found Cumulative number of successful connection-tracking lookups.
Type: int | (count)
Unit: count
stat_ignore Cumulative number of packets ignored by connection tracking.
Type: int | (count)
Unit: count
stat_insert Cumulative number of new connection-tracking entries inserted.
Type: int | (count)
Unit: count
stat_insert_failed Cumulative number of connection-tracking entry insert failures.
Type: int | (count)
Unit: count
stat_invalid Cumulative number of packets that could not be tracked.
Type: int | (count)
Unit: count
stat_search_restart Cumulative number of conntrack lookup restarts caused by hash-table changes.
Type: int | (count)
Unit: count

filefd

Linux open file handle allocation and limit metrics.

Tags & Fields Description
host
(tag)
hostname
allocated The number of allocated file handles.
Type: int | (gauge)
Unit: count
maximum_mega Maximum open file handles, expressed in millions.
Type: float | (gauge)
Unit: count

FAQ

Why no cpu_total_usage?

Some CPU acquisition features are not supported on some platforms, such as macOS.

Feedback

Is this page helpful? ×