]> git.proxmox.com Git - ceph.git/blame - ceph/doc/mgr/zabbix.rst
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / doc / mgr / zabbix.rst
CommitLineData
11fdf7f2 1Zabbix Module
224ce89b
WB
2=============
3
11fdf7f2 4The Zabbix module actively sends information to a Zabbix server like:
224ce89b
WB
5
6- Ceph status
7- I/O operations
8- I/O bandwidth
9- OSD status
10- Storage utilization
11
12Requirements
c07f9fc5 13------------
224ce89b 14
11fdf7f2 15The module requires that the *zabbix_sender* executable is present on *all*
224ce89b
WB
16machines running ceph-mgr. It can be installed on most distributions using
17the package manager.
18
19Dependencies
c07f9fc5 20^^^^^^^^^^^^
224ce89b
WB
21Installing zabbix_sender can be done under Ubuntu or CentOS using either apt
22or dnf.
23
24On Ubuntu Xenial:
25
26::
27
28 apt install zabbix-agent
29
30On Fedora:
31
32::
33
34 dnf install zabbix-sender
35
36
37Enabling
c07f9fc5 38--------
11fdf7f2 39You can enable the *zabbix* module with:
224ce89b
WB
40
41::
42
11fdf7f2 43 ceph mgr module enable zabbix
224ce89b
WB
44
45Configuration
c07f9fc5 46-------------
224ce89b 47
94b18763 48Two configuration keys are vital for the module to work:
224ce89b 49
94b18763
FG
50- zabbix_host
51- identifier (optional)
224ce89b
WB
52
53The parameter *zabbix_host* controls the hostname of the Zabbix server to which
54*zabbix_sender* will send the items. This can be a IP-Address if required by
55your installation.
56
57The *identifier* parameter controls the identifier/hostname to use as source
58when sending items to Zabbix. This should match the name of the *Host* in
59your Zabbix server.
60
94b18763
FG
61When the *identifier* parameter is not configured the ceph-<fsid> of the cluster
62will be used when sending data to Zabbix.
63
64This would for example be *ceph-c4d32a99-9e80-490f-bd3a-1d22d8a7d354*
65
224ce89b
WB
66Additional configuration keys which can be configured and their default values:
67
11fdf7f2
TL
68- zabbix_port: 10051
69- zabbix_sender: /usr/bin/zabbix_sender
70- interval: 60
224ce89b 71
c07f9fc5
FG
72Configuration keys
73^^^^^^^^^^^^^^^^^^^
224ce89b
WB
74
75Configuration keys can be set on any machine with the proper cephx credentials,
76these are usually Monitors where the *client.admin* key is present.
77
78::
79
11fdf7f2 80 ceph zabbix config-set <key> <value>
224ce89b
WB
81
82For example:
83
84::
85
11fdf7f2
TL
86 ceph zabbix config-set zabbix_host zabbix.localdomain
87 ceph zabbix config-set identifier ceph.eu-ams02.local
88
89The current configuration of the module can also be shown:
90
91::
92
93 ceph zabbix config-show
94
95
96Template
97^^^^^^^^
98A `template <https://raw.githubusercontent.com/ceph/ceph/9c54334b615362e0a60442c2f41849ed630598ab/src/pybind/mgr/zabbix/zabbix_template.xml>`_.
99(XML) to be used on the Zabbix server can be found in the source directory of the module.
100
101This template contains all items and a few triggers. You can customize the triggers afterwards to fit your needs.
102
92f5a8d4
TL
103
104Multiple Zabbix servers
105^^^^^^^^^^^^^^^^^^^^^^^
106It is possible to instruct zabbix module to send data to multiple Zabbix servers.
107
108Parameter *zabbix_host* can be set with multiple hostnames separated by commas.
109Hosnames (or IP adderesses) can be followed by colon and port number. If a port
110number is not present module will use the port number defined in *zabbix_port*.
111
112For example:
113
114::
115
116 ceph zabbix config-set zabbix_host "zabbix1,zabbix2:2222,zabbix3:3333"
117
118
11fdf7f2
TL
119Manually sending data
120---------------------
121If needed the module can be asked to send data immediately instead of waiting for
122the interval.
123
124This can be done with this command:
125
126::
127
128 ceph zabbix send
129
130The module will now send its latest data to the Zabbix server.
224ce89b
WB
131
132Debugging
c07f9fc5 133---------
224ce89b
WB
134
135Should you want to debug the Zabbix module increase the logging level for
136ceph-mgr and check the logs.
137
138::
139
140 [mgr]
141 debug mgr = 20
142
11fdf7f2
TL
143With logging set to debug for the manager the module will print various logging
144lines prefixed with *mgr[zabbix]* for easy filtering.