You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yzl 93958d0fb0
zabbix6.0
1 year ago
..
README.md zabbix6.0 1 year ago
template_os_macos.yaml zabbix6.0 1 year ago

README.md

macOS by Zabbix agent

Overview

macOS is the operating system that powers every Mac

Requirements

Zabbix version: 7.0 and higher.

Tested versions

This template has been tested on:

  • macOS operating system

Configuration

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

Setup

Install Zabbix agent on macOS 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
macOS: Maximum number of opened files

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

Zabbix agent kernel.maxfiles
macOS: Maximum number of processes

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

Zabbix agent kernel.maxproc
macOS: Incoming network traffic on en0 Zabbix agent net.if.in[en0]

Preprocessing

  • Change per second
  • Custom multiplier: 8

macOS: Outgoing network traffic on en0 Zabbix agent net.if.out[en0]

Preprocessing

  • Change per second
  • Custom multiplier: 8

macOS: Host boot time Zabbix agent system.boottime
macOS: 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]
macOS: 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]
macOS: 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]
macOS: Host name

A host name of the system.

Zabbix agent system.hostname

Preprocessing

  • Discard unchanged with heartbeat: 1d

macOS: Host local time Zabbix agent system.localtime
macOS: System information

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

Zabbix agent system.uname

Preprocessing

  • Discard unchanged with heartbeat: 1d

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

The number of users who are currently logged in.

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

Preprocessing

  • Discard unchanged with heartbeat: 1h

macOS: Available memory

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

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

Preprocessing

  • Discard unchanged with heartbeat: 1d

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

Preprocessing

  • Discard unchanged with heartbeat: 1d

macOS: 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
macOS: Zabbix agent availability

Monitoring the availability status of the agent.

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

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

Zabbix agent vfs.fs.get

Triggers

Name Description Expression Severity Dependencies and additional info
macOS: Configured max number of opened files is too low last(/macOS by Zabbix agent/kernel.maxfiles)<1024 Info
macOS: Configured max number of processes is too low last(/macOS by Zabbix agent/kernel.maxproc)<256 Info
macOS: Processor load is too high avg(/macOS by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5 Warning
macOS: Hostname was changed last(/macOS by Zabbix agent/system.hostname,#1)<>last(/macOS by Zabbix agent/system.hostname,#2) Info
macOS: Host information was changed last(/macOS by Zabbix agent/system.uname,#1)<>last(/macOS by Zabbix agent/system.uname,#2) Info
macOS: Server has just been restarted change(/macOS by Zabbix agent/system.uptime)<0 Info
macOS: /etc/passwd has been changed last(/macOS by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/macOS by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2) Warning
macOS: Lack of available memory on server last(/macOS by Zabbix agent/vm.memory.size[available])<20M Average
macOS: 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(/macOS by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0 Average Manual close: Yes

LLD rule Mounted filesystem discovery

Name Description Type Key and additional info
Mounted filesystem discovery

Discovery of different types of file systems as defined in the global regular expression "File systems for discovery". Note that the option to exclude dmg software images from discovery is available only with Zabbix agents 6.4 and higher.

Dependent item vfs.fs.dependent.discovery

Item prototypes for Mounted filesystem discovery

Name Description Type Key and additional info
{#FSNAME}: Get filesystem data Dependent item vfs.fs.dependent[{#FSNAME},data]

Preprocessing

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

{#FSNAME}: Free inodes, % Dependent item vfs.fs.dependent.inode[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.inodes.pfree

{#FSNAME}: Free disk space Dependent item vfs.fs.dependent.size[{#FSNAME},free]

Preprocessing

  • JSON Path: $.bytes.free

{#FSNAME}: Free disk space, % Dependent item vfs.fs.dependent.size[{#FSNAME},pfree]

Preprocessing

  • JSON Path: $.bytes.pfree

{#FSNAME}: Total disk space Dependent item vfs.fs.dependent.size[{#FSNAME},total]

Preprocessing

  • JSON Path: $.bytes.total

{#FSNAME}: Used disk space 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
{#FSNAME}: Free inodes is less than 20% last(/macOS by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree])<20 Warning
{#FSNAME}: Free disk space is less than 20% last(/macOS by Zabbix agent/vfs.fs.dependent.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