VOOZH about

URL: https://www.zabbix.com/integrations/freebsd

⇱ FreeBSD monitoring and integration with Zabbix


Propose integration

FreeBSD

FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution, which was based on Research Unix. The first version of FreeBSD was released in 1993.

Available solutions




This template is for Zabbix version: 7.4

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/freebsd?at=release/7.4

FreeBSD by Zabbix agent

Overview

This is an official FreeBSD template. It requires Zabbix agent 7.4 or newer.

Notes on filesystem (FS) discovery:

  • The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
  • BTRFS allocates a default of 10% of the volume for its own needs.
  • To mitigate potential disasters, FS usage triggers are based on the maximum available space.
    • Utilization formula: pused = 100 - 100 * (available / total - free + available)
  • The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.

Requirements

Zabbix version: 7.4 and higher.

Tested versions

This template has been tested on:

  • FreeBSD

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

Install Zabbix agent on FreeBSD according to Zabbix documentation.

Macros used

Name Description Default
{$AGENT.TIMEOUT}

Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).

3m
{$VFS.FS.FSNAME.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

^(/dev|/sys|/run|/proc|.+/shm$)
{$VFS.FS.FSNAME.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

.+
{$VFS.FS.FSTYPE.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

Macro too long. Please see the template.
{$VFS.FS.FSTYPE.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

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

The critical threshold of the filesystem metadata utilization.

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

The warning threshold of the filesystem metadata utilization.

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

The critical threshold of the filesystem utilization.

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

The warning threshold of the filesystem utilization.

80

Items

Name Description Type Key and additional info
Maximum number of opened files

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxfiles
Maximum number of processes

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxproc
Number of running processes

Number of processes in a running state.

Zabbix agent proc.num[,,run]
Number of processes

Total number of processes in any state.

Zabbix agent proc.num[]
Host boot time Zabbix agent system.boottime
Interrupts per second

Number of interrupts processed.

Zabbix agent system.cpu.intr

Preprocessing

  • Change per second:
Processor load (1 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg1]
Processor load (5 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg5]
Processor load (15 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg15]
Context switches per second

The combined rate at which all processors on the computer are switched from one thread to another.

Zabbix agent system.cpu.switches

Preprocessing

  • Change per second:
CPU idle time

Time the CPU has spent doing nothing.

Zabbix agent system.cpu.util[,idle]
CPU interrupt time

Time the CPU has spent servicing hardware interrupts.

Zabbix agent system.cpu.util[,interrupt]
CPU nice time

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

Zabbix agent system.cpu.util[,nice]
CPU system time

Time the CPU has spent running the kernel and its processes.

Zabbix agent system.cpu.util[,system]
CPU user time

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

Zabbix agent system.cpu.util[,user]
Host name

The host name of the system.

Zabbix agent system.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

Host local time

The local system time of the host.

Zabbix agent system.localtime
Free swap space

The free space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,free]
Free swap space in %

The free space of the swap volume/file expressed in %.

Zabbix agent system.swap.size[,pfree]
Total swap space

Total space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,total]
System information

Information as normally returned by uname -a.

Zabbix agent system.uname

Preprocessing

  • Discard unchanged with heartbeat: 1d

System uptime Zabbix agent system.uptime
Number of logged in users

The number of users who are currently logged in.

Zabbix agent system.users.num
Checksum of /etc/passwd Zabbix agent vfs.file.cksum[/etc/passwd,sha256]

Preprocessing

  • Discard unchanged with heartbeat: 1h

Available memory

Defined as free + cached + buffers.

Zabbix agent vm.memory.size[available]
Total memory

Total memory expressed in bytes.

Zabbix agent vm.memory.size[total]
Version of Zabbix agent running Zabbix agent agent.version

Preprocessing

  • Discard unchanged with heartbeat: 1d

Host name of Zabbix agent running Zabbix agent agent.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

Zabbix agent ping

The agent always returns "1" for this item. May be used in combination with nodata() for the availability check.

Zabbix agent agent.ping
Zabbix agent availability

Used for monitoring the availability status of the agent.

Zabbix internal zabbix[host,agent,available]
Get filesystems

The vfs.fs.get key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.

Zabbix agent vfs.fs.get

Triggers

Name Description Expression Severity Dependencies and additional info
FreeBSD: Configured max number of opened files is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024 Info
FreeBSD: Configured max number of processes is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxproc)<256 Info
FreeBSD: Too many processes running on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30 Warning
FreeBSD: Too many processes on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300 Warning
FreeBSD: Processor load is too high on {HOST.NAME} avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 Warning
FreeBSD: Hostname was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2) Info
FreeBSD: Lack of free swap space on {HOST.NAME}

The system might need more physical memory.

last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50 Warning
FreeBSD: Host information was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2) Info
FreeBSD: {HOST.NAME} has just been restarted change(/FreeBSD by Zabbix agent/system.uptime)<0 Info
FreeBSD: /etc/passwd has been changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) Warning
FreeBSD: Lack of available memory on server {HOST.NAME} last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M Average
FreeBSD: Zabbix agent is not available

For passive checks only. The availability of the agent(s) and a host is used with {$AGENT.TIMEOUT} as the time threshold.

max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 Average Manual close: Yes

LLD rule Network interface discovery

Name Description Type Key and additional info
Network interface discovery

Used for the discovery of network interfaces.

Zabbix agent net.if.discovery

Item prototypes for Network interface discovery

Name Description Type Key and additional info
Interface {#IFNAME}: Incoming network traffic Zabbix agent net.if.in[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

Interface {#IFNAME}: Outgoing network traffic Zabbix agent net.if.out[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

LLD rule Mounted filesystem discovery

Name Description Type Key and additional info
Mounted filesystem discovery

The discovery of mounted filesystems with different types.

Dependent item vfs.fs.dependent.discovery

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Item prototypes for Mounted filesystem discovery

Name Description Type Key and additional info
FS [{#FSNAME}]: Get data

Intermediate data of {#FSNAME} filesystem.

Dependent item vfs.fs.dependent[{#FSNAME},data]

Preprocessing

  • JSON Path: $.[?(@.fsname=='{#FSNAME}')].first()

FS [{#FSNAME}]: Option: Read-only

The filesystem is mounted as read-only. It is available only for Zabbix agents 6.4 and higher.

Dependent item vfs.fs.dependent[{#FSNAME},readonly]

Preprocessing

  • JSON Path: $.options

    ⛔️Custom on fail: Discard value

  • Regular expression: `(?:^

FS [{#FSNAME}]: Inodes: Free, in %

Free metadata space expressed in %.

Dependent item vfs.fs.dependent.inode[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.inodes.pfree

FS [{#FSNAME}]: Space: Available

Available storage space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},free]

Preprocessing

  • JSON Path: $.bytes.free

FS [{#FSNAME}]: Space: Available, in %

Deprecated metric.

Space availability expressed as a percentage, calculated using the current and maximum available spaces.

Dependent item vfs.fs.dependent.size[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.bytes.pfree

FS [{#FSNAME}]: Space: Used, in %

Calculated as the percentage of currently used space compared to the maximum available space.

Dependent item vfs.fs.dependent.size[{#FSNAME},pused]

Preprocessing

  • JSON Path: $.bytes.pused

FS [{#FSNAME}]: Space: Total

Total space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},total]

Preprocessing

  • JSON Path: $.bytes.total

FS [{#FSNAME}]: Space: Used

Used storage expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},used]

Preprocessing

  • JSON Path: $.bytes.used

Trigger prototypes for Mounted filesystem discovery

Name Description Expression Severity Dependencies and additional info
FreeBSD: FS [{#FSNAME}]: Filesystem has become read-only

The filesystem has become read-only, possibly due to an I/O error. Available only for Zabbix agents 6.4 and higher.

last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly],#2)=0 and last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=1 Average Manual close: Yes
FreeBSD: FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"} Average
FreeBSD: FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"} Warning Depends on:
  • FreeBSD: FS [{#FSNAME}]: Running out of free inodes
FreeBSD: FS [{#FSNAME}]: Space is critically low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} Average Manual close: Yes
FreeBSD: FS [{#FSNAME}]: Space is low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} Warning Manual close: Yes
Depends on:
  • FreeBSD: FS [{#FSNAME}]: Space is critically low

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 at ZABBIX forums

This template is for Zabbix version: 7.2

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/freebsd?at=release/7.2

FreeBSD by Zabbix agent

Overview

This is an official FreeBSD template. It requires Zabbix agent 7.2 or newer.

Notes on filesystem (FS) discovery:

  • The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
  • BTRFS allocates a default of 10% of the volume for its own needs.
  • To mitigate potential disasters, FS usage triggers are based on the maximum available space.
    • Utilization formula: pused = 100 - 100 * (available / total - free + available)
  • The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.

Requirements

Zabbix version: 7.2 and higher.

Tested versions

This template has been tested on:

  • FreeBSD

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

Install Zabbix agent on FreeBSD according to Zabbix documentation.

Macros used

Name Description Default
{$AGENT.TIMEOUT}

Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).

3m
{$VFS.FS.FSNAME.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

^(/dev|/sys|/run|/proc|.+/shm$)
{$VFS.FS.FSNAME.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

.+
{$VFS.FS.FSTYPE.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

Macro too long. Please see the template.
{$VFS.FS.FSTYPE.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

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

The critical threshold of the filesystem metadata utilization.

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

The warning threshold of the filesystem metadata utilization.

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

The critical threshold of the filesystem utilization.

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

The warning threshold of the filesystem utilization.

80

Items

Name Description Type Key and additional info
Maximum number of opened files

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxfiles
Maximum number of processes

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxproc
Number of running processes

Number of processes in a running state.

Zabbix agent proc.num[,,run]
Number of processes

Total number of processes in any state.

Zabbix agent proc.num[]
Host boot time Zabbix agent system.boottime
Interrupts per second

Number of interrupts processed.

Zabbix agent system.cpu.intr

Preprocessing

  • Change per second:
Processor load (1 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg1]
Processor load (5 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg5]
Processor load (15 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg15]
Context switches per second

The combined rate at which all processors on the computer are switched from one thread to another.

Zabbix agent system.cpu.switches

Preprocessing

  • Change per second:
CPU idle time

Time the CPU has spent doing nothing.

Zabbix agent system.cpu.util[,idle]
CPU interrupt time

Time the CPU has spent servicing hardware interrupts.

Zabbix agent system.cpu.util[,interrupt]
CPU nice time

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

Zabbix agent system.cpu.util[,nice]
CPU system time

Time the CPU has spent running the kernel and its processes.

Zabbix agent system.cpu.util[,system]
CPU user time

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

Zabbix agent system.cpu.util[,user]
Host name

The host name of the system.

Zabbix agent system.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

Host local time

The local system time of the host.

Zabbix agent system.localtime
Free swap space

The free space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,free]
Free swap space in %

The free space of the swap volume/file expressed in %.

Zabbix agent system.swap.size[,pfree]
Total swap space

Total space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,total]
System information

Information as normally returned by uname -a.

Zabbix agent system.uname

Preprocessing

  • Discard unchanged with heartbeat: 1d

System uptime Zabbix agent system.uptime
Number of logged in users

The number of users who are currently logged in.

Zabbix agent system.users.num
Checksum of /etc/passwd Zabbix agent vfs.file.cksum[/etc/passwd,sha256]

Preprocessing

  • Discard unchanged with heartbeat: 1h

Available memory

Defined as free + cached + buffers.

Zabbix agent vm.memory.size[available]
Total memory

Total memory expressed in bytes.

Zabbix agent vm.memory.size[total]
Version of Zabbix agent running Zabbix agent agent.version

Preprocessing

  • Discard unchanged with heartbeat: 1d

Host name of Zabbix agent running Zabbix agent agent.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

Zabbix agent ping

The agent always returns "1" for this item. May be used in combination with nodata() for the availability check.

Zabbix agent agent.ping
Zabbix agent availability

Used for monitoring the availability status of the agent.

Zabbix internal zabbix[host,agent,available]
Get filesystems

The vfs.fs.get key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.

Zabbix agent vfs.fs.get

Triggers

Name Description Expression Severity Dependencies and additional info
FreeBSD: Configured max number of opened files is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024 Info
FreeBSD: Configured max number of processes is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxproc)<256 Info
FreeBSD: Too many processes running on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30 Warning
FreeBSD: Too many processes on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300 Warning
FreeBSD: Processor load is too high on {HOST.NAME} avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 Warning
FreeBSD: Hostname was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2) Info
FreeBSD: Lack of free swap space on {HOST.NAME}

The system might need more physical memory.

last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50 Warning
FreeBSD: Host information was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2) Info
FreeBSD: {HOST.NAME} has just been restarted change(/FreeBSD by Zabbix agent/system.uptime)<0 Info
FreeBSD: /etc/passwd has been changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) Warning
FreeBSD: Lack of available memory on server {HOST.NAME} last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M Average
FreeBSD: Zabbix agent is not available

For passive checks only. The availability of the agent(s) and a host is used with {$AGENT.TIMEOUT} as the time threshold.

max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 Average Manual close: Yes

LLD rule Network interface discovery

Name Description Type Key and additional info
Network interface discovery

Used for the discovery of network interfaces.

Zabbix agent net.if.discovery

Item prototypes for Network interface discovery

Name Description Type Key and additional info
Interface {#IFNAME}: Incoming network traffic Zabbix agent net.if.in[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

Interface {#IFNAME}: Outgoing network traffic Zabbix agent net.if.out[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

LLD rule Mounted filesystem discovery

Name Description Type Key and additional info
Mounted filesystem discovery

The discovery of mounted filesystems with different types.

Dependent item vfs.fs.dependent.discovery

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Item prototypes for Mounted filesystem discovery

Name Description Type Key and additional info
FS [{#FSNAME}]: Get data

Intermediate data of {#FSNAME} filesystem.

Dependent item vfs.fs.dependent[{#FSNAME},data]

Preprocessing

  • JSON Path: $.[?(@.fsname=='{#FSNAME}')].first()

FS [{#FSNAME}]: Option: Read-only

The filesystem is mounted as read-only. It is available only for Zabbix agents 6.4 and higher.

Dependent item vfs.fs.dependent[{#FSNAME},readonly]

Preprocessing

  • JSON Path: $.options

    ⛔️Custom on fail: Discard value

  • Regular expression: `(?:^

FS [{#FSNAME}]: Inodes: Free, in %

Free metadata space expressed in %.

Dependent item vfs.fs.dependent.inode[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.inodes.pfree

FS [{#FSNAME}]: Space: Available

Available storage space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},free]

Preprocessing

  • JSON Path: $.bytes.free

FS [{#FSNAME}]: Space: Available, in %

Deprecated metric.

Space availability expressed as a percentage, calculated using the current and maximum available spaces.

Dependent item vfs.fs.dependent.size[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.bytes.pfree

FS [{#FSNAME}]: Space: Used, in %

Calculated as the percentage of currently used space compared to the maximum available space.

Dependent item vfs.fs.dependent.size[{#FSNAME},pused]

Preprocessing

  • JSON Path: $.bytes.pused

FS [{#FSNAME}]: Space: Total

Total space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},total]

Preprocessing

  • JSON Path: $.bytes.total

FS [{#FSNAME}]: Space: Used

Used storage expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},used]

Preprocessing

  • JSON Path: $.bytes.used

Trigger prototypes for Mounted filesystem discovery

Name Description Expression Severity Dependencies and additional info
FreeBSD: FS [{#FSNAME}]: Filesystem has become read-only

The filesystem has become read-only, possibly due to an I/O error. Available only for Zabbix agents 6.4 and higher.

last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly],#2)=0 and last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=1 Average Manual close: Yes
FreeBSD: FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"} Average
FreeBSD: FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"} Warning Depends on:
  • FreeBSD: FS [{#FSNAME}]: Running out of free inodes
FreeBSD: FS [{#FSNAME}]: Space is critically low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} Average Manual close: Yes
FreeBSD: FS [{#FSNAME}]: Space is low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} Warning Manual close: Yes
Depends on:
  • FreeBSD: FS [{#FSNAME}]: Space is critically low

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 at ZABBIX forums

This template is for Zabbix version: 7.0

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/freebsd?at=release/7.0

FreeBSD by Zabbix agent

Overview

This is an official FreeBSD template. It requires Zabbix agent 7.0 or newer.

Notes on filesystem (FS) discovery:

  • The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
  • BTRFS allocates a default of 10% of the volume for its own needs.
  • To mitigate potential disasters, FS usage triggers are based on the maximum available space.
    • Utilization formula: pused = 100 - 100 * (available / total - free + available)
  • The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.

Requirements

Zabbix version: 7.0 and higher.

Tested versions

This template has been tested on:

  • FreeBSD

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

Install Zabbix agent on FreeBSD according to Zabbix documentation.

Macros used

Name Description Default
{$AGENT.TIMEOUT}

Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).

3m
{$VFS.FS.FSNAME.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

^(/dev|/sys|/run|/proc|.+/shm$)
{$VFS.FS.FSNAME.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

.+
{$VFS.FS.FSTYPE.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

Macro too long. Please see the template.
{$VFS.FS.FSTYPE.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

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

The critical threshold of the filesystem metadata utilization.

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

The warning threshold of the filesystem metadata utilization.

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

The critical threshold of the filesystem utilization.

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

The warning threshold of the filesystem utilization.

80

Items

Name Description Type Key and additional info
Maximum number of opened files

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxfiles
Maximum number of processes

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxproc
Number of running processes

Number of processes in a running state.

Zabbix agent proc.num[,,run]
Number of processes

Total number of processes in any state.

Zabbix agent proc.num[]
Host boot time Zabbix agent system.boottime
Interrupts per second

Number of interrupts processed.

Zabbix agent system.cpu.intr

Preprocessing

  • Change per second:
Processor load (1 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg1]
Processor load (5 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg5]
Processor load (15 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg15]
Context switches per second

The combined rate at which all processors on the computer are switched from one thread to another.

Zabbix agent system.cpu.switches

Preprocessing

  • Change per second:
CPU idle time

Time the CPU has spent doing nothing.

Zabbix agent system.cpu.util[,idle]
CPU interrupt time

Time the CPU has spent servicing hardware interrupts.

Zabbix agent system.cpu.util[,interrupt]
CPU nice time

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

Zabbix agent system.cpu.util[,nice]
CPU system time

Time the CPU has spent running the kernel and its processes.

Zabbix agent system.cpu.util[,system]
CPU user time

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

Zabbix agent system.cpu.util[,user]
Host name

The host name of the system.

Zabbix agent system.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

Host local time

The local system time of the host.

Zabbix agent system.localtime
Free swap space

The free space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,free]
Free swap space in %

The free space of the swap volume/file expressed in %.

Zabbix agent system.swap.size[,pfree]
Total swap space

Total space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,total]
System information

Information as normally returned by uname -a.

Zabbix agent system.uname

Preprocessing

  • Discard unchanged with heartbeat: 1d

System uptime Zabbix agent system.uptime
Number of logged in users

The number of users who are currently logged in.

Zabbix agent system.users.num
Checksum of /etc/passwd Zabbix agent vfs.file.cksum[/etc/passwd,sha256]

Preprocessing

  • Discard unchanged with heartbeat: 1h

Available memory

Defined as free + cached + buffers.

Zabbix agent vm.memory.size[available]
Total memory

Total memory expressed in bytes.

Zabbix agent vm.memory.size[total]
Version of Zabbix agent running Zabbix agent agent.version

Preprocessing

  • Discard unchanged with heartbeat: 1d

Host name of Zabbix agent running Zabbix agent agent.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

Zabbix agent ping

The agent always returns "1" for this item. May be used in combination with nodata() for the availability check.

Zabbix agent agent.ping
Zabbix agent availability

Used for monitoring the availability status of the agent.

Zabbix internal zabbix[host,agent,available]
Get filesystems

The vfs.fs.get key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.

Zabbix agent vfs.fs.get

Triggers

Name Description Expression Severity Dependencies and additional info
FreeBSD: Configured max number of opened files is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024 Info
FreeBSD: Configured max number of processes is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxproc)<256 Info
FreeBSD: Too many processes running on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30 Warning
FreeBSD: Too many processes on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300 Warning
FreeBSD: Processor load is too high on {HOST.NAME} avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 Warning
FreeBSD: Hostname was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2) Info
FreeBSD: Lack of free swap space on {HOST.NAME}

The system might need more physical memory.

last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50 Warning
FreeBSD: Host information was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2) Info
FreeBSD: {HOST.NAME} has just been restarted change(/FreeBSD by Zabbix agent/system.uptime)<0 Info
FreeBSD: /etc/passwd has been changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) Warning
FreeBSD: Lack of available memory on server {HOST.NAME} last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M Average
FreeBSD: Zabbix agent is not available

For passive checks only. The availability of the agent(s) and a host is used with {$AGENT.TIMEOUT} as the time threshold.

max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 Average Manual close: Yes

LLD rule Network interface discovery

Name Description Type Key and additional info
Network interface discovery

Used for the discovery of network interfaces.

Zabbix agent net.if.discovery

Item prototypes for Network interface discovery

Name Description Type Key and additional info
Interface {#IFNAME}: Incoming network traffic Zabbix agent net.if.in[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

Interface {#IFNAME}: Outgoing network traffic Zabbix agent net.if.out[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

LLD rule Mounted filesystem discovery

Name Description Type Key and additional info
Mounted filesystem discovery

The discovery of mounted filesystems with different types.

Dependent item vfs.fs.dependent.discovery

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Item prototypes for Mounted filesystem discovery

Name Description Type Key and additional info
FS [{#FSNAME}]: Get data

Intermediate data of {#FSNAME} filesystem.

Dependent item vfs.fs.dependent[{#FSNAME},data]

Preprocessing

  • JSON Path: $.[?(@.fsname=='{#FSNAME}')].first()

FS [{#FSNAME}]: Option: Read-only

The filesystem is mounted as read-only. It is available only for Zabbix agents 6.4 and higher.

Dependent item vfs.fs.dependent[{#FSNAME},readonly]

Preprocessing

  • JSON Path: $.options

    ⛔️Custom on fail: Discard value

  • Regular expression: `(?:^

FS [{#FSNAME}]: Inodes: Free, in %

Free metadata space expressed in %.

Dependent item vfs.fs.dependent.inode[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.inodes.pfree

FS [{#FSNAME}]: Space: Available

Available storage space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},free]

Preprocessing

  • JSON Path: $.bytes.free

FS [{#FSNAME}]: Space: Available, in %

Deprecated metric.

Space availability expressed as a percentage, calculated using the current and maximum available spaces.

Dependent item vfs.fs.dependent.size[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.bytes.pfree

FS [{#FSNAME}]: Space: Used, in %

Calculated as the percentage of currently used space compared to the maximum available space.

Dependent item vfs.fs.dependent.size[{#FSNAME},pused]

Preprocessing

  • JSON Path: $.bytes.pused

FS [{#FSNAME}]: Space: Total

Total space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},total]

Preprocessing

  • JSON Path: $.bytes.total

FS [{#FSNAME}]: Space: Used

Used storage expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},used]

Preprocessing

  • JSON Path: $.bytes.used

Trigger prototypes for Mounted filesystem discovery

Name Description Expression Severity Dependencies and additional info
FreeBSD: FS [{#FSNAME}]: Filesystem has become read-only

The filesystem has become read-only, possibly due to an I/O error. Available only for Zabbix agents 6.4 and higher.

last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly],#2)=0 and last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=1 Average Manual close: Yes
FreeBSD: FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"} Average
FreeBSD: FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"} Warning Depends on:
  • FreeBSD: FS [{#FSNAME}]: Running out of free inodes
FreeBSD: FS [{#FSNAME}]: Space is critically low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} Average Manual close: Yes
FreeBSD: FS [{#FSNAME}]: Space is low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} Warning Manual close: Yes
Depends on:
  • FreeBSD: FS [{#FSNAME}]: Space is critically low

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 at ZABBIX forums

This template is for Zabbix version: 6.4

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/freebsd?at=release/6.4

FreeBSD by Zabbix agent

Overview

This is an official FreeBSD template. It requires Zabbix agent 6.4 or newer.

Notes on filesystem (FS) discovery:

  • The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
  • BTRFS allocates a default of 10% of the volume for its own needs.
  • To mitigate potential disasters, FS usage triggers are based on the maximum available space.
    • Utilization formula: pused = 100 - 100 * (available / total - free + available)
  • The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.

Requirements

Zabbix version: 6.4 and higher.

Tested versions

This template has been tested on:

  • FreeBSD

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

Install Zabbix agent on FreeBSD according to Zabbix documentation.

Macros used

Name Description Default
{$AGENT.TIMEOUT}

Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).

3m
{$VFS.FS.FSNAME.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

^(/dev|/sys|/run|/proc|.+/shm$)
{$VFS.FS.FSNAME.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

.+
{$VFS.FS.FSTYPE.MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

Macro too long. Please see the template.
{$VFS.FS.FSTYPE.NOT_MATCHES}

Used for filesystem discovery. Can be overridden on the host or linked template level.

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

The critical threshold of the filesystem metadata utilization.

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

The warning threshold of the filesystem metadata utilization.

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

The critical threshold of the filesystem utilization.

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

The warning threshold of the filesystem utilization.

80

Items

Name Description Type Key and additional info
FreeBSD: Maximum number of opened files

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxfiles
FreeBSD: Maximum number of processes

May be increased by using the sysctl utility or modifying the file /etc/sysctl.conf.

Zabbix agent kernel.maxproc
FreeBSD: Number of running processes

Number of processes in a running state.

Zabbix agent proc.num[,,run]
FreeBSD: Number of processes

Total number of processes in any state.

Zabbix agent proc.num[]
FreeBSD: Host boot time Zabbix agent system.boottime
FreeBSD: Interrupts per second

Number of interrupts processed.

Zabbix agent system.cpu.intr

Preprocessing

  • Change per second:
FreeBSD: Processor load (1 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg1]
FreeBSD: Processor load (5 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg5]
FreeBSD: Processor load (15 min average per core)

Calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg15]
FreeBSD: Context switches per second

The combined rate at which all processors on the computer are switched from one thread to another.

Zabbix agent system.cpu.switches

Preprocessing

  • Change per second:
FreeBSD: CPU idle time

Time the CPU has spent doing nothing.

Zabbix agent system.cpu.util[,idle]
FreeBSD: CPU interrupt time

Time the CPU has spent servicing hardware interrupts.

Zabbix agent system.cpu.util[,interrupt]
FreeBSD: CPU nice time

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

Zabbix agent system.cpu.util[,nice]
FreeBSD: CPU system time

Time the CPU has spent running the kernel and its processes.

Zabbix agent system.cpu.util[,system]
FreeBSD: CPU user time

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

Zabbix agent system.cpu.util[,user]
FreeBSD: Host name

The host name of the system.

Zabbix agent system.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: Host local time

The local system time of the host.

Zabbix agent system.localtime
FreeBSD: Free swap space

The free space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,free]
FreeBSD: Free swap space in %

The free space of the swap volume/file expressed in %.

Zabbix agent system.swap.size[,pfree]
FreeBSD: Total swap space

Total space of the swap volume/file expressed in bytes.

Zabbix agent system.swap.size[,total]
FreeBSD: System information

Information as normally returned by uname -a.

Zabbix agent system.uname

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: System uptime Zabbix agent system.uptime
FreeBSD: Number of logged in users

The number of users who are currently logged in.

Zabbix agent system.users.num
FreeBSD: Checksum of /etc/passwd Zabbix agent vfs.file.cksum[/etc/passwd,sha256]

Preprocessing

  • Discard unchanged with heartbeat: 1h

FreeBSD: Available memory

Defined as free + cached + buffers.

Zabbix agent vm.memory.size[available]
FreeBSD: Total memory

Total memory expressed in bytes.

Zabbix agent vm.memory.size[total]
FreeBSD: Version of Zabbix agent running Zabbix agent agent.version

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: Host name of Zabbix agent running Zabbix agent agent.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: Zabbix agent ping

The agent always returns "1" for this item. May be used in combination with nodata() for the availability check.

Zabbix agent agent.ping
FreeBSD: Zabbix agent availability

Used for monitoring the availability status of the agent.

Zabbix internal zabbix[host,agent,available]
FreeBSD: Get filesystems

The vfs.fs.get key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.

Zabbix agent vfs.fs.get

Triggers

Name Description Expression Severity Dependencies and additional info
FreeBSD: Configured max number of opened files is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024 Info
FreeBSD: Configured max number of processes is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxproc)<256 Info
FreeBSD: Too many processes running on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30 Warning
FreeBSD: Too many processes on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300 Warning
FreeBSD: Processor load is too high on {HOST.NAME} avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 Warning
FreeBSD: Hostname was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2) Info
FreeBSD: Lack of free swap space on {HOST.NAME}

The system might need more physical memory.

last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50 Warning
FreeBSD: Host information was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2) Info
FreeBSD: {HOST.NAME} has just been restarted change(/FreeBSD by Zabbix agent/system.uptime)<0 Info
FreeBSD: /etc/passwd has been changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) Warning
FreeBSD: Lack of available memory on server {HOST.NAME} last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M Average
FreeBSD: Zabbix agent is not available

For passive checks only. The availability of the agent(s) and a host is used with {$AGENT.TIMEOUT} as the time threshold.

max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 Average Manual close: Yes

LLD rule Network interface discovery

Name Description Type Key and additional info
Network interface discovery

Used for the discovery of network interfaces.

Zabbix agent net.if.discovery

Item prototypes for Network interface discovery

Name Description Type Key and additional info
Interface {#IFNAME}: Incoming network traffic Zabbix agent net.if.in[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

Interface {#IFNAME}: Outgoing network traffic Zabbix agent net.if.out[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

LLD rule Mounted filesystem discovery

Name Description Type Key and additional info
Mounted filesystem discovery

The discovery of mounted filesystems with different types.

Dependent item vfs.fs.dependent.discovery

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Item prototypes for Mounted filesystem discovery

Name Description Type Key and additional info
FS [{#FSNAME}]: Get data

Intermediate data of {#FSNAME} filesystem.

Dependent item vfs.fs.dependent[{#FSNAME},data]

Preprocessing

  • JSON Path: $.[?(@.fsname=='{#FSNAME}')].first()

FS [{#FSNAME}]: Option: Read-only

The filesystem is mounted as read-only. It is available only for Zabbix agents 6.4 and higher.

Dependent item vfs.fs.dependent[{#FSNAME},readonly]

Preprocessing

  • JSON Path: $.options

    ⛔️Custom on fail: Discard value

  • Regular expression: `(?:^

FS [{#FSNAME}]: Inodes: Free, in %

Free metadata space expressed in %.

Dependent item vfs.fs.dependent.inode[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.inodes.pfree

FS [{#FSNAME}]: Space: Available

Available storage space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},free]

Preprocessing

  • JSON Path: $.bytes.free

FS [{#FSNAME}]: Space: Available, in %

Deprecated metric.

Space availability expressed as a percentage, calculated using the current and maximum available spaces.

Dependent item vfs.fs.dependent.size[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.bytes.pfree

FS [{#FSNAME}]: Space: Used, in %

Calculated as the percentage of currently used space compared to the maximum available space.

Dependent item vfs.fs.dependent.size[{#FSNAME},pused]

Preprocessing

  • JSON Path: $.bytes.pused

FS [{#FSNAME}]: Space: Total

Total space expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},total]

Preprocessing

  • JSON Path: $.bytes.total

FS [{#FSNAME}]: Space: Used

Used storage expressed in bytes.

Dependent item vfs.fs.dependent.size[{#FSNAME},used]

Preprocessing

  • JSON Path: $.bytes.used

Trigger prototypes for Mounted filesystem discovery

Name Description Expression Severity Dependencies and additional info
FS [{#FSNAME}]: Filesystem has become read-only

The filesystem has become read-only, possibly due to an I/O error. Available only for Zabbix agents 6.4 and higher.

last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly],#2)=0 and last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=1 Average Manual close: Yes
FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"} Average
FS [{#FSNAME}]: Running out of free inodes

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"} Warning Depends on:
  • FS [{#FSNAME}]: Running out of free inodes
FS [{#FSNAME}]: Space is critically low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} Average Manual close: Yes
FS [{#FSNAME}]: Space is low

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.

min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} Warning Manual close: Yes
Depends on:
  • FS [{#FSNAME}]: Space is critically low

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 at ZABBIX forums

This template is for Zabbix version: 6.2

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/freebsd?at=release/6.2

FreeBSD by Zabbix agent

Overview

For Zabbix version: 6.2 and higher. It is an official FreeBSD template. It requires Zabbix agent 6.0 or newer.

Setup

See Zabbix template operation for basic instructions.

Install Zabbix agent on FreeBSD according to Zabbix documentation.

Zabbix configuration

No specific Zabbix configuration is required.

Macros used

Name Description Default
{$AGENT.TIMEOUT}

The timeout after which the agent is considered unavailable. It works only for the agents reachable from Zabbix server/proxy (in passive mode).

3m

Template links

There are no template links in this template.

Discovery rules

Name Description Type Key and additional info
Mounted filesystem discovery

The discovery of different types of file systems as defined in the global regular expression "File systems for discovery".

ZABBIX_PASSIVE vfs.fs.discovery

Filter:

- {#FSTYPE} MATCHES_REGEX @File systems for discovery

Overrides:

Skip metadata collection for dynamic FS
- {#FSTYPE} MATCHES_REGEX `^(btrfs

Network interface discovery

The discovery of network interfaces as defined in the global regular expression "Network interfaces for discovery".

ZABBIX_PASSIVE net.if.discovery

Filter:

- {#IFNAME} MATCHES_REGEX @Network interfaces for discovery

Items collected

Group Name Description Type Key and additional info
CPU Interrupts per second

-

ZABBIX_PASSIVE system.cpu.intr

Preprocessing:

- CHANGE_PER_SECOND: ``

CPU Processor load (1 min average per core)

The processor load is calculated as the system CPU load divided by the number of CPU cores.

ZABBIX_PASSIVE system.cpu.load[percpu,avg1]
CPU Processor load (5 min average per core)

The processor load is calculated as the system CPU load divided by the number of CPU cores.

ZABBIX_PASSIVE system.cpu.load[percpu,avg5]
CPU Processor load (15 min average per core)

The processor load is calculated as the system CPU load divided by the number of CPU cores.

ZABBIX_PASSIVE system.cpu.load[percpu,avg15]
CPU Context switches per second

-

ZABBIX_PASSIVE system.cpu.switches

Preprocessing:

- CHANGE_PER_SECOND: ``

CPU CPU idle time

The time the CPU has spent doing nothing.

ZABBIX_PASSIVE system.cpu.util[,idle]
CPU CPU interrupt time

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

ZABBIX_PASSIVE system.cpu.util[,interrupt]
CPU CPU nice time

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

ZABBIX_PASSIVE system.cpu.util[,nice]
CPU CPU system time

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

ZABBIX_PASSIVE system.cpu.util[,system]
CPU CPU user time

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

ZABBIX_PASSIVE system.cpu.util[,user]
Filesystems Filesystems: Free inodes on {#FSNAME} (percentage)

-

ZABBIX_PASSIVE vfs.fs.inode[{#FSNAME},pfree]
Filesystems Filesystems: Free disk space on {#FSNAME}

-

ZABBIX_PASSIVE vfs.fs.size[{#FSNAME},free]
Filesystems Filesystems: Free disk space on {#FSNAME} (percentage)

-

ZABBIX_PASSIVE vfs.fs.size[{#FSNAME},pfree]
Filesystems Filesystems: Total disk space on {#FSNAME}

-

ZABBIX_PASSIVE vfs.fs.size[{#FSNAME},total]
Filesystems Filesystems: Used disk space on {#FSNAME}

-

ZABBIX_PASSIVE vfs.fs.size[{#FSNAME},used]
General Host boot time

-

ZABBIX_PASSIVE system.boottime
General Host name

A host name of the system.

ZABBIX_PASSIVE system.hostname

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

General Host local time

-

ZABBIX_PASSIVE system.localtime
General System information

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

ZABBIX_PASSIVE system.uname

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

General System uptime

-

ZABBIX_PASSIVE system.uptime
Memory Free swap space

-

ZABBIX_PASSIVE system.swap.size[,free]
Memory Free swap space in %

-

ZABBIX_PASSIVE system.swap.size[,pfree]
Memory Total swap space

-

ZABBIX_PASSIVE system.swap.size[,total]
Memory Available memory

The available memory is defined as free+cached+buffers memory.

ZABBIX_PASSIVE vm.memory.size[available]
Memory Total memory

-

ZABBIX_PASSIVE vm.memory.size[total]
Monitoring agent Version of Zabbix agent running

-

ZABBIX_PASSIVE agent.version

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Monitoring agent Host name of Zabbix agent running

-

ZABBIX_PASSIVE agent.hostname

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Monitoring agent Zabbix agent ping

The agent always returns 1 for this item. It could be used in combination with nodata() for the availability check.

ZABBIX_PASSIVE agent.ping
Network interfaces Network interfaces: Incoming network traffic on {#IFNAME}

-

ZABBIX_PASSIVE net.if.in[{#IFNAME}]

Preprocessing:

- CHANGE_PER_SECOND: ``

- MULTIPLIER: 8

Network interfaces Network interfaces: Outgoing network traffic on {#IFNAME}

-

ZABBIX_PASSIVE net.if.out[{#IFNAME}]

Preprocessing:

- CHANGE_PER_SECOND: ``

- MULTIPLIER: 8

OS Maximum number of opened files

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

ZABBIX_PASSIVE kernel.maxfiles
OS Maximum number of processes

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

ZABBIX_PASSIVE kernel.maxproc
OS Number of logged in users

The number of users who are currently logged in.

ZABBIX_PASSIVE system.users.num
Processes Number of running processes

The number of processes in a running state.

ZABBIX_PASSIVE proc.num[,,run]
Processes Number of processes

The total number of processes in any state.

ZABBIX_PASSIVE proc.num[]
Security Checksum of /etc/passwd

-

ZABBIX_PASSIVE vfs.file.cksum[/etc/passwd,sha256]

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Status Zabbix agent availability

Monitoring the availability status of the agent.

INTERNAL zabbix[host,agent,available]

Triggers

Name Description Expression Severity Dependencies and additional info
Processor load is too high on {HOST.NAME}

-

avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 WARNING
Filesystems: Free inodes is less than 20% on volume {#FSNAME}

-

last(/FreeBSD by Zabbix agent/vfs.fs.inode[{#FSNAME},pfree])<20 WARNING
Filesystems: Free disk space is less than 20% on volume {#FSNAME}

-

last(/FreeBSD by Zabbix agent/vfs.fs.size[{#FSNAME},pfree])<20 WARNING
Hostname was changed on {HOST.NAME}

-

last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2) INFO
Host information was changed on {HOST.NAME}

-

last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2) INFO
{HOST.NAME} has just been restarted

-

change(/FreeBSD by Zabbix agent/system.uptime)<0 INFO
Lack of free swap space on {HOST.NAME}

It probably means that the systems requires more physical memory.

last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50 WARNING
Lack of available memory on server {HOST.NAME}

-

last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M AVERAGE
Configured max number of opened files is too low on {HOST.NAME}

-

last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024 INFO
Configured max number of processes is too low on {HOST.NAME}

-

last(/FreeBSD by Zabbix agent/kernel.maxproc)<256 INFO
Too many processes running on {HOST.NAME}

-

avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30 WARNING
Too many processes on {HOST.NAME}

-

avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300 WARNING
/etc/passwd has been changed on {HOST.NAME}

-

last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) WARNING
Zabbix agent is not available

For passive checks only the availability of the agents and a host is used with {$AGENT.TIMEOUT} as the time threshold.

max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 AVERAGE

Manual close: YES

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 at ZABBIX forums.

This template is for Zabbix version: 6.0

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/freebsd?at=release/6.0

FreeBSD by Zabbix agent

Overview

Official FreeBSD template. Requires agent of Zabbix 6.0 and newer.

Requirements

Zabbix version: 6.0 and higher.

Tested versions

This template has been tested on:

  • FreeBSD

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

Install Zabbix agent on FreeBSD according to Zabbix documentation.

Macros used

Name Description Default
{$AGENT.TIMEOUT}

The timeout after which the agent is considered unavailable. It works only for the agents reachable from Zabbix server/proxy (in passive mode).

3m

Items

Name Description Type Key and additional info
FreeBSD: Maximum number of opened files

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

Zabbix agent kernel.maxfiles
FreeBSD: Maximum number of processes

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

Zabbix agent kernel.maxproc
FreeBSD: Number of running processes

The number of processes in a running state.

Zabbix agent proc.num[,,run]
FreeBSD: Number of processes

The total number of processes in any state.

Zabbix agent proc.num[]
FreeBSD: Host boot time Zabbix agent system.boottime
FreeBSD: Interrupts per second Zabbix agent system.cpu.intr

Preprocessing

  • Change per second:
FreeBSD: Processor load (1 min average per core)

The processor load is calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg1]
FreeBSD: Processor load (5 min average per core)

The processor load is calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg5]
FreeBSD: Processor load (15 min average per core)

The processor load is calculated as the system CPU load divided by the number of CPU cores.

Zabbix agent system.cpu.load[percpu,avg15]
FreeBSD: Context switches per second Zabbix agent system.cpu.switches

Preprocessing

  • Change per second:
FreeBSD: CPU idle time

The time the CPU has spent doing nothing.

Zabbix agent system.cpu.util[,idle]
FreeBSD: CPU interrupt time

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

Zabbix agent system.cpu.util[,interrupt]
FreeBSD: CPU nice time

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

Zabbix agent system.cpu.util[,nice]
FreeBSD: CPU system time

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

Zabbix agent system.cpu.util[,system]
FreeBSD: CPU user time

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

Zabbix agent system.cpu.util[,user]
FreeBSD: Host name

A host name of the system.

Zabbix agent system.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: Host local time Zabbix agent system.localtime
FreeBSD: Free swap space Zabbix agent system.swap.size[,free]
FreeBSD: Free swap space in % Zabbix agent system.swap.size[,pfree]
FreeBSD: Total swap space Zabbix agent system.swap.size[,total]
FreeBSD: System information

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

Zabbix agent system.uname

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: System uptime Zabbix agent system.uptime
FreeBSD: Number of logged in users

The number of users who are currently logged in.

Zabbix agent system.users.num
FreeBSD: Checksum of /etc/passwd Zabbix agent vfs.file.cksum[/etc/passwd,sha256]

Preprocessing

  • Discard unchanged with heartbeat: 1h

FreeBSD: Available memory

The available memory is defined as free+cached+buffers memory.

Zabbix agent vm.memory.size[available]
FreeBSD: Total memory Zabbix agent vm.memory.size[total]
FreeBSD: Version of Zabbix agent running Zabbix agent agent.version

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: Host name of Zabbix agent running Zabbix agent agent.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

FreeBSD: Zabbix agent ping

The agent always returns 1 for this item. It could be used in combination with nodata() for the availability check.

Zabbix agent agent.ping
FreeBSD: Zabbix agent availability

Monitoring the availability status of the agent.

Zabbix internal zabbix[host,agent,available]

Triggers

Name Description Expression Severity Dependencies and additional info
FreeBSD: Configured max number of opened files is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024 Info
FreeBSD: Configured max number of processes is too low on {HOST.NAME} last(/FreeBSD by Zabbix agent/kernel.maxproc)<256 Info
FreeBSD: Too many processes running on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30 Warning
FreeBSD: Too many processes on {HOST.NAME} avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300 Warning
FreeBSD: Processor load is too high on {HOST.NAME} avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 Warning
FreeBSD: Hostname was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2) Info
FreeBSD: Lack of free swap space on {HOST.NAME}

It probably means that the systems requires more physical memory.

last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50 Warning
FreeBSD: Host information was changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2) Info
FreeBSD: {HOST.NAME} has just been restarted change(/FreeBSD by Zabbix agent/system.uptime)<0 Info
FreeBSD: /etc/passwd has been changed on {HOST.NAME} last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) Warning
FreeBSD: Lack of available memory on server {HOST.NAME} last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M Average
FreeBSD: Zabbix agent is not available

For passive checks only the availability of the agents and a host is used with {$AGENT.TIMEOUT} as the time threshold.

max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 Average Manual close: Yes

LLD rule Network interface discovery

Name Description Type Key and additional info
Network interface discovery

The discovery of network interfaces as defined in the global regular expression "Network interfaces for discovery".

Zabbix agent net.if.discovery

Item prototypes for Network interface discovery

Name Description Type Key and additional info
Interface {#IFNAME}: Incoming network traffic Zabbix agent net.if.in[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

Interface {#IFNAME}: Outgoing network traffic Zabbix agent net.if.out[{#IFNAME}]

Preprocessing

  • Change per second:
  • Custom multiplier: 8

LLD rule Mounted filesystem discovery

Name Description Type Key and additional info
Mounted filesystem discovery

The discovery of different types of file systems as defined in the global regular expression "File systems for discovery".

Zabbix agent vfs.fs.discovery

Item prototypes for Mounted filesystem discovery

Name Description Type Key and additional info
{#FSNAME}: Free inodes, % Zabbix agent vfs.fs.inode[{#FSNAME},pfree]
{#FSNAME}: Free disk space Zabbix agent vfs.fs.size[{#FSNAME},free]
{#FSNAME}: Free disk space, % Zabbix agent vfs.fs.size[{#FSNAME},pfree]
{#FSNAME}: Total disk space Zabbix agent vfs.fs.size[{#FSNAME},total]
{#FSNAME}: Used disk space Zabbix agent vfs.fs.size[{#FSNAME},used]

Trigger prototypes for Mounted filesystem discovery

Name Description Expression Severity Dependencies and additional info
{#FSNAME}: Free inodes is less than 20% last(/FreeBSD by Zabbix agent/vfs.fs.inode[{#FSNAME},pfree])<20 Warning
{#FSNAME}: Free disk space is less than 20% last(/FreeBSD by Zabbix agent/vfs.fs.size[{#FSNAME},pfree])<20 Warning

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 at ZABBIX forums

Articles and documentation

+ Propose new article
👁 Image

Request custom integration

Zabbix integration team will develop custom integration based on your requirements and Zabbix best practices.

Request
👁 Image

Propose integration

Have you already developed high quality integration and want to submit to Zabbix integration repository?

Propose