]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/mgr: update zabbix information 56614/head
authorZac Dover <zac.dover@proton.me>
Fri, 29 Mar 2024 11:06:28 +0000 (21:06 +1000)
committerZac Dover <zac.dover@proton.me>
Mon, 1 Apr 2024 14:16:16 +0000 (00:16 +1000)
Include information from John Jasen about how to install Zabbix.

Signed-off-by: Zac Dover <zac.dover@proton.me>
doc/mgr/zabbix.rst

index f044b7a79056dd2fb740b7b1aecb3357b0ab8e9d..90d540c98a1faeda54b835f8bbb7c570fc1aef02 100644 (file)
@@ -151,3 +151,94 @@ ceph-mgr and check the logs.
 
 With logging set to debug for the manager the module will print various logging
 lines prefixed with *mgr[zabbix]* for easy filtering.
+
+Installing zabbix-agent 2
+-------------------------
+
+Follow the instructions in the sections :ref:`mgr_zabbix_2_nodes`,
+:ref:`mgr_zabbix_2_cluster`, and :ref:`mgr_zabbix_2_server` to install a Zabbix
+server to monitor your Ceph cluster.
+
+.. _mgr_zabbix_2_nodes:
+
+Ceph MGR Nodes
+^^^^^^^^^^^^^^
+
+#. Download an appropriate Zabbix release from https://www.zabbix.com/download
+   or install a package from the Zabbix repositories.
+#. Use your package manager to remove any other Zabbix agents.
+#. Install ``zabbix-agent 2`` using the instructions at
+   https://www.zabbix.com/download.
+#. Edit ``/etc/zabbix/zabbix-agent2.conf``. Add your Zabbix monitoring servers
+   and your localhost to the ``Servers`` line of ``zabbix-agent2.conf``::
+
+     Server=127.0.0.1,zabbix2.example.com,zabbix1.example.com
+#. Start or restart the ``zabbix-agent2`` agent:
+
+   .. prompt:: bash #
+
+      systemctl restart zabbix-agent2
+
+.. _mgr_zabbix_2_cluster:
+
+Ceph Cluster
+^^^^^^^^^^^^
+
+#. Enable the ``restful`` module:
+
+   .. prompt:: bash #
+
+      ceph mgr module enable restful
+
+#. Generate a self-signed certificate. This step is optional: 
+
+   .. prompt:: bash #
+
+      restful create-self-signed-cert
+
+#. Create an API user called ``zabbix-monitor``:
+   
+   .. prompt:: bash #
+
+      ceph restful create-key zabbix-monitor
+
+   The output of this command, an API key, will look something like this::
+
+      a4bb2019-XXXX-YYYY-ZZZZ-abcdefghij
+
+#. Save the generated API key. It will be necessary later. 
+#. Test API access by using ``zabbix-get``:
+
+   .. note:: This step is optional. 
+
+
+   .. prompt:: bash #
+
+      zabbix_get -s 127.0.0.1 -k ceph.ping["${CEPH.CONNSTRING}","${CEPH.USER}","{CEPH.API.KEY}"
+
+   Example:
+
+   .. prompt:: bash #
+
+      zabbix_get -s 127.0.0.1 -k ceph.ping["https://localhost:8003","zabbix-monitor","a4bb2019-XXXX-YYYY-ZZZZ-abcdefghij"]
+
+   .. note:: You may need to install ``zabbix-get`` via your package manager. 
+
+.. _mgr_zabbix_2_server:
+
+Zabbix Server
+^^^^^^^^^^^^^
+
+#. Create a host for the Ceph monitoring servers.
+#. Add the template ``Ceph by Zabbix agent 2`` to the host.
+#. Inform the host of the keys:
+
+   #. Go to “Macros” on the host. 
+   #. Show “Inherited and host macros”. 
+   #. Change ``${CEPH.API.KEY}`` and ``${CEPH.USER}`` to the values provided
+      under ``ceph restful create-key``, above. Example:: 
+   
+        {$CEPH.API.KEY} a4bb2019-XXXX-YYYY-ZZZZ-abcdefghij
+        {$CEPH.USER} zabbix-monitor
+
+#. Update the host. Within a few cycles, data will populate the server.