Skip to content

host-process datasource

The host-process datasource collects information about running processes from the operating system and creates metric data points, entities, and events.

Processes with identical invocations are grouped into one entity and their metric data points are summed.

Metrics

Name Units Description
process.count processes The number of processes with identical invocations.
process.cpu_utilization percent The percentage of CPU time a process is using. If multiple processes have the same invocation, their data points are summed to compute this value.
process.memory_rss bytes The amount of main memory (resident set size) used by the process. If multiple processes have the same invocation, their data points are summed to compute this value.

Name styles

This datasource supports two mutually exclusive naming styles for the metrics that it collects:

  • canonical: The default style, which features namespace prefixes.
  • linuxMonitorZenPack: The legacy style, used in the Linux Monitor ZenPack.

To change the default style, set the metric-names-variant property in the datasource section to linuxMonitorZenPack.

Canonical style ZenPack style
process.count ps_count
process.cpu_utilization ps_cpu
process.memory_rss ps_mem

Entities

Property Description
name The process invocation including arguments

Example

{
  "name": "/opt/misc/bin/python /home/user1/script1.py  --config /opt/misc/etc/config.conf"
}

Events

This datasource creates events based on the value of status property.

Severity Event
stop CRITICAL
lock ERROR
zombie ERROR
idle WARNING
sleep INFO
wait INFO
running INFO

Example

{
  "name": "Host Process Status_Event",
  "component": "/opt/misc/bin/python /home/user1/script1.py  --config /opt/misc/etc/config.conf",
  "device": "ServerStation1",
  "eventClass": "/Status",
  "summary": "Host Process '/opt/misc/bin/python /home/user1/script1.py  --config /opt/misc/etc/config.conf' is in 'running' status.",
  "body": "Host Process '/opt/misc/bin/python /home/user1/script1.py  --config /opt/misc/etc/config.conf' is in 'running' status.",
  "severity": "SEVERITY_INFO",
  "status": "STATUS_CLOSED"
}

Configuration

If you specify the host-process datasource during installation, its configuration file is placed in the following location:

/etc/zendatamon-configs/configs/host-process.config.yaml

Otherwise, you must copy it from the templates directory:

cp /etc/zendatamon-configs/.templates/.configs/host-process.config.yaml \
  /etc/zendatamon-configs/configs/host-process.config.yaml

The Zenoss Cloud agent service monitors the /etc/zendatamon-configs/configs directory and loads any new or changed configuration files immediately.

Properties

The datasource section of the configuration file includes the following keys:

interval (number)
The number of seconds to wait between collection attempts. This value overrides the defaultInterval value in the Zenoss Cloud agent service configuration file.
timeout (number)
The number of seconds to wait before dropping a collection attempt.
metric-names-variant (string, default = canonical)
The metric name style, either canonical or linuxMonitorZenPack.
protocol (string, default = local)
Collection type; only local is supported, so this key can be omitted.
include-processes (array)

A list of regular expressions that specify processes to collect.

  • If populated, then only matching processes are collected and the exclude-processes list is ignored.
  • If empty or omitted, no processes are collected.
exclude-processes

A list of regular expressions that specify processes not to collect.

  • All matching processes are excluded from collection.
  • If empty or omitted, all processes are collected.

Example

apiVersion: v1
kind: datasource
name: host-process
spec:
  type: host-process
  datasource:
    interval: 60
    timeout: 30
    metric-names-variant: canonical
    protocol: ""
    include-processes: []
    exclude-processes:
      - \b(vim|tail|grep|tar|cat|bash)\b

ZenPack compatibility

For compatibility with the Linux Monitor ZenPack, use the action service to create metric triggers for data points of the following metrics:

  • process.count
  • process.cpu_utilization
  • process.memory_rss

Then, create event destinations for each process or process group by using a regular expression for entity titles.