Linux

Linux

Available solutions




Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/linux_agent


Template Module Linux CPU by Zabbix agent

Overview

For Zabbix version: 4.4

Setup

Zabbix configuration

Macros used

NameDescriptionDefault
{$CPU.UTIL.CRIT}

-

90
{$LOAD_AVG_PER_CPU.MAX.WARN}

Load per CPU considered sustainable. Tune if needed.

1.5

Template links

There are no template links in this template.

Discovery rules

Items collected

GroupNameDescriptionTypeKey and additional info
CPUNumber of CPUs

-

ZABBIX_PASSIVEsystem.cpu.num

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

CPULoad average (1m avg)

-

ZABBIX_PASSIVEsystem.cpu.load[all,avg1]
CPULoad average (5m avg)

-

ZABBIX_PASSIVEsystem.cpu.load[all,avg5]
CPULoad average (15m avg)

-

ZABBIX_PASSIVEsystem.cpu.load[all,avg15]
CPUCPU utilization

CPU utilization in %

DEPENDENTsystem.cpu.util

Preprocessing:

- JAVASCRIPT: //Calculate utilization return (100 - value)

CPUCPU idle time

The time the CPU has spent doing nothing.

ZABBIX_PASSIVEsystem.cpu.util[,idle]
CPUCPU system time

The time the CPU has spent running the kernel and its processes.

ZABBIX_PASSIVEsystem.cpu.util[,system]
CPUCPU user time

The time the CPU has spent running users' processes that are not niced.

ZABBIX_PASSIVEsystem.cpu.util[,user]
CPUCPU nice time

The time the CPU has spent running users' processes that have been niced.

ZABBIX_PASSIVEsystem.cpu.util[,nice]
CPUCPU iowait time

Amount of time the CPU has been waiting for I/O to complete.

ZABBIX_PASSIVEsystem.cpu.util[,iowait]
CPUCPU steal time

The amount of CPU 'stolen' from this virtual machine by the hypervisor for other tasks (such as running another virtual machine).

ZABBIX_PASSIVEsystem.cpu.util[,steal]
CPUCPU interrupt time

The amount of time the CPU has been servicing hardware interrupts.

ZABBIX_PASSIVEsystem.cpu.util[,interrupt]
CPUCPU softirq time

The amount of time the CPU has been servicing software interrupts.

ZABBIX_PASSIVEsystem.cpu.util[,softirq]
CPUCPU guest time

Guest time (time spent running a virtual CPU for a guest operating system)

ZABBIX_PASSIVEsystem.cpu.util[,guest]
CPUCPU guest nice time

Time spent running a niced guest (virtual CPU for guest operating systems under the control of the Linux kernel)

ZABBIX_PASSIVEsystem.cpu.util[,guest_nice]
CPUContext switches per second

-

ZABBIX_PASSIVEsystem.cpu.switches

Preprocessing:

- CHANGE_PER_SECOND

CPUInterrupts per second

-

ZABBIX_PASSIVEsystem.cpu.intr

Preprocessing:

- CHANGE_PER_SECOND

Triggers

NameDescriptionExpressionSeverityDependencies and additional info
Load average is too high (per CPU load over {$LOAD_AVG_PER_CPU.MAX.WARN} for 5m)

Per CPU load average is too high. Your system may be slow to respond.

{TEMPLATE_NAME:system.cpu.load[all,avg1].min(5m)}/{Template Module Linux CPU by Zabbix agent:system.cpu.num.last()}>{$LOAD_AVG_PER_CPU.MAX.WARN} and {Template Module Linux CPU by Zabbix agent:system.cpu.load[all,avg5].last()}>0 and {Template Module Linux CPU by Zabbix agent:system.cpu.load[all,avg15].last()}>0AVERAGE
High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)

-

{TEMPLATE_NAME:system.cpu.util.min(5m)}>{$CPU.UTIL.CRIT}WARNING

Depends on:

- Load average is too high (per CPU load over {$LOAD_AVG_PER_CPU.MAX.WARN} for 5m)

Feedback

Please report any issues with the template at https://support.zabbix.com

Template Module Linux filesystems by Zabbix agent

Overview

For Zabbix version: 4.4

Setup

Zabbix configuration

Macros used

NameDescriptionDefault
{$VFS.FS.FSNAME.MATCHES}

This macro is used in filesystems discovery. Can be overridden on the host or linked template level

.+
{$VFS.FS.FSNAME.NOT_MATCHES}

This macro is used in filesystems discovery. Can be overridden on the host or linked template level

`^(/dev
{$VFS.FS.FSTYPE.MATCHES}

This macro is used in filesystems discovery. Can be overridden on the host or linked template level

`^(btrfs
{$VFS.FS.FSTYPE.NOT_MATCHES}

This macro is used in filesystems discovery. Can be overridden on the host or linked template level

^\s$
{$VFS.FS.INODE.PFREE.MIN.CRIT}

-

10
{$VFS.FS.INODE.PFREE.MIN.WARN}

-

20
{$VFS.FS.PUSED.MAX.CRIT}

-

90
{$VFS.FS.PUSED.MAX.WARN}

-

80

Template links

There are no template links in this template.

Discovery rules

NameDescriptionTypeKey and additional info
Mounted filesystem discovery

Discovery of file systems of different types.

ZABBIX_PASSIVEvfs.fs.discovery

Filter:

AND

- A: { #FSTYPE} MATCHES_REGEX {$VFS.FS.FSTYPE.MATCHES}

- B: { #FSTYPE} NOT_MATCHES_REGEX {$VFS.FS.FSTYPE.NOT_MATCHES}

- C: { #FSNAME} MATCHES_REGEX {$VFS.FS.FSNAME.MATCHES}

- D: { #FSNAME} NOT_MATCHES_REGEX {$VFS.FS.FSNAME.NOT_MATCHES}

Items collected

GroupNameDescriptionTypeKey and additional info
Filesystems{ #FSNAME}: Used space

Used storage in Bytes

ZABBIX_PASSIVEvfs.fs.size[{ #FSNAME},used]
Filesystems{ #FSNAME}: Total space

Total space in Bytes

ZABBIX_PASSIVEvfs.fs.size[{ #FSNAME},total]
Filesystems{ #FSNAME}: Space utilization

Space utilization in % for { #FSNAME}

ZABBIX_PASSIVEvfs.fs.size[{ #FSNAME},pused]
Filesystems{ #FSNAME}: Free inodes in %

-

ZABBIX_PASSIVEvfs.fs.inode[{ #FSNAME},pfree]

Triggers

NameDescriptionExpressionSeverityDependencies and additional info
{ #FSNAME}: Disk space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{ #FSNAME}"}%)

Two conditions should match: First, space utilization should be above {$VFS.FS.PUSED.MAX.CRIT:"{ #FSNAME}"}.

Second condition should be one of the following:

- The disk free space is less than 5G.

- The disk will be full in less than 24 hours.

{TEMPLATE_NAME:vfs.fs.size[{ #FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{ #FSNAME}"} and (({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{ #FSNAME},total].last()}-{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{ #FSNAME},used].last()})<5G or {TEMPLATE_NAME:vfs.fs.size[{ #FSNAME},pused].timeleft(1h,,100)}<1d)AVERAGE

Manual close: YES

{ #FSNAME}: Disk space is low (used > {$VFS.FS.PUSED.MAX.WARN:"{ #FSNAME}"}%)

Two conditions should match: First, space utilization should be above {$VFS.FS.PUSED.MAX.CRIT:"{ #FSNAME}"}.

Second condition should be one of the following:

- The disk free space is less than 10G.

- The disk will be full in less than 24 hours.

{TEMPLATE_NAME:vfs.fs.size[{ #FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.WARN:"{ #FSNAME}"} and (({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{ #FSNAME},total].last()}-{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{ #FSNAME},used].last()})<10G or {TEMPLATE_NAME:vfs.fs.size[{ #FSNAME},pused].timeleft(1h,,100)}<1d)WARNING

Manual close: YES

Depends on:

- { #FSNAME}: Disk space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{ #FSNAME}"}%)

{ #FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{ #FSNAME}"}%)

It may become impossible to write to disk if there are no index nodes left.

As symptoms, 'No space left on device' or 'Disk is full' errors may be seen even though free space is available.

{TEMPLATE_NAME:vfs.fs.inode[{ #FSNAME},pfree].min(5m)}<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{ #FSNAME}"}AVERAGE
{ #FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{ #FSNAME}"}%)

It may become impossible to write to disk if there are no index nodes left.

As symptoms, 'No space left on device' or 'Disk is full' errors may be seen even though free space is available.

{TEMPLATE_NAME:vfs.fs.inode[{ #FSNAME},pfree].min(5m)}<{$VFS.FS.INODE.PFREE.MIN.WARN:"{ #FSNAME}"}WARNING

Depends on:

- { #FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{ #FSNAME}"}%)

Feedback

Please report any issues with the template at https://support.zabbix.com

Template Module Linux memory by Zabbix agent

Overview

For Zabbix version: 4.4

Setup

Zabbix configuration

Macros used

NameDescriptionDefault
{$MEMORY.AVAILABLE.MIN}

This macro is used as a threshold in memory available trigger.

20M
{$MEMORY.UTIL.MAX}

This macro is used as a threshold in memory utilization trigger.

90
{$SWAP.PFREE.MIN.WARN}

-

50

Template links

There are no template links in this template.

Discovery rules

Items collected

GroupNameDescriptionTypeKey and additional info
MemoryMemory utilization

Memory used percentage is calculated as (100-pavailable)

ZABBIX_PASSIVEvm.memory.size[pavailable]

Preprocessing:

- JAVASCRIPT: return (100-value);

MemoryTotal memory

Total memory in Bytes

ZABBIX_PASSIVEvm.memory.size[total]
MemoryAvailable memory

Available memory, in Linux, available = free + buffers + cache. On other platforms calculation may vary. See also: https://www.zabbix.com/documentation/current/manual/appendix/items/vm.memory.size_params

ZABBIX_PASSIVEvm.memory.size[available]
MemoryTotal swap space

-

ZABBIX_PASSIVEsystem.swap.size[,total]
MemoryFree swap space

-

ZABBIX_PASSIVEsystem.swap.size[,free]
MemoryFree swap space in %

-

ZABBIX_PASSIVEsystem.swap.size[,pfree]

Triggers

NameDescriptionExpressionSeverityDependencies and additional info
High memory utilization ( >{$MEMORY.UTIL.MAX}% for 5m)

-

{TEMPLATE_NAME:vm.memory.size[pavailable].min(5m)}>{$MEMORY.UTIL.MAX}AVERAGE

Depends on:

- Lack of available memory ( < {$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})

Lack of available memory ( < {$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})

-

{TEMPLATE_NAME:vm.memory.size[available].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory by Zabbix agent:vm.memory.size[total].last()}>0AVERAGE
High swap space usage ( less than {$SWAP.PFREE.MIN.WARN}% free)

This trigger is ignored, if there is no swap configured

{TEMPLATE_NAME:system.swap.size[,pfree].min(5m)}<{$SWAP.PFREE.MIN.WARN} and {Template Module Linux memory by Zabbix agent:system.swap.size[,total].last()}>0WARNING

Depends on:

- High memory utilization ( >{$MEMORY.UTIL.MAX}% for 5m)

- Lack of available memory ( < {$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})

Feedback

Please report any issues with the template at https://support.zabbix.com

Template Module Linux block devices by Zabbix agent

Overview

For Zabbix version: 4.4

Setup

Zabbix configuration

Macros used

NameDescriptionDefault
{$VFS.DEV.DEVNAME.MATCHES}

This macro is used in block devices discovery. Can be overridden on the host or linked template level

.+
{$VFS.DEV.DEVNAME.NOT_MATCHES}

This macro is used in block devices discovery. Can be overridden on the host or linked template level

`^(loop[0-9]*
{$VFS.DEV.READ.AWAIT.WARN}

Disk read average response time (in ms) before the trigger would fire

20
{$VFS.DEV.WRITE.AWAIT.WARN}

Disk write average response time (in ms) before the trigger would fire

20

Template links

There are no template links in this template.

Discovery rules

NameDescriptionTypeKey and additional info
Block devices discovery

-

DEPENDENTvfs.dev.discovery

Preprocessing:

- JSONPATH: $.lld

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Filter:

AND

- A: { #DEVNAME} MATCHES_REGEX {$VFS.DEV.DEVNAME.MATCHES}

- B: { #DEVNAME} NOT_MATCHES_REGEX {$VFS.DEV.DEVNAME.NOT_MATCHES}

Items collected

GroupNameDescriptionTypeKey and additional info
Storage{ #DEVNAME}: Disk read rate

r/s. The number (after merges) of read requests completed per second for the device.

DEPENDENTvfs.dev.read.rate[{ #DEVNAME}]

Preprocessing:

- JSONPATH: $.values['{ #DEVNAME}'][3]

- CHANGE_PER_SECOND

Storage{ #DEVNAME}: Disk write rate

w/s. The number (after merges) of write requests completed per second for the device.

DEPENDENTvfs.dev.write.rate[{ #DEVNAME}]

Preprocessing:

- JSONPATH: $.values['{ #DEVNAME}'][7]

- CHANGE_PER_SECOND

Storage{ #DEVNAME}: Disk read request avg waiting time (r_await)

This formula contains two boolean expressions that evaluates to 1 or 0 in order to set calculated metric to zero and to avoid division by zero exception.

CALCULATEDvfs.dev.read.await[{ #DEVNAME}]

Expression:

(last("vfs.dev.read.time.rate[{ #DEVNAME}]")/(last("vfs.dev.read.rate[{ #DEVNAME}]")+(last("vfs.dev.read.rate[{ #DEVNAME}]")=0)))*1000*(last("vfs.dev.read.rate[{ #DEVNAME}]") > 0)
Storage{ #DEVNAME}: Disk write request avg waiting time (w_await)

This formula contains two boolean expressions that evaluates to 1 or 0 in order to set calculated metric to zero and to avoid division by zero exception.

CALCULATEDvfs.dev.write.await[{ #DEVNAME}]

Expression:

(last("vfs.dev.write.time.rate[{ #DEVNAME}]")/(last("vfs.dev.write.rate[{ #DEVNAME}]")+(last("vfs.dev.write.rate[{ #DEVNAME}]")=0)))*1000*(last("vfs.dev.write.rate[{ #DEVNAME}]") > 0)
Storage{ #DEVNAME}: Disk average queue size (avgqu-sz)

-

DEPENDENTvfs.dev.queue_size[{ #DEVNAME}]

Preprocessing:

- JSONPATH: $.values['{ #DEVNAME}'][13]

- CHANGE_PER_SECOND

- MULTIPLIER: 0.001

Storage{ #DEVNAME}: Disk utilization

-

DEPENDENTvfs.dev.util[{ #DEVNAME}]

Preprocessing:

- JSONPATH: $.values['{ #DEVNAME}'][12]

- CHANGE_PER_SECOND

- MULTIPLIER: 0.1

Zabbix_raw_itemsGet /proc/diskstats

-

ZABBIX_PASSIVEvfs.file.contents[/proc/diskstats]

Preprocessing:

- JAVASCRIPT: var parsed = value.split("\n").reduce(function(acc, x, i) { parts = x.trim().split(/ +/) acc["values"][parts[2]] = parts acc["lld"].push({"{ #DEVNAME}":parts[2]}) return acc; }, {"values":{}, "lld": []}); return JSON.stringify(parsed);

Zabbix_raw_items{ #DEVNAME}: Disk read time (rate)

Rate of total read time counter. Used in r_await calculation

DEPENDENTvfs.dev.read.time.rate[{ #DEVNAME}]

Preprocessing:

- JSONPATH: $.values['{ #DEVNAME}'][6]

- CHANGE_PER_SECOND

- MULTIPLIER: 0.001

Zabbix_raw_items{ #DEVNAME}: Disk write time (rate)

Rate of total write time counter. Used in w_await calculation

DEPENDENTvfs.dev.write.time.rate[{ #DEVNAME}]

Preprocessing:

- JSONPATH: $.values['{ #DEVNAME}'][10]

- CHANGE_PER_SECOND

- MULTIPLIER: 0.001

Triggers

NameDescriptionExpressionSeverityDependencies and additional info
{ #DEVNAME}: Disk read/write request response are too high (read > {$VFS.DEV.READ.AWAIT.WARN:"{ #DEVNAME}"} ms for 15m or write > {$VFS.DEV.WRITE.AWAIT.WARN:"{ #DEVNAME}"} ms for 15m)

This trigger might indicate disk { #DEVNAME} saturation.

{TEMPLATE_NAME:vfs.dev.read.await[{ #DEVNAME}].min(15m)} > {$VFS.DEV.READ.AWAIT.WARN:"{ #DEVNAME}"} or {Template Module Linux block devices by Zabbix agent:vfs.dev.write.await[{ #DEVNAME}].min(15m)} > {$VFS.DEV.WRITE.AWAIT.WARN:"{ #DEVNAME}"}WARNING

Manual close: YES

Feedback

Please report any issues with the template at https://support.zabbix.com

Template Module Linux network interfaces by Zabbix agent

Overview

For Zabbix version: 4.4

Setup

Refer to the vendor documentation.

Zabbix configuration

No specific Zabbix configuration is required.

Macros used

NameDescriptionDefault
{$IF.ERRORS.WARN}

-

2
{$IF.UTIL.MAX}

-

90
{$IFCONTROL}

-

1
{$NET.IF.IFNAME.MATCHES}

-

^.*$
{$NET.IF.IFNAME.NOT_MATCHES}

Filter out loopbacks, nulls, docker veth links and docker0 bridge by default

`(^Software Loopback Interface

Template links

There are no template links in this template.

Discovery rules

NameDescriptionTypeKey and additional info
Network interface discovery

Discovery of network interfaces.

ZABBIX_PASSIVEnet.if.discovery

Filter:

AND

- A: { #IFNAME} MATCHES_REGEX {$NET.IF.IFNAME.MATCHES}

- B: { #IFNAME} NOT_MATCHES_REGEX {$NET.IF.IFNAME.NOT_MATCHES}

Items collected

GroupNameDescriptionTypeKey and additional info
Network_interfacesInterface { #IFNAME}: Bits receivedZABBIX_PASSIVEnet.if.in["{ #IFNAME}"]

Preprocessing:

- CHANGE_PER_SECOND

- MULTIPLIER: 8

Network_interfacesInterface { #IFNAME}: Bits sentZABBIX_PASSIVEnet.if.out["{ #IFNAME}"]

Preprocessing:

- CHANGE_PER_SECOND

- MULTIPLIER: 8

Network_interfacesInterface { #IFNAME}: Outbound packets with errorsZABBIX_PASSIVEnet.if.out["{ #IFNAME}",errors]

Preprocessing:

- CHANGE_PER_SECOND

Network_interfacesInterface { #IFNAME}: Inbound packets with errorsZABBIX_PASSIVEnet.if.in["{ #IFNAME}",errors]

Preprocessing:

- CHANGE_PER_SECOND

Network_interfacesInterface { #IFNAME}: Outbound packets discardedZABBIX_PASSIVEnet.if.out["{ #IFNAME}",dropped]

Preprocessing:

- CHANGE_PER_SECOND

Network_interfacesInterface { #IFNAME}: Inbound packets discardedZABBIX_PASSIVEnet.if.in["{ #IFNAME}",dropped]

Preprocessing:

- CHANGE_PER_SECOND

Network_interfacesInterface { #IFNAME}: Operational status

Indicates the interface RFC2863 operational state as a string.

Possible values are:"unknown", "notpresent", "down", "lowerlayerdown", "testing","dormant", "up".

Reference: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net

ZABBIX_PASSIVEvfs.file.contents["/sys/class/net/{ #IFNAME}/operstate"]

Preprocessing:

- JAVASCRIPT: var newvalue; switch(value) { case "up": newvalue = 1; break; case "down": newvalue = 2; break; case "testing": newvalue = 4; break; case "unknown": newvalue = 5; break; case "dormant": newvalue = 6; break; case "notPresent": newvalue = 7; break; default: newvalue = "Problem parsing interface operstate in JS"; } return newvalue;

Network_interfacesInterface { #IFNAME}: Interface type

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

ZABBIX_PASSIVEvfs.file.contents["/sys/class/net/{ #IFNAME}/type"]

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Triggers

NameDescriptionExpressionSeverityDependencies and additional info
Interface { #IFNAME}: High error rate ( > {$IF.ERRORS.WARN:"{ #IFNAME}"} for 5m)

Recovers when below 80% of {$IF.ERRORS.WARN:"{ #IFNAME}"} threshold

{TEMPLATE_NAME:net.if.in["{ #IFNAME}",errors].min(5m)}>{$IF.ERRORS.WARN:"{ #IFNAME}"} or {Template Module Linux network interfaces by Zabbix agent:net.if.out["{ #IFNAME}",errors].min(5m)}>{$IF.ERRORS.WARN:"{ #IFNAME}"}

Recovery expression:

{TEMPLATE_NAME:net.if.in["{ #IFNAME}",errors].max(5m)}<{$IF.ERRORS.WARN:"{ #IFNAME}"}*0.8 and {Template Module Linux network interfaces by Zabbix agent:net.if.out["{ #IFNAME}",errors].max(5m)}<{$IF.ERRORS.WARN:"{ #IFNAME}"}*0.8
WARNING

Manual close: YES

Depends on:

- Interface { #IFNAME}: Link down

Interface { #IFNAME}: Link down

This trigger expression works as follows:

1. Can be triggered if operations status is down.

2. {$IFCONTROL:"{ #IFNAME}"}=1 - user can redefine Context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.

3. {TEMPLATE_NAME:METRIC.diff()}=1) - trigger fires only if operational status was up(1) sometime before. (So, do not fire 'ethernal off' interfaces.)

WARNING: if closed manually - won't fire again on next poll, because of .diff.

{$IFCONTROL:"{ #IFNAME}"}=1 and ({TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/operstate"].last()}=2 and {TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/operstate"].diff()}=1)

Recovery expression:

{TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/operstate"].last()}<>2
AVERAGE

Manual close: YES

Interface { #IFNAME}: Ethernet has changed to lower speed than it was before

This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Ack to close.

{TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/type"].change()}<0 and {TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/type"].last()}>0 and ({Template Module Linux network interfaces by Zabbix agent:vfs.file.contents["/sys/class/net/{ #IFNAME}/type"].last()}=6 or {Template Module Linux network interfaces by Zabbix agent:vfs.file.contents["/sys/class/net/{ #IFNAME}/type"].last()}=1) and ({Template Module Linux network interfaces by Zabbix agent:vfs.file.contents["/sys/class/net/{ #IFNAME}/operstate"].last()}<>2)

Recovery expression:

({TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/type"].change()}>0 and {TEMPLATE_NAME:vfs.file.contents["/sys/class/net/{ #IFNAME}/type"].prev()}>0) or ({Template Module Linux network interfaces by Zabbix agent:vfs.file.contents["/sys/class/net/{ #IFNAME}/operstate"].last()}=2)
INFO

Manual close: YES

Depends on:

- Interface { #IFNAME}: Link down

Feedback

Please report any issues with the template at https://support.zabbix.com

Known Issues

  • Description: High interface utilization trigger is removed, since current it is not possible to retrieve interface speed to determine the max bandwidth.

Template Module Linux generic by Zabbix agent

Overview

For Zabbix version: 4.4

Setup

Zabbix configuration

Macros used

NameDescriptionDefault
{$KERNEL.MAXFILES.MIN}

-

256
{$KERNEL.MAXPROC.MIN}

-

1024
{$SYSTEM.FUZZYTIME.MAX}

-

60

Template links

There are no template links in this template.

Discovery rules

Items collected

GroupNameDescriptionTypeKey and additional info
GeneralSystem boot time

-

ZABBIX_PASSIVEsystem.boottime

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1h

GeneralSystem local time

-

ZABBIX_PASSIVEsystem.localtime
GeneralSystem name

System host name.

ZABBIX_PASSIVEsystem.hostname

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1h

GeneralSystem description

The information as normally returned by 'uname -a'.

ZABBIX_PASSIVEsystem.uname

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

GeneralNumber of logged in users

Number of users who are currently logged in.

ZABBIX_PASSIVEsystem.users.num
GeneralMaximum number of open file descriptors

It could be increased by using sysctrl utility or modifying file /etc/sysctl.conf.

ZABBIX_PASSIVEkernel.maxfiles

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

GeneralMaximum number of processes

It could be increased by using sysctrl utility or modifying file /etc/sysctl.conf.

ZABBIX_PASSIVEkernel.maxproc

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

GeneralNumber of processes

-

ZABBIX_PASSIVEproc.num
GeneralNumber of running processes

-

ZABBIX_PASSIVEproc.num[,,run]
InventoryOperating system

-

ZABBIX_PASSIVEsystem.sw.os

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

InventoryOperating system architecture

-

ZABBIX_PASSIVEsystem.sw.arch

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

InventorySoftware installed

-

ZABBIX_PASSIVEsystem.sw.packages

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

SecurityChecksum of /etc/passwd

-

ZABBIX_PASSIVEvfs.file.cksum[/etc/passwd]

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1h

StatusSystem uptime

-

ZABBIX_PASSIVEsystem.uptime

Triggers

NameDescriptionExpressionSeverityDependencies and additional info
System time is out of sync (diff with Zabbix server > {$SYSTEM.FUZZYTIME.MAX}s)

-

{TEMPLATE_NAME:system.localtime.fuzzytime({$SYSTEM.FUZZYTIME.MAX})}=0WARNING

Manual close: YES

System name has changed (new name: {ITEM.VALUE})

System name has changed. Ack to close.

{TEMPLATE_NAME:system.hostname.diff()}=1 and {TEMPLATE_NAME:system.hostname.strlen()}>0INFO

Manual close: YES

Configured max number of open filedescriptors is too low (< {$KERNEL.MAXFILES.MIN})

-

{TEMPLATE_NAME:kernel.maxfiles.last()}<{$KERNEL.MAXFILES.MIN}INFO
Configured max number of processes is too low (< {$KERNEL.MAXPROC.MIN})

-

{TEMPLATE_NAME:kernel.maxproc.last()}<{$KERNEL.MAXPROC.MIN}INFO

Depends on:

- Getting closer to process limit (over 80% used)

Getting closer to process limit (over 80% used)

-

{TEMPLATE_NAME:proc.num.last()}/{Template Module Linux generic by Zabbix agent:kernel.maxproc.last()}*100>80WARNING
Operating system description has changed

Operating system description has changed. Possible reasons that system has been updated or replaced. Ack to close.

{TEMPLATE_NAME:system.sw.os.diff()}=1 and {TEMPLATE_NAME:system.sw.os.strlen()}>0INFO

Manual close: YES

Depends on:

- System name has changed (new name: {ITEM.VALUE})

/etc/passwd has been changed

-

{TEMPLATE_NAME:vfs.file.cksum[/etc/passwd].diff()}>0INFO

Manual close: YES

Depends on:

- Operating system description has changed

- System name has changed (new name: {ITEM.VALUE})

{HOST.NAME} has been restarted (uptime < 10m)

The host uptime is less than 10 minutes

{TEMPLATE_NAME:system.uptime.last()}<10mWARNING

Manual close: YES

Feedback

Please report any issues with the template at https://support.zabbix.com

Template OS Linux by Zabbix agent

Overview

For Zabbix version: 4.4
New official Linux template. Requires agent of Zabbix 3.0.14, 3.4.5 and 4.0.0 or newer.

Setup

Install Zabbix agent to Linux OS according to Zabbix documentation.

Zabbix configuration

No specific Zabbix configuration is required.

Template links

Name
Template Module Linux CPU by Zabbix agent
Template Module Linux block devices by Zabbix agent
Template Module Linux filesystems by Zabbix agent
Template Module Linux generic by Zabbix agent
Template Module Linux memory by Zabbix agent
Template Module Linux network interfaces by Zabbix agent
Template Module Zabbix agent

Discovery rules

Items collected

GroupNameDescriptionTypeKey and additional info

Triggers

NameDescriptionExpressionSeverityDependencies and additional info

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.

Known Issues

  • Description: Network discovery. Zabbix agent as of 4.2 doesn't support items such as net.if.status, net.if.speed.

Articles and documentation

+ Propose new article
Add your solution