@@ -151,3 +151,94 @@ ceph-mgr and check the logs.
151151
152152With logging set to debug for the manager the module will print various logging
153153lines prefixed with *mgr[zabbix] * for easy filtering.
154+
155+ Installing zabbix-agent 2
156+ -------------------------
157+
158+ Follow the instructions in the sections :ref: `mgr_zabbix_2_nodes `,
159+ :ref: `mgr_zabbix_2_cluster `, and :ref: `mgr_zabbix_2_server ` to install a Zabbix
160+ server to monitor your Ceph cluster.
161+
162+ .. _mgr_zabbix_2_nodes :
163+
164+ Ceph MGR Nodes
165+ ^^^^^^^^^^^^^^
166+
167+ #. Download an appropriate Zabbix release from https://www.zabbix.com/download
168+ or install a package from the Zabbix repositories.
169+ #. Use your package manager to remove any other Zabbix agents.
170+ #. Install ``zabbix-agent 2 `` using the instructions at
171+ https://www.zabbix.com/download.
172+ #. Edit ``/etc/zabbix/zabbix-agent2.conf ``. Add your Zabbix monitoring servers
173+ and your localhost to the ``Servers `` line of ``zabbix-agent2.conf ``::
174+
175+ Server=127.0.0.1,zabbix2.example.com,zabbix1.example.com
176+ #. Start or restart the ``zabbix-agent2 `` agent:
177+
178+ .. prompt :: bash #
179+
180+ systemctl restart zabbix-agent2
181+
182+ .. _mgr_zabbix_2_cluster :
183+
184+ Ceph Cluster
185+ ^^^^^^^^^^^^
186+
187+ #. Enable the ``restful `` module:
188+
189+ .. prompt :: bash #
190+
191+ ceph mgr module enable restful
192+
193+ #. Generate a self-signed certificate. This step is optional:
194+
195+ .. prompt :: bash #
196+
197+ restful create-self-signed-cert
198+
199+ #. Create an API user called ``zabbix-monitor ``:
200+
201+ .. prompt :: bash #
202+
203+ ceph restful create-key zabbix-monitor
204+
205+ The output of this command, an API key, will look something like this::
206+
207+ a4bb2019-XXXX-YYYY-ZZZZ-abcdefghij
208+
209+ #. Save the generated API key. It will be necessary later.
210+ #. Test API access by using ``zabbix-get ``:
211+
212+ .. note :: This step is optional.
213+
214+
215+ .. prompt :: bash #
216+
217+ zabbix_get -s 127.0.0.1 -k ceph.ping["${CEPH.CONNSTRING}","${CEPH.USER}","{CEPH.API.KEY}"
218+
219+ Example:
220+
221+ .. prompt :: bash #
222+
223+ zabbix_get -s 127.0.0.1 -k ceph.ping["https://localhost:8003","zabbix-monitor","a4bb2019-XXXX-YYYY-ZZZZ-abcdefghij"]
224+
225+ .. note :: You may need to install ``zabbix-get`` via your package manager.
226+
227+ .. _mgr_zabbix_2_server :
228+
229+ Zabbix Server
230+ ^^^^^^^^^^^^^
231+
232+ #. Create a host for the Ceph monitoring servers.
233+ #. Add the template ``Ceph by Zabbix agent 2 `` to the host.
234+ #. Inform the host of the keys:
235+
236+ #. Go to “Macros” on the host.
237+ #. Show “Inherited and host macros”.
238+ #. Change ``${CEPH.API.KEY} `` and ``${CEPH.USER} `` to the values provided
239+ under ``ceph restful create-key ``, above. Example::
240+
241+ {$CEPH.API.KEY} a4bb2019-XXXX-YYYY-ZZZZ-abcdefghij
242+ {$CEPH.USER} zabbix-monitor
243+
244+ #. Update the host. Within a few cycles, data will populate the server.
0 commit comments