summaryrefslogtreecommitdiffstats
path: root/src/ceph/doc/mgr/zabbix.rst
blob: d98540e869692b4ecaef25e5000467c7c1a1a562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Zabbix plugin
=============

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

- Ceph status
- I/O operations
- I/O bandwidth
- OSD status
- Storage utilization

Requirements
------------

The plugin requires that the *zabbix_sender* executable is present on *all*
machines running ceph-mgr. It can be installed on most distributions using
the package manager.

Dependencies
^^^^^^^^^^^^
Installing zabbix_sender can be done under Ubuntu or CentOS using either apt
or dnf.

On Ubuntu Xenial:

::

    apt install zabbix-agent

On Fedora:

::

    dnf install zabbix-sender


Enabling
--------

Add this to your ceph.conf on nodes where you run ceph-mgr:

::

    [mgr]
        mgr modules = zabbix

If you use any other ceph-mgr modules, make sure they're in the list too.

Restart the ceph-mgr daemon after modifying the setting to load the module.


Configuration
-------------

Two configuration keys are mandatory for the module to work:

- mgr/zabbix/zabbix_host
- mgr/zabbix/identifier

The parameter *zabbix_host* controls the hostname of the Zabbix server to which
*zabbix_sender* will send the items. This can be a IP-Address if required by
your installation.

The *identifier* parameter controls the identifier/hostname to use as source
when sending items to Zabbix. This should match the name of the *Host* in
your Zabbix server.

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

- mgr/zabbix/zabbix_port: 10051
- mgr/zabbix/zabbix_sender: /usr/bin/zabbix_sender
- mgr/zabbix/interval: 60

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.

::

    ceph config-key set <key> <value>

For example:

::

    ceph config-key set mgr/zabbix/zabbix_host zabbix.localdomain
    ceph config-key set mgr/zabbix/identifier ceph.eu-ams02.local

Debugging
---------

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

::

    [mgr]
        debug mgr = 20

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