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