THIS PROJECT IS DEPRECATED IN FAVOR OF BETTER CONCEPT
cavaliercoder/zabbix-module-systemd
If you like or use this project, please provide feedback to author - Star it ★.
Look also on https://github.com/cavaliercoder/zabbix-module-systemd.
Monitoring of systemd units by using Zabbix. Available CPU, mem, blkio, ... metrics. Compiled Zabbix Docker shared module is required. See section Compilation. Root permissions are not required.
Module is available as a part of Docker image zabbix-agent-xxl-limited. Quick start:
docker run \
--name=zabbix-agent-xxl \
-h $(hostname) \
-p 10050:10050 \
-v /:/rootfs \
-v /var/run:/var/run \
-e "ZA_Server=<ZABBIX SERVER IP/DNS NAME>" \
-d monitoringartist/zabbix-agent-xxl-limited:latest
Don't use localhost
or 127.0.0.1
in ZA_Server
setting!
Visit Zabbix agent 3.0 XXL with Docker monitoring for more information.
Please donate to author, so he can continue to publish other awesome projects for free:
Note: fid - full unit id (macro {#FID})
Key | Description |
---|---|
systemd.discovery[unittype] | LLD discovering of running (not all, only running!) systemd units: unittype - type of discovered unit: service, socker, device, mount, automount, swap, target, path, timer, snapshot, slice, scope Note: Available macros: {#FID} - full unit ID (e.g. systemd-journald.service) {#HID} - human ID (e.g. journald) |
systemd.mem[fid,mmetric] | Memory metrics: mmetric - any available memory metric in the pseudo-file memory.stat, e.g.: cache, rss, mapped_file, pgpgin, pgpgout, swap, pgfault, pgmajfault, inactive_anon, active_anon, inactive_file, active_file, unevictable, hierarchical_memory_limit, hierarchical_memsw_limit, total_cache, total_rss, total_mapped_file, total_pgpgin, total_pgpgout, total_swap, total_pgfault, total_pgmajfault, total_inactive_anon, total_active_anon, total_inactive_file, total_active_file, total_unevictable, Note: if you have problem with memory metrics, be sure that memory cgroup subsystem is enabled - kernel parameter: cgroup_enable=memory |
systemd.cpu[fid,cmetric] | CPU metrics: cmetric - any available CPU metric in the pseudo-file cpuacct.stat/cpu.stat, e.g.: system, user or container throttling metrics: nr_throttled, throttled_time Note: Jiffy CPU counter is recalculated to % value by Zabbix. |
systemd.dev[fid,bfile,bmetric] | Blk IO metrics: bfile - container blkio pseudo-file, e.g.: blkio.io_merged, blkio.io_queued, blkio.io_service_bytes, blkio.io_serviced, blkio.io_service_time, blkio.io_wait_time, blkio.sectors, blkio.time, blkio.avg_queue_size, blkio.idle_time, blkio.dequeue, ... bmetric - any available blkio metric in selected pseudo-file, e.g.: Total. Option for selected block device only is also available e.g. '8:0 Sync' (quotes must be used in key parameter in this case) Note: Some pseudo blkio files are available only if kernel config CONFIG_DEBUG_BLK_CGROUP=y, see recommended docs. |
systemd.up[fid] | Running state check: 1 if unit is running, otherwise 0 |
- Import provided template Zabbix-Template-App-systemd-service-simple.xml or Zabbix-Template-App-systemd-service-advanced.xml.
- Configure your Zabbix agent(s) - load downloaded/compiled
zabbix_module_docker.so
https://www.zabbix.com/documentation/3.0/manual/config/items/loadablemodules
See section Compilation.
Edit your zabbix_agentd.conf and set DebugLevel:
DebugLevel=4
Module debug messages will be available in standard zabbix_agentd.log.
- https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt
- https://www.kernel.org/doc/Documentation/cgroups/memory.txt
- https://www.kernel.org/doc/Documentation/cgroups/cpuacct.txt
- https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/index.html
- https://www.freedesktop.org/wiki/Software/systemd/
- https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
Devops Monitoring Expert, who loves monitoring systems and cutting/bleeding edge technologies: Docker, Kubernetes, ECS, AWS, Google GCP, Terraform, Lambda, Zabbix, Grafana, Elasticsearch, Kibana, Prometheus, Sysdig, ...
Summary:
- 1000+ GitHub stars
- 6000+ Grafana dashboard downloads
- 800 000+ Docker image pulls
Professional devops / monitoring / consulting services: