Zabbix Module

The Zabbix module actively sends information to a Zabbix server like:

  • Ceph status

  • I/O operations

  • I/O bandwidth

  • OSD status

  • Storage utilization

Requirements

The module requires that the zabbix_sender executable is present on _all_machines running ceph-mgr. It can be installed on most distributions usingthe package manager.

Dependencies

Installing zabbix_sender can be done under Ubuntu or CentOS using either aptor dnf.

On Ubuntu Xenial:

  1. apt install zabbix-agent

On Fedora:

  1. dnf install zabbix-sender

Enabling

You can enable the zabbix module with:

  1. ceph mgr module enable zabbix

Configuration

Two configuration keys are vital for the module to work:

  • zabbix_host

  • identifier (optional)

The parameter zabbix_host controls the hostname of the Zabbix server to whichzabbix_sender will send the items. This can be a IP-Address if required byyour installation.

The identifier parameter controls the identifier/hostname to use as sourcewhen sending items to Zabbix. This should match the name of the Host inyour Zabbix server.

When the identifier parameter is not configured the ceph-<fsid> of the clusterwill be used when sending data to Zabbix.

This would for example be ceph-c4d32a99-9e80-490f-bd3a-1d22d8a7d354

Additional configuration keys which can be configured and their default values:

  • zabbix_port: 10051

  • zabbix_sender: /usr/bin/zabbix_sender

  • interval: 60

  • discovery_interval: 100

Configuration keys

Configuration keys can be set on any machine with the proper cephx credentials,these are usually Monitors where the client.admin key is present.

  1. ceph zabbix config-set <key> <value>

For example:

  1. ceph zabbix config-set zabbix_host zabbix.localdomain
  2. ceph zabbix config-set identifier ceph.eu-ams02.local

The current configuration of the module can also be shown:

  1. ceph zabbix config-show

Template

A template.(XML) to be used on the Zabbix server can be found in the source directory of the module.

This template contains all items and a few triggers. You can customize the triggers afterwards to fit your needs.

Multiple Zabbix servers

It is possible to instruct zabbix module to send data to multiple Zabbix servers.

Parameter zabbix_host can be set with multiple hostnames separated by commas.Hosnames (or IP adderesses) can be followed by colon and port number. If a portnumber is not present module will use the port number defined in zabbix_port.

For example:

  1. ceph zabbix config-set zabbix_host "zabbix1,zabbix2:2222,zabbix3:3333"

Manually sending data

If needed the module can be asked to send data immediately instead of waiting forthe interval.

This can be done with this command:

  1. ceph zabbix send

The module will now send its latest data to the Zabbix server.

Items discovery is accomplished also via zabbixsender, and runs every _discovery_interval * interval seconds. If you wish to launch discoverymanually, this can be done with this command:

  1. ceph zabbix discovery

Debugging

Should you want to debug the Zabbix module increase the logging level forceph-mgr and check the logs.

  1. [mgr]
  2. debug mgr = 20

With logging set to debug for the manager the module will print various logginglines prefixed with mgr[zabbix] for easy filtering.