zabbix-templates/zabbix-7.0/zabbix_Linux_by_ssh-template.yaml
2025-01-16 19:36:09 +01:00

1712 lines
68 KiB
YAML

zabbix_export:
version: '7.0'
template_groups:
- uuid: 40cc3baad80b4c0c815f809ea20e2875
name: 'Templates/Operating systems'
templates:
- uuid: fea7e06d651e4af7b45ee0f33becfbc0
template: 'Linux by SSH'
name: 'Linux by SSH'
description: |
'vaniacer' munkássága alapján készítettem, és felpimpeltem a zabbix 7.0-ra. Kijavítottam a hibáit (pl. network devices & mounted filesystem discovery, memória, stb), és kibővítettem új funkciókkal, triggerekkel, dashboardokkal, grafikonokkal.
28 változóval (macros) rendelkezik, amiből számunkra a 3 legfontosabb:
- {$SSH.PORT}: ha nem a 22-es porton figyel az ssh szerver, állítsd be a hostnál
- {$SSH.USER}: ennek nincs default értéke, állítsd be a hosztnál
- {$SSH.PWD}: ennek nincs default értéke, állítsd be a hosztnál
Tesztelve:
- Debian 12 x86
- Debian 11 arm
- Fedora 41
- RedHat 8
- RedHat 9
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
Függőségei:
- ssh :-)
- sysstat
- python3
Figyelem! Ha nem használsz swap-ot, akkor tiltsd le a "Memory swap space free in %" nevű item-et, hogy ne kapj állandó hibaüzenetet!
Gyenge hardveren látványosan meg tudja emelni a CPU load-ot, ha problémákat érzékelsz, növeld meg a lekérdezések idejét az adott hoszton.
https://github.com/vaniacer/Zabbix-Template-OS-Linux-ssh
https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/ssh_checks
vendor:
name: msandor
version: 7.0-0
groups:
- name: 'Templates/Operating systems'
items:
- uuid: 6f79c48d973f4a7486aa6f1c9a92167f
name: 'SSH service is availability'
type: SIMPLE
key: 'net.tcp.service[ssh,,{$SSH.PORT}]'
history: 1w
description: 'Used for monitoring the availability status of the service.'
tags:
- tag: Application
value: 'SSH service'
- tag: component
value: system
triggers:
- uuid: 2bdc0f5de75a405ab74725c51478bbed
expression: 'last(/Linux by SSH/net.tcp.service[ssh,,{$SSH.PORT}])<1'
name: 'SSH daemon is not running or port is not accessible'
priority: WARNING
description: |
A lehetséges okok:
- vagy nem fut az ssh szerver
- vagy rossz porton próbálod elérni {$SSH.PORT}
- vagy a helyi tűzfal tiltja
- vagy nincs hálózati kapcsolatod a gép felé
manual_close: 'YES'
- uuid: a2f8e214cde743199e83276736cbdd06
name: 'Checksum of /etc/passwd'
type: SSH
key: 'ssh.run[cksum of:/etc/passwd,,{$SSH.PORT}]'
delay: 15m
history: 7d
value_type: TEXT
trends: '0'
params: 'sha256sum /etc/passwd | awk ''{ print $1 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
tags:
- tag: component
value: security
triggers:
- uuid: 26289f372c894d12bedc14ee84b984d6
expression: '(last(/Linux by SSH/ssh.run[cksum of:/etc/passwd,,{$SSH.PORT}],#1)<>last(/Linux by SSH/ssh.run[cksum of:/etc/passwd,,{$SSH.PORT}],#2))>0'
name: '/etc/passwd has been changed'
priority: WARNING
manual_close: 'YES'
tags:
- tag: scope
value: security
- uuid: 599a0fa196b44ba6928da87190662f31
name: 'Maximum number of open file descriptors'
type: SSH
key: 'ssh.run[kernel.maxfiles,,{$SSH.PORT}]'
delay: 1h
history: 7d
params: 'cat /proc/sys/fs/file-max'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'May be increased by using the `sysctl` utility or modifying the file `/etc/sysctl.conf`.'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1d
tags:
- tag: component
value: system
triggers:
- uuid: b193cfc008184afc98e05bec35d077fd
expression: 'last(/Linux by SSH/ssh.run[kernel.maxfiles,,{$SSH.PORT}])<{$KERNEL.MAXFILES.MIN}'
name: 'Configured max number of open filedescriptors is too low'
event_name: 'Configured max number of open filedescriptors is too low (< {$KERNEL.MAXFILES.MIN})'
priority: INFO
tags:
- tag: scope
value: performance
- uuid: 0aeab5e9d9c4485cb1b4ad5b58c3bd35
name: 'Maximum number of processes'
type: SSH
key: 'ssh.run[kernel.maxproc,,{$SSH.PORT}]'
delay: 1h
history: 7d
params: 'cat /proc/sys/kernel/pid_max'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'May be increased by using the `sysctl` utility or modifying the file `/etc/sysctl.conf`.'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1d
tags:
- tag: component
value: system
triggers:
- uuid: 21127fc3a3074dd280869924bf79baef
expression: 'last(/Linux by SSH/ssh.run[kernel.maxproc,,{$SSH.PORT}])<{$KERNEL.MAXPROC.MIN}'
name: 'Configured max number of processes is too low'
event_name: 'Configured max number of processes is too low (< {$KERNEL.MAXPROC.MIN})'
priority: INFO
tags:
- tag: scope
value: performance
- uuid: 7b196689738842c09a47e38f6252bf5f
name: 'Available memory'
type: SSH
key: 'ssh.run[mem_available,,{$SSH.PORT}]'
history: 7d
units: B
params: 'grep MemAvailable /proc/meminfo | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
The available memory:
- in Linux = free + buffers + cache;
- on other platforms calculation may vary.
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: memory
- uuid: 0c044db84540495e8682c51a4aa8c178
name: 'Available memory in %'
type: SSH
key: 'ssh.run[mem_pavailable,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: |
total=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')
available=$(grep MemAvailable /proc/meminfo | awk '{ print $2 }')
python3 -c "print (100.0/$total*$available)"
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The available memory as percentage of the total. See also Appendixes in Zabbix Documentation about parameters of the `vm.memory.size` item.'
tags:
- tag: component
value: memory
- uuid: c4d86fd64b684ef696c4dab27ee44b6d
name: 'Total memory'
type: SSH
key: 'ssh.run[mem_total,,{$SSH.PORT}]'
delay: 1h
history: 7d
units: B
params: 'grep MemTotal /proc/meminfo | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Total memory expressed in bytes.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: memory
- uuid: 7c95a330a7bb4f3c939e9ce5c68ee997
name: 'Memory utilization'
type: SSH
key: 'ssh.run[mem_utilization,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: |
total=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')
available=$(grep MemAvailable /proc/meminfo | awk '{ print $2 }')
python3 -c "print (100-(100.0/$total*$available))"
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The percentage of used memory is calculated as `100-pavailable`.'
tags:
- tag: component
value: memory
triggers:
- uuid: 18a64e5bd38b4ecb8c2b30bc00436847
expression: 'last(/Linux by SSH/ssh.run[mem_utilization,,{$SSH.PORT}])>{$MEMORY.UTIL.MAX}'
name: 'High memory utilization'
event_name: 'High memory utilization (>{$MEMORY.UTIL.MAX}% for 5m)'
priority: AVERAGE
description: 'The system is running out of free memory.'
tags:
- tag: scope
value: capacity
- tag: scope
value: performance
- uuid: 9e00d8f0e85149518c4ca79b3b20f07a
name: 'Number of processes'
type: SSH
key: 'ssh.run[proc.num,,{$SSH.PORT}]'
history: 7d
params: 'ps -ax --no-headers | wc -l'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
tags:
- tag: component
value: system
- uuid: 09ea77b058e6430285534f058a127763
name: 'Number of running processes'
type: SSH
key: 'ssh.run[proc.num.run,,{$SSH.PORT}]'
history: 7d
params: 'grep procs_running /proc/stat | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
tags:
- tag: component
value: system
triggers:
- uuid: 0355290864ae4ca888da334fad838dc6
expression: 'avg(/Linux by SSH/ssh.run[proc.num.run,,{$SSH.PORT}],5m)>30'
name: 'Too many processes running'
priority: WARNING
tags:
- tag: scope
value: performance
- uuid: 6e33ee38dee948818e38170e34640ddf
name: 'System boot time'
type: SSH
key: 'ssh.run[system.boottime,,{$SSH.PORT}]'
delay: 15m
history: 7d
units: unixtime
params: 'grep btime /proc/stat | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
tags:
- tag: component
value: system
- uuid: f78e856204d548dabcd9568319198fdb
name: 'Interrupts per second'
type: SSH
key: 'ssh.run[system.cpu.intr,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
params: 'grep intr /proc/stat | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Number of interrupts processed.'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: cpu
- uuid: 62da9ff369f24471882a236b2b562b3f
name: 'Load average (1m avg)'
type: SSH
key: 'ssh.run[system.cpu.load.all,avg1,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
params: 'cat /proc/loadavg | awk ''{ print $1 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Calculated as the system CPU load divided by the number of CPU cores.'
tags:
- tag: component
value: cpu
- uuid: 8b6e2e5cfbbb467abafb7f02434edfe3
name: 'Load average (5m avg)'
type: SSH
key: 'ssh.run[system.cpu.load.all,avg5,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
params: 'cat /proc/loadavg | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Calculated as the system CPU load divided by the number of CPU cores.'
tags:
- tag: component
value: cpu
- uuid: ab4a15130be1424fa08a0122562f58fe
name: 'Load average (15m avg)'
type: SSH
key: 'ssh.run[system.cpu.load.all,avg15,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
params: 'cat /proc/loadavg | awk ''{ print $3 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Calculated as the system CPU load divided by the number of CPU cores.'
tags:
- tag: component
value: cpu
- uuid: 4e338e8b28844cdd8ac8f5739d170b42
name: 'Context switches per second'
type: SSH
key: 'ssh.run[system.cpu.switches,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
params: 'grep ctxt /proc/stat | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The combined rate at which all processors on the computer are switched from one thread to another.'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: cpu
- uuid: 01d29d30cfc7474c901a4d31b207033e
name: 'CPU utilization'
type: SSH
key: 'ssh.run[system.cpu.util,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'idle=$(LANG=C mpstat | grep all | awk ''{ print $(NF) }''); python3 -c "print (100-$idle)"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
CPU utilization expressed in %.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
triggers:
- uuid: c35f551d426d4219853f5a86f00a1a17
expression: 'min(/Linux by SSH/ssh.run[system.cpu.util,,{$SSH.PORT}],5m)>{$CPU.UTIL.CRIT}'
name: 'High CPU utilization'
event_name: 'High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
opdata: 'Current utilization: {ITEM.LASTVALUE1}'
priority: WARNING
description: 'CPU utilization is too high. The system might be slow to respond.'
tags:
- tag: scope
value: performance
- uuid: cdac34b980a34ac5967969f1c96a30bb
name: 'CPU guest time'
type: SSH
key: 'ssh.run[system.cpu.util.guest,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C LANG=C mpstat | grep all | awk ''{ print $10 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time spent on running a virtual CPU for a guest operating system.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: b086f42a27cc47cb96dd57e752a57320
name: 'CPU guest nice time'
type: SSH
key: 'ssh.run[system.cpu.util.guest.nice,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C LANG=C mpstat | grep all | awk ''{ print $11 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time spent on running a niced guest (a virtual CPU for guest operating systems under the control of the Linux kernel).
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: b14571b4418a47afa0e5e62eea80564d
name: 'CPU idle time'
type: SSH
key: 'ssh.run[system.cpu.util.idle,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{print $NF}'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
The time the CPU has spent doing nothing.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: 6f3bdc4dc46d44f8846f25c7ad2437c9
name: 'CPU interrupt time'
type: SSH
key: 'ssh.run[system.cpu.util.interrupt,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{ print $7 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time the CPU has spent servicing hardware interrupts.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: 50c4d049c9434798a5c1b7652948920d
name: 'CPU iowait time'
type: SSH
key: 'ssh.run[system.cpu.util.iowait,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{ print $6 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time the CPU has been waiting for I/O to complete.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: f5ba59783adc4ed6810f91036577d9bf
name: 'CPU nice time'
type: SSH
key: 'ssh.run[system.cpu.util.nice,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{ print $4 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time the CPU has spent running users' processes that have been niced.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: f3f721f6e5dd46179cae8cb7a4f68c47
name: 'CPU softirq time'
type: SSH
key: 'ssh.run[system.cpu.util.softirq,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{ print $8 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time the CPU has been servicing software interrupts.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: 7b717fc9a51044e88f2171945a54994e
name: 'CPU steal time'
type: SSH
key: 'ssh.run[system.cpu.util.steal,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{ print $9 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
The amount of "stolen" CPU from this virtual machine by the hypervisor for other tasks, such as running another virtual machine.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: 967de7c2bb7e42edb0046c66c4b83d89
name: 'CPU system time'
type: SSH
key: 'ssh.run[system.cpu.util.system,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C mpstat | grep all | awk ''{ print $5 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time the CPU has spent running the kernel and its processes.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: dbaa8d1b88854713a2cc13eaa10ca202
name: 'CPU user time'
type: SSH
key: 'ssh.run[system.cpu.util.user,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'LANG=C LANG=C mpstat | grep all | awk ''{ print $3 }'' | sed "s|,|.|g"'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
Time the CPU has spent running users' processes that are not niced.
Ha "Not supported" a státusza, akkor telepítsd fel a 'sysstat' nevű csomagot!
tags:
- tag: component
value: cpu
- uuid: f1f8e7c5d7984d96a606f78ae4060ab5
name: 'Number of CPUs'
type: SSH
key: 'ssh.run[system.cpunumber,,{$SSH.PORT}]'
delay: 1h
history: 7d
params: 'grep -c processor /proc/cpuinfo'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
tags:
- tag: component
value: cpu
- uuid: 0ad5d7af01794d5488bf5cba112c393a
name: 'System name'
type: SSH
key: 'ssh.run[system.hostname,,{$SSH.PORT}]'
delay: 1h
history: 7d
value_type: CHAR
trends: '0'
params: hostname
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The host name of the system.'
inventory_link: NAME
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 12h
tags:
- tag: component
value: system
triggers:
- uuid: 4d3edd3ba4c2441fb2c37ce36c6f5b2b
expression: 'change(/Linux by SSH/ssh.run[system.hostname,,{$SSH.PORT}]) and length(last(/Linux by SSH/ssh.run[system.hostname,,{$SSH.PORT}]))>0'
name: 'System name has changed'
event_name: 'System name has changed (new name: {ITEM.VALUE})'
priority: INFO
description: 'The name of the system has changed. Acknowledge to close the problem manually.'
manual_close: 'YES'
tags:
- tag: scope
value: notice
- tag: scope
value: security
- uuid: 91906c5fc0404a6e84d5b0be77f19c4e
name: 'System local time'
type: SSH
key: 'ssh.run[system.localtime,,{$SSH.PORT}]'
history: 7d
trends: '0'
units: unixtime
params: 'date +%s'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The local system time of the host.'
tags:
- tag: component
value: system
- uuid: 42b6b270ae25436aaa0c84e94a8ba5ac
name: 'Operating system architecture'
type: SSH
key: 'ssh.run[system.sw.arch,,{$SSH.PORT}]'
delay: 1h
history: 7d
value_type: CHAR
trends: '0'
params: 'uname -m'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The architecture of the operating system.'
tags:
- tag: component
value: os
- uuid: 6b0bce27426747eebcf172bd76139407
name: 'Operating system'
type: SSH
key: 'ssh.run[system.sw.os,,{$SSH.PORT}]'
delay: 1h
history: 7d
value_type: CHAR
trends: '0'
params: |
#grep PRETTY_NAME /etc/os-release | awk -F"\"" '{print $2}'
cat /proc/version
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
inventory_link: OS_FULL
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1d
tags:
- tag: component
value: os
- uuid: 1b51d13fd1f145579862b13c1f678ec3
name: 'Free swap space'
type: SSH
key: 'ssh.run[system.swap.size.free,,{$SSH.PORT}]'
history: 7d
units: B
params: 'grep SwapFree /proc/meminfo | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The free space of the swap volume/file expressed in bytes.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: memory
- tag: component
value: storage
- uuid: 74f14e40045f4188823d800b76ec511b
name: 'Free swap space in %'
type: SSH
key: 'ssh.run[system.swap.size.pfree,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: |
total=$(grep SwapTotal /proc/meminfo | awk '{ print $2 }')
free=$(grep SwapFree /proc/meminfo | awk '{ print $2 }')
if [ $total != 0 ]; then python3 -c "print (100.0/$total*$free)"; else echo 0; fi
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
The free space of the swap volume/file expressed in %.
Ha nem használsz swap-ot, akkor kapcsold ki, mert 0-t fog mutatni!
tags:
- tag: component
value: memory
- tag: component
value: storage
triggers:
- uuid: 25ac61d728fc4005b7b44e6c74da7306
expression: 'max(/Linux by SSH/ssh.run[system.swap.size.pfree,,{$SSH.PORT}],5m) <{$SWAP.PFREE.MIN.WARN} and last(/Linux by SSH/ssh.run[system.swap.size.pfree,,{$SSH.PORT}])>0'
name: 'High swap space usage'
event_name: 'High swap space usage (less than {$SWAP.PFREE.MIN.WARN}% free)'
opdata: 'Free: {ITEM.LASTVALUE1}, total: {ITEM.LASTVALUE2}'
priority: WARNING
description: 'If there is no swap configured, this trigger is ignored.'
tags:
- tag: scope
value: capacity
- uuid: efb48839cd444087a921abc9fba2578f
name: 'Total swap space'
type: SSH
key: 'ssh.run[system.swap.size.total,,{$SSH.PORT}]'
delay: 1h
history: 7d
units: B
params: 'grep SwapTotal /proc/meminfo | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The total space of the swap volume/file expressed in bytes.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: memory
- tag: component
value: storage
- uuid: 55023d0fdcd844eb9352878e47a98163
name: 'System description'
type: SSH
key: 'ssh.run[system.uname,,{$SSH.PORT}]'
delay: 15m
history: 7d
value_type: CHAR
trends: '0'
params: 'uname -snrvm'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The information as normally returned by ''uname -a''.'
inventory_link: OS
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 12h
tags:
- tag: component
value: system
triggers:
- uuid: ab21110982db4db9a83c26e3a788ed15
expression: '(last(/Linux by SSH/ssh.run[system.uname,,{$SSH.PORT}],#1)<>last(/Linux by SSH/ssh.run[system.uname,,{$SSH.PORT}],#2))>0'
name: 'Host information was changed'
priority: INFO
- uuid: 83b898dcaba64846a849c218a1775f12
name: 'System uptime'
type: SSH
key: 'ssh.run[system.uptime,,{$SSH.PORT}]'
history: 7d
units: uptime
params: 'cat /proc/uptime | awk -F. ''{ print $1 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The system uptime expressed in the following format: "N days, hh:mm:ss".'
tags:
- tag: component
value: system
triggers:
- uuid: a520021110124fb78c759e015337ff2f
expression: 'last(/Linux by SSH/ssh.run[system.uptime,,{$SSH.PORT}])<10m'
name: '{HOST.NAME} has been restarted'
event_name: '{HOST.NAME} has been restarted (uptime < 10m)'
priority: WARNING
description: 'The host uptime is less than 10 minutes.'
manual_close: 'YES'
tags:
- tag: scope
value: notice
- uuid: d0c68144ece848bb867ac32aa9dec3b4
name: 'Number of logged in users'
type: SSH
key: 'ssh.run[system.users.num,,{$SSH.PORT}]'
history: 7d
params: 'who | wc -l'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The number of users who are currently logged in.'
tags:
- tag: component
value: environment
discovery_rules:
- uuid: 4c6b98ae86f24d58a7e28957710c5805
name: 'Network interface discovery'
type: SSH
key: 'ssh.run[net.if.discovery,,{$SSH.PORT}]'
delay: 1h
params: |
NETS=($(grep : /proc/net/dev | grep -v lo: | sed 's|:.*$||g'))
data=$(
for NET in "${NETS[@]}"; { printf "\n\t{ \"{#IFNAME}\":\"$NET\"\t},"; }
printf '_LAST_COMMA_'
)
printf "{\n\t\"data\":[\n${data//,_LAST_COMMA_/\\n}\n\t]\n}\n"
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
filter:
conditions:
- macro: '{#IFNAME}'
value: '{$NET.IF.IFNAME.MATCHES}'
formulaid: A
- macro: '{#IFNAME}'
value: '{$NET.IF.IFNAME.NOT_MATCHES}'
operator: NOT_MATCHES_REGEX
formulaid: B
lifetime: 30d
enabled_lifetime_type: DISABLE_NEVER
description: 'The discovery of network interfaces.'
item_prototypes:
- uuid: 17ce07bb016544dea17186558841a401
name: 'Interface {#IFNAME}: Operational status'
type: SSH
key: 'ssh.run[net.if.contents."/sys/class/net/{#IFNAME}/operstate",,{$SSH.PORT}]'
trends: '0'
params: 'cat /sys/class/net/{#IFNAME}/operstate'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Reference: https://www.kernel.org/doc/Documentation/networking/operstates.txt'
preprocessing:
- type: JAVASCRIPT
parameters:
- |
var newvalue;
switch(value) {
case "unknown":
newvalue = 0;
break;
case "notpresent":
newvalue = 1;
break;
case "down":
newvalue = 2;
break;
case "lowerlayerdown":
newvalue = 3;
break;
case "testing":
newvalue = 4;
break;
case "dormant":
newvalue = 5;
break;
case "up":
newvalue = 6;
break; default:
newvalue = "Problem parsing interface operstate in JS";
}
return newvalue;
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: acf236e541a54f4298ff39e3049ab1ce
name: 'Interface {#IFNAME}: Speed'
type: SSH
key: 'ssh.run[net.if.contents."/sys/class/net/{#IFNAME}/speed",,{$SSH.PORT}]'
delay: 1h
value_type: TEXT
trends: '0'
params: 'cat /sys/class/net/{#IFNAME}/speed'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
It indicates the latest or current speed value of the interface. The value is an integer representing the link speed expressed in bits/sec.
This attribute is only valid for the interfaces that implement the ethtool `get_link_ksettings` method (mostly Ethernet).
Reference: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net
preprocessing:
- type: MULTIPLIER
parameters:
- '1000000'
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: 2d7df908cb724745b7d803160773f060
name: 'Interface {#IFNAME}: Interface type'
type: SSH
key: 'ssh.run[net.if.contents."/sys/class/net/{#IFNAME}/type",,{$SSH.PORT}]'
value_type: TEXT
trends: '0'
params: 'cat /sys/class/net/{#IFNAME}/type'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: |
It indicates the interface protocol type as a decimal value.
See `include/uapi/linux/if_arp.h` for all possible values.
Reference: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1d
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: 135c8bba836444b7ad90b3ed0b664fa3
name: 'Interface {#IFNAME}: Bits received'
type: SSH
key: 'ssh.run[net.if.in."{#IFNAME}",,{$SSH.PORT}]'
delay: 3m
history: 7d
units: bps
params: |
data=($(grep {#IFNAME} /proc/net/dev))
echo ${data[1]}
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
- type: MULTIPLIER
parameters:
- '8'
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: a7c6868f24b04e85925ecb1380047a76
name: 'Interface {#IFNAME}: Inbound packets discarded'
type: SSH
key: 'ssh.run[net.if.in."{#IFNAME}",dropped,,{$SSH.PORT}]'
delay: 3m
history: 7d
params: |
data=($(grep {#IFNAME} /proc/net/dev))
echo ${data[4]}
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: ced321e64d024d6786b7092e60c5e524
name: 'Interface {#IFNAME}: Inbound packets with errors'
type: SSH
key: 'ssh.run[net.if.in."{#IFNAME}",errors,,{$SSH.PORT}]'
delay: 3m
history: 7d
params: |
data=($(grep {#IFNAME} /proc/net/dev))
echo ${data[3]}
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: 833513df526341a1a9666cf54ec83f9d
name: 'Interface {#IFNAME}: Bits sent'
type: SSH
key: 'ssh.run[net.if.out."{#IFNAME}",,{$SSH.PORT}]'
delay: 3m
history: 7d
units: bps
params: |
data=($(grep {#IFNAME} /proc/net/dev))
echo ${data[9]}
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
- type: MULTIPLIER
parameters:
- '8'
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: 39b19a206a90464ab85a24f3fe347d93
name: 'Interface {#IFNAME}: Outbound packets discarded'
type: SSH
key: 'ssh.run[net.if.out."{#IFNAME}",dropped,,{$SSH.PORT}]'
delay: 3m
history: 7d
params: |
data=($(grep {#IFNAME} /proc/net/dev))
echo ${data[12]}
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
- uuid: 796f5a89f32f43cbaab155f6b34d51f4
name: 'Interface {#IFNAME}: Outbound packets with errors'
type: SSH
key: 'ssh.run[net.if.out."{#IFNAME}",errors,,{$SSH.PORT}]'
delay: 3m
history: 7d
params: |
data=($(grep {#IFNAME} /proc/net/dev))
echo ${data[11]}
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
tags:
- tag: component
value: network
- tag: interface
value: '{#IFNAME}'
graph_prototypes:
- uuid: d0f6c6ad3e2241a49d080eefaeea3f63
name: 'Interface {#IFNAME}: Network traffic'
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[net.if.in."{#IFNAME}",,{$SSH.PORT}]'
- sortorder: '1'
drawtype: BOLD_LINE
color: F63100
calc_fnc: ALL
item:
host: 'Linux by SSH'
key: 'ssh.run[net.if.out."{#IFNAME}",,{$SSH.PORT}]'
- uuid: 840c2e71f37f4aaf98fc8b377d6c8e9d
name: 'Mounted filesystem discovery'
type: SSH
key: 'ssh.run[vfs.fs.discovery,,{$SSH.PORT}]'
delay: 1h
params: |
IFSOLD=$IFS; IFS=$'\n'; FSS=($(df -Tl -xtmpfs -xdevtmpfs)); IFS=$IFSOLD
data=$(
for FS in "${FSS[@]:1}"; {
fs=($FS); printf "\n\t{ \"{#FSNAME}\":\"${fs[-1]}\",\t\t\"{#FSTYPE}\":\"${fs[1]}\"\t},"
}; printf '_LAST_COMMA_'
)
printf "{\n\t\"data\":[\n${data//,_LAST_COMMA_/\\n}\n\t]\n}\n"
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
filter:
conditions:
- macro: '{#FSTYPE}'
value: '@File systems for discovery'
formulaid: A
lifetime: 30d
enabled_lifetime_type: DISABLE_NEVER
description: 'Discovery of file systems of different types as defined in global regular expression "File systems for discovery".'
item_prototypes:
- uuid: 54de33f2a51c47ccb078ce697ca4a554
name: 'FS [{#FSNAME}]: Inodes: Free, in %'
type: SSH
key: 'ssh.run[vfs.fs.dependent.inode.{#FSNAME}.pfree,,{$SSH.PORT}]'
delay: 1h
history: 7d
value_type: FLOAT
units: '%'
params: 'expr 100 - $(df -i {#FSNAME} | sed ''1d;s|%||;s|,|.|'' | awk ''{ print $5 }'')'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Free metadata space expressed in %.'
tags:
- tag: component
value: storage
- tag: filesystem
value: '{#FSNAME}'
- tag: fstype
value: '{#FSTYPE}'
trigger_prototypes:
- uuid: b82bf39407514781b709606ffb800f17
expression: 'min(/Linux by SSH/ssh.run[vfs.fs.dependent.inode.{#FSNAME}.pfree,,{$SSH.PORT}],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
name: 'FS [{#FSNAME}]: Running out of free inodes'
event_name: 'FS [{#FSNAME}]: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)'
opdata: 'Free inodes: {ITEM.LASTVALUE1}'
priority: WARNING
description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
tags:
- tag: scope
value: capacity
- tag: scope
value: performance
- uuid: 0dbdccfa5c3d429a88c398b050ea947b
expression: 'min(/Linux by SSH/ssh.run[vfs.fs.dependent.inode.{#FSNAME}.pfree,,{$SSH.PORT}],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}'
name: 'FS [{#FSNAME}]: Running out of free inodes'
event_name: 'FS [{#FSNAME}]: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)'
opdata: 'Free inodes: {ITEM.LASTVALUE1}'
priority: WARNING
description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
tags:
- tag: scope
value: capacity
- tag: scope
value: performance
- uuid: 081c3b9898de42458b141626c16c1d4f
name: 'FS [{#FSNAME}]: Space: Used, in %'
type: SSH
key: 'ssh.run[vfs.fs.dependent.size.[{#FSNAME}.pused,,{$SSH.PORT}]'
history: 7d
value_type: FLOAT
units: '%'
params: 'df {#FSNAME} | grep {#FSNAME} | awk ''{ print $5 }'' | sed ''s|%||'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Calculated as the percentage of currently used space compared to the maximum available space.'
tags:
- tag: component
value: storage
- tag: filesystem
value: '{#FSNAME}'
- tag: fstype
value: '{#FSNAME}'
trigger_prototypes:
- uuid: 5f25caeb8e034e4fa4772c6b0e2c21d4
expression: 'min(/Linux by SSH/ssh.run[vfs.fs.dependent.size.[{#FSNAME}.pused,,{$SSH.PORT}],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
name: 'FS [{#FSNAME}]: Space is critically low'
event_name: 'FS [{#FSNAME}]: Space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
priority: AVERAGE
description: |
The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%` limit.
The trigger expression is based on the current used and maximum available spaces.
Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: capacity
- uuid: 9c42ab7f8e1945e6a366ec75dafc8819
expression: 'min(/Linux by SSH/ssh.run[vfs.fs.dependent.size.[{#FSNAME}.pused,,{$SSH.PORT}],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}'
name: 'FS [{#FSNAME}]: Space is low'
event_name: 'FS [{#FSNAME}]: Space is low (used > {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
priority: WARNING
description: |
The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%` limit.
The trigger expression is based on the current used and maximum available spaces.
Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: capacity
- uuid: 7b3cbbb087d84b0dbd6572be4383b3f9
name: 'FS [{#FSNAME}]: Space: Available'
type: SSH
key: 'ssh.run[vfs.fs.dependent.size.{#FSNAME}.free,,{$SSH.PORT}]'
history: 7d
units: B
params: 'df --block-size=1 {#FSNAME} | grep {#FSNAME} | awk ''{ print $4 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Available storage space expressed in bytes.'
tags:
- tag: component
value: storage
- tag: filesystem
value: '{#FSNAME}'
- tag: fstype
value: '{#FSTYPE}'
- uuid: ab77b0b6383a424cb35ab974f0b4be30
name: 'FS [{#FSNAME}]: Space: Total'
type: SSH
key: 'ssh.run[vfs.fs.dependent.size.{#FSNAME}.total,,{$SSH.PORT}]'
delay: 1h
history: 7d
units: B
params: 'df --block-size=1 {#FSNAME} | grep {#FSNAME} | awk ''{ print $2 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Total space expressed in bytes.'
tags:
- tag: component
value: storage
- tag: filesystem
value: '{#FSNAME}'
- tag: fstype
value: '{#FSTYPE}'
- uuid: 853406d964cc427ea0c3f576b93f67e0
name: 'FS [{#FSNAME}]: Space: Used'
type: SSH
key: 'ssh.run[vfs.fs.dependent.size.{#FSNAME}.used,,{$SSH.PORT}]'
history: 7d
units: B
params: 'df --block-size=1 {#FSNAME} | grep {#FSNAME} | awk ''{ print $3 }'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'Used storage expressed in bytes.'
tags:
- tag: component
value: storage
- tag: filesystem
value: '{#FSNAME}'
- tag: fstype
value: '{#FSTYPE}'
- uuid: c9dc42d978734a8a9022a3e7a4c742ab
name: 'FS [{#FSNAME}]: Option: Read-only'
type: SSH
key: 'ssh.run[vfs.fs.dependent.{#FSNAME}.readonly,,{$SSH.PORT}]'
history: 7d
params: 'awk ''$4~/(^|,)ro($|,)/'' /proc/mounts | egrep -v "ramfs|tmpfs" | grep -c {#FSNAME}'
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'The filesystem is mounted as read-only.'
tags:
- tag: component
value: storage
- tag: filesystem
value: '{#FSNAME}'
- tag: fstype
value: '{#FSTYPE}'
trigger_prototypes:
- uuid: 753cd5fa22c24b66a39220690734ca04
expression: 'last(/Linux by SSH/ssh.run[vfs.fs.dependent.{#FSNAME}.readonly,,{$SSH.PORT}],#2)=0 and last(/Linux by SSH/ssh.run[vfs.fs.dependent.{#FSNAME}.readonly,,{$SSH.PORT}])=1'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: 'last(/Linux by SSH/ssh.run[vfs.fs.dependent.{#FSNAME}.readonly,,{$SSH.PORT}])=0'
name: 'FS [{#FSNAME}]: Filesystem has become read-only'
event_name: 'FS [{#FSNAME}]: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)'
opdata: 'Free inodes: {ITEM.LASTVALUE1}'
priority: AVERAGE
description: 'The filesystem has become read-only, possibly due to an I/O error.'
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
graph_prototypes:
- uuid: 8a06b094ec674f72b6bd7fc1e2b03f03
name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
width: '600'
height: '340'
ymin_type_1: FIXED
ymax_type_1: FIXED
graph_items:
- drawtype: FILLED_REGION
color: F63100
item:
host: 'Linux by SSH'
key: 'ssh.run[vfs.fs.dependent.size.[{#FSNAME}.pused,,{$SSH.PORT}]'
- uuid: 5b9f331bbf9c4577a1d163354b55bd9a
name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
width: '600'
height: '340'
yaxismax: '0'
show_work_period: 'NO'
show_triggers: 'NO'
type: PIE
show_3d: 'YES'
graph_items:
- color: '787878'
calc_fnc: MIN
item:
host: 'Linux by SSH'
key: 'ssh.run[vfs.fs.dependent.size.{#FSNAME}.total,,{$SSH.PORT}]'
- sortorder: '1'
color: F63100
calc_fnc: MIN
item:
host: 'Linux by SSH'
key: 'ssh.run[vfs.fs.dependent.size.{#FSNAME}.used,,{$SSH.PORT}]'
- sortorder: '2'
color: 199C09
calc_fnc: MIN
item:
host: 'Linux by SSH'
key: 'ssh.run[vfs.fs.dependent.size.{#FSNAME}.free,,{$SSH.PORT}]'
tags:
- tag: class
value: os
- tag: target
value: linux
macros:
- macro: '{$AGENT.TIMEOUT}'
value: 3m
description: 'Timeout after which agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (passive mode).'
- macro: '{$CPU.UTIL.CRIT}'
value: '90'
description: 'Critical threshold of CPU utilization expressed in %.'
- macro: '{$IF.ERRORS.WARN}'
value: '2'
description: 'Warning threshold of error packet rate. Can be used with interface name as context.'
- macro: '{$IF.UTIL.MAX}'
value: '90'
description: 'Used as a threshold in the interface utilization trigger.'
- macro: '{$IFCONTROL}'
value: '1'
description: 'Link status trigger will be fired only for interfaces where the context macro equals "1".'
- macro: '{$KERNEL.MAXFILES.MIN}'
value: '256'
- macro: '{$KERNEL.MAXPROC.MIN}'
value: '1024'
- macro: '{$LOAD_AVG_PER_CPU.MAX.WARN}'
value: '1.5'
description: 'The CPU load per core is considered sustainable. If necessary, it can be tuned.'
- macro: '{$MEMORY.AVAILABLE.MIN}'
value: 20M
description: 'Used as a threshold in the available memory trigger.'
- macro: '{$MEMORY.UTIL.MAX}'
value: '90'
description: 'Used as a threshold in the memory utilization trigger.'
- macro: '{$NET.IF.IFNAME.MATCHES}'
value: '^.*$'
description: 'Used for network interface discovery. Can be overridden on the host or linked template level.'
- macro: '{$NET.IF.IFNAME.NOT_MATCHES}'
value: '(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9A-z]+$|docker[0-9]+|br-[a-z0-9]{12})'
description: 'Filters out `loopbacks`, `nulls`, docker `veth` links and `docker0` bridge by default.'
- macro: '{$SSH.PORT}'
value: '22'
- macro: '{$SWAP.PFREE.MIN.WARN}'
value: '50'
description: 'The warning threshold of the minimum free swap.'
- macro: '{$SYSTEM.FUZZYTIME.MAX}'
value: 60s
description: 'The upper threshold for difference of system time.'
- macro: '{$SYSTEM.FUZZYTIME.MIN}'
value: 10s
description: 'The lower threshold for difference of system time. Used in recovery expression to avoid trigger flapping.'
- macro: '{$VFS.DEV.DEVNAME.MATCHES}'
value: .+
description: 'Used for block device discovery. Can be overridden on the host or linked template level.'
- macro: '{$VFS.DEV.DEVNAME.NOT_MATCHES}'
value: '^(loop[0-9]*|sd[a-z][0-9]+|nbd[0-9]+|sr[0-9]+|fd[0-9]+|dm-[0-9]+|ram[0-9]+|ploop[a-z0-9]+|md[0-9]*|hcp[0-9]*|zram[0-9]*)'
description: 'Used for block device discovery. Can be overridden on the host or linked template level.'
- macro: '{$VFS.DEV.READ.AWAIT.WARN}'
value: '20'
description: 'The average response time (in ms) of disk read before the trigger fires.'
- macro: '{$VFS.DEV.WRITE.AWAIT.WARN}'
value: '20'
description: 'The average response time (in ms) of disk write before the trigger fires.'
- macro: '{$VFS.FS.FSNAME.MATCHES}'
value: .+
description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
- macro: '{$VFS.FS.FSNAME.NOT_MATCHES}'
value: ^(/dev|/sys|/run|/proc|.+/shm$)
description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
- macro: '{$VFS.FS.FSTYPE.MATCHES}'
value: ^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$
description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
- macro: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
value: ^\s$
description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
- macro: '{$VFS.FS.INODE.PFREE.MIN.CRIT}'
value: '10'
description: 'The critical threshold of the filesystem metadata utilization.'
- macro: '{$VFS.FS.INODE.PFREE.MIN.WARN}'
value: '20'
description: 'The warning threshold of the filesystem metadata utilization.'
- macro: '{$VFS.FS.PUSED.MAX.CRIT}'
value: '90'
description: 'The critical threshold of the filesystem utilization.'
- macro: '{$VFS.FS.PUSED.MAX.WARN}'
value: '80'
description: 'The warning threshold of the filesystem utilization.'
dashboards:
- uuid: b374df5165424413a64e0b8b1bda9774
name: Filesystems
display_period: '60'
pages:
- widgets:
- type: graphprototype
width: '69'
height: '5'
fields:
- type: INTEGER
name: columns
value: '3'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'Linux by SSH'
name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
- type: STRING
name: reference
value: TOTGJ
- type: graphprototype
'y': '5'
width: '69'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'Linux by SSH'
name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
- type: STRING
name: reference
value: JMEDJ
- uuid: badd0c1c59fa405d84a372f907f2b1c6
name: 'Network interfaces'
display_period: '60'
pages:
- widgets:
- type: graphprototype
width: '69'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'Linux by SSH'
name: 'Interface {#IFNAME}: Network traffic'
- type: STRING
name: reference
value: BXKGP
- uuid: a2f9fc42a26e4f88863921b2da1c59c3
name: 'System performance'
pages:
- widgets:
- type: graph
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'Linux by SSH'
name: 'Linux: System load'
- type: STRING
name: reference
value: AAAAA
- type: graph
'y': '5'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'Linux by SSH'
name: 'Linux: Memory usage'
- type: STRING
name: reference
value: AAAAC
- type: graphprototype
'y': '10'
width: '72'
height: '5'
fields:
- type: INTEGER
name: columns
value: '3'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'Linux by SSH'
name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
- type: STRING
name: reference
value: XYWNP
- type: graphprototype
'y': '15'
width: '72'
height: '5'
fields:
- type: INTEGER
name: columns
value: '1'
- type: GRAPH_PROTOTYPE
name: graphid.0
value:
host: 'Linux by SSH'
name: 'Interface {#IFNAME}: Network traffic'
- type: STRING
name: reference
value: BLFZO
- type: graph
x: '36'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'Linux by SSH'
name: 'Linux: CPU usage'
- type: STRING
name: reference
value: AAAAB
- type: graph
x: '36'
'y': '5'
width: '36'
height: '5'
fields:
- type: GRAPH
name: graphid.0
value:
host: 'Linux by SSH'
name: 'Linux: Swap usage'
- type: STRING
name: reference
value: AAAAD
triggers:
- uuid: 49d74dedfa69411da6f85eadf613388a
expression: 'last(/Linux by SSH/ssh.run[proc.num,,{$SSH.PORT}])/last(/Linux by SSH/ssh.run[kernel.maxproc,,{$SSH.PORT}])*100>80'
name: 'Getting closer to process limit'
event_name: 'Getting closer to process limit (over 80% used)'
opdata: '{ITEM.LASTVALUE1} active, {ITEM.LASTVALUE2} limit.'
priority: WARNING
tags:
- tag: scope
value: performance
- uuid: 97a51f8b8cd746e6bbd6c8c02571b8bc
expression: 'max(/Linux by SSH/ssh.run[mem_available,,{$SSH.PORT}],5m)<{$MEMORY.AVAILABLE.MIN} and last(/Linux by SSH/ssh.run[mem_total,,{$SSH.PORT}])>0'
name: 'Lack of available memory'
event_name: 'Lack of available memory (<{$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})'
opdata: 'Available: {ITEM.LASTVALUE1}, total: {ITEM.LASTVALUE2}'
priority: AVERAGE
description: 'The system is running out of memory.'
tags:
- tag: scope
value: capacity
- tag: scope
value: performance
- uuid: 536ca8cd03fe477d957ba9cd61d12559
expression: 'min(/Linux by SSH/ssh.run[system.cpu.load.all,avg1,,{$SSH.PORT}],5m)/last(/Linux by SSH/ssh.run[system.cpunumber,,{$SSH.PORT}])>{$LOAD_AVG_PER_CPU.MAX.WARN} and last(/Linux by SSH/ssh.run[system.cpu.load.all,avg5,,{$SSH.PORT}])>0 and last(/Linux by SSH/ssh.run[system.cpu.load.all,avg15,,{$SSH.PORT}])>0'
name: 'Load average is too high'
event_name: 'Load average is too high (per CPU load over {$LOAD_AVG_PER_CPU.MAX.WARN} for 5m)'
opdata: 'Load averages(1m 5m 15m): ({ITEM.LASTVALUE1} {ITEM.LASTVALUE3} {ITEM.LASTVALUE4}), # of CPUs: {ITEM.LASTVALUE2}'
priority: AVERAGE
description: 'The load average per CPU is too high. The system may be slow to respond.'
tags:
- tag: scope
value: capacity
- tag: scope
value: performance
graphs:
- uuid: f3fb6d18e49544d09609121dd9a79476
name: 'Linux: CPU jumps'
graph_items:
- color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.switches,,{$SSH.PORT}]'
- sortorder: '1'
color: F63100
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.intr,,{$SSH.PORT}]'
- uuid: a97f23e51a0340d680468cb509efa349
name: 'Linux: CPU usage'
show_triggers: 'NO'
type: STACKED
ymin_type_1: FIXED
ymax_type_1: FIXED
graph_items:
- drawtype: FILLED_REGION
color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.system,,{$SSH.PORT}]'
- sortorder: '1'
drawtype: FILLED_REGION
color: F63100
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.user,,{$SSH.PORT}]'
- sortorder: '2'
drawtype: FILLED_REGION
color: 00611C
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.nice,,{$SSH.PORT}]'
- sortorder: '3'
drawtype: FILLED_REGION
color: F7941D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.iowait,,{$SSH.PORT}]'
- sortorder: '4'
drawtype: FILLED_REGION
color: FC6EA3
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.steal,,{$SSH.PORT}]'
- sortorder: '5'
drawtype: FILLED_REGION
color: 6C59DC
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.interrupt,,{$SSH.PORT}]'
- sortorder: '6'
drawtype: FILLED_REGION
color: C7A72D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.softirq,,{$SSH.PORT}]'
- sortorder: '7'
drawtype: FILLED_REGION
color: BA2A5D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.guest,,{$SSH.PORT}]'
- sortorder: '8'
color: F230E0
calc_fnc: MIN
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util.guest.nice,,{$SSH.PORT}]'
- uuid: a2cadfb396844ccc9b4238c2bffaa9e4
name: 'Linux: CPU utilization'
ymin_type_1: FIXED
ymax_type_1: FIXED
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.util,,{$SSH.PORT}]'
- uuid: ece095988f0f407fab78bb5fcff63693
name: 'Linux: Memory usage'
ymin_type_1: FIXED
graph_items:
- drawtype: BOLD_LINE
color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[mem_total,,{$SSH.PORT}]'
- sortorder: '1'
drawtype: GRADIENT_LINE
color: F63100
calc_fnc: ALL
item:
host: 'Linux by SSH'
key: 'ssh.run[mem_available,,{$SSH.PORT}]'
- uuid: 70147cc313684e24877a2d46502294cc
name: 'Linux: Memory utilization'
ymin_type_1: FIXED
ymax_type_1: FIXED
graph_items:
- drawtype: GRADIENT_LINE
color: 199C0D
calc_fnc: ALL
item:
host: 'Linux by SSH'
key: 'ssh.run[mem_utilization,,{$SSH.PORT}]'
- uuid: 07fd701c6ac84332943d979cd323818d
name: 'Linux: Processes'
graph_items:
- color: 199C0D
calc_fnc: ALL
item:
host: 'Linux by SSH'
key: 'ssh.run[kernel.maxproc,,{$SSH.PORT}]'
- sortorder: '1'
color: F63100
calc_fnc: ALL
item:
host: 'Linux by SSH'
key: 'ssh.run[proc.num.run,,{$SSH.PORT}]'
- uuid: e7f66a3518c04a5d988fbdce8bcac47c
name: 'Linux: Swap usage'
width: '600'
height: '340'
graph_items:
- color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.swap.size.free,,{$SSH.PORT}]'
- sortorder: '1'
color: F63100
item:
host: 'Linux by SSH'
key: 'ssh.run[system.swap.size.total,,{$SSH.PORT}]'
- uuid: 3f8ad0e0e4804337849bb008e9142c0a
name: 'Linux: System load'
ymin_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.load.all,avg1,,{$SSH.PORT}]'
- sortorder: '1'
color: F63100
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.load.all,avg5,,{$SSH.PORT}]'
- sortorder: '2'
color: 00611C
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpu.load.all,avg15,,{$SSH.PORT}]'
- sortorder: '3'
color: F7941D
calc_fnc: ALL
item:
host: 'Linux by SSH'
key: 'ssh.run[system.cpunumber,,{$SSH.PORT}]'