Clarify zabbix with vitrage installation guide
- Add notice about docker image - Add notice to install oslo.messaging, oslo.config - Hint about default devstack rabbitmq username and password - Correct the order of zabbix configure action - Add url to create triggers in zabbix - Add vitrage configuration section for zabbix + Data sources in vitrage.conf + Zabbix section in vitrage.conf + Mapping resource name and resource type in zabbix_conf.yaml Change-Id: I1d1ffcdf1f8cbdd9c57e0f92eb08c866533e1517
This commit is contained in:
parent
c50bf9e68e
commit
184d885eed
@ -7,27 +7,36 @@ Consolidate Zabbix alerts from across multiple sites into a single "at-a-glance"
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
**Note:** Don't try to use zabbix with docker image to test, because `zabbix_vitrage.py` require some openstack libraries (`oslo.messaging` and `oslo.config`).
|
||||||
|
|
||||||
Copy the `zabbix_vitrage.py` script into the Zabbix servers' `AlertScriptsPath` directory which is by default `/usr/lib/zabbix/alertscripts` and make it executable:
|
Copy the `zabbix_vitrage.py` script into the Zabbix servers' `AlertScriptsPath` directory which is by default `/usr/lib/zabbix/alertscripts` and make it executable:
|
||||||
|
|
||||||
| $ wget https://github.com/openstack/vitrage/tree/master/vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py
|
.. code-block:: bash
|
||||||
| $ cp zabbix_vitrage.py /usr/lib/zabbix/alertscripts/
|
|
||||||
| $ chmod 755 /usr/lib/zabbix/alertscripts/zabbix_vitrage.py
|
|
||||||
|
|
||||||
Configuration
|
$ wget https://raw.githubusercontent.com/openstack/vitrage/master/vitrage/datasources/zabbix/auxiliary/zabbix_vitrage.py
|
||||||
-------------
|
$ cp zabbix_vitrage.py /usr/lib/zabbix/alertscripts/
|
||||||
|
$ chmod 755 /usr/lib/zabbix/alertscripts/zabbix_vitrage.py
|
||||||
|
|
||||||
|
Install `oslo.messaging` and `oslo.config` to zabbix host (may require root):
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
$ pip install oslo.messaging oslo.config
|
||||||
|
|
||||||
|
Zabbix web ui configuration
|
||||||
|
---------------------------
|
||||||
|
|
||||||
To forward zabbix events to Vitrage a new media script needs to be created and associated with a user. Follow the steps below as a Zabbix Admin user:
|
To forward zabbix events to Vitrage a new media script needs to be created and associated with a user. Follow the steps below as a Zabbix Admin user:
|
||||||
|
|
||||||
1. Create a new media type [Admininstration > Media Types > Create Media Type]
|
1. Create a new media type [Admininstration > Media Types > Create Media Type]
|
||||||
|
|
||||||
|
|
||||||
| Name: Vitrage Notifications
|
| Name: Vitrage Notifications
|
||||||
| Type: Script
|
| Type: Script
|
||||||
| Script name: zabbix_vitrage.py
|
| Script name: zabbix_vitrage.py
|
||||||
| Script parameters:
|
| Script parameters:
|
||||||
| 1st: {ALERT.SENDTO}
|
| 1st line: {ALERT.SENDTO}
|
||||||
| 2nd: {ALERT.SUBJECT}
|
| 2nd line: {ALERT.SUBJECT}
|
||||||
| 3rd: {ALERT.MESSAGE}
|
| 3rd line: {ALERT.MESSAGE}
|
||||||
|
|
||||||
|
|
||||||
2. Modify the Media for the Admin user [Administration > Users]
|
2. Modify the Media for the Admin user [Administration > Users]
|
||||||
@ -35,16 +44,21 @@ To forward zabbix events to Vitrage a new media script needs to be created and a
|
|||||||
| Type: vitrage Notifications
|
| Type: vitrage Notifications
|
||||||
| Send to: rabbit://rabbit_user:rabbit_pass@127.0.0.1:5672/ <--- Vitrage message bus url
|
| Send to: rabbit://rabbit_user:rabbit_pass@127.0.0.1:5672/ <--- Vitrage message bus url
|
||||||
| When active: 1-7,00:00-24:00
|
| When active: 1-7,00:00-24:00
|
||||||
| Use if severity: (all)
|
| Use if severity: tick all options
|
||||||
| Status: Enabled
|
| Status: Enabled
|
||||||
|
|
||||||
|
**Note:** Default rabbit_user/rabbit_pass for devstack rabbitmq is `stackrabbit/secret`
|
||||||
|
|
||||||
3. Configure Action [Configuration > Actions > Create Action > Action]
|
3. Configure Action [Configuration > Actions > Create Action > Action]
|
||||||
|
|
||||||
| Name: Forward to Vitrage
|
| Name: Forward to Vitrage
|
||||||
| Default Subject: {TRIGGER.STATUS}
|
| Default Subject: {TRIGGER.STATUS}
|
||||||
|
|
||||||
| Default Message:
|
| Add an operation:
|
||||||
|
| Send to Users: Admin
|
||||||
|
| Send only to: Vitrage Notifications
|
||||||
|
|
||||||
|
| Default Message:
|
||||||
| host={HOST.NAME1}
|
| host={HOST.NAME1}
|
||||||
| hostid={HOST.ID1}
|
| hostid={HOST.ID1}
|
||||||
| hostip={HOST.IP1}
|
| hostip={HOST.IP1}
|
||||||
@ -56,16 +70,44 @@ To forward zabbix events to Vitrage a new media script needs to be created and a
|
|||||||
| priority={TRIGGER.NSEVERITY}
|
| priority={TRIGGER.NSEVERITY}
|
||||||
| lastchange={EVENT.DATE} {EVENT.TIME}
|
| lastchange={EVENT.DATE} {EVENT.TIME}
|
||||||
|
|
||||||
|
| To send events add under the Conditions tab:
|
||||||
|
| (A) Maintenance status not in `maintenance`
|
||||||
|
|
||||||
For a full list of trigger macros see https://www.zabbix.com/documentation/3.0/manual/appendix/macros/supported_by_location
|
For a full list of trigger macros see https://www.zabbix.com/documentation/3.0/manual/appendix/macros/supported_by_location
|
||||||
|
|
||||||
To send events add under the Conditions tab:
|
To test zabbix events and vitrage alarms, please see zabbix trgger documentation: https://www.zabbix.com/documentation/3.2/manual/config/triggers/trigger
|
||||||
|
|
||||||
(A) Maintenance status not in `maintenance`
|
|
||||||
|
|
||||||
Finally, add an operation:
|
Vitrage configuration
|
||||||
|
---------------------
|
||||||
|
|
||||||
Send to Users: Admin
|
1. Add zabbix to list of datasources in /etc/vitrage/vitrage.conf
|
||||||
Send only to: Vitrage Notifications
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
[datasources]
|
||||||
|
types = zabbix,nova.host,nova.instance,nova.zone,static_physical,aodh,cinder.volume,neutron.network,neutron.port,heat.stack
|
||||||
|
|
||||||
|
2. Add following section to /etc/vitrage/vitrage.conf
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
[zabbix]
|
||||||
|
url = http://135.248.18.30 # URL to zabbix
|
||||||
|
password = zabbix
|
||||||
|
user = admin
|
||||||
|
config_file = /etc/vitrage/zabbix_conf.yaml
|
||||||
|
|
||||||
|
2. Create /etc/vitrage/zabbix_conf.yaml with this content
|
||||||
|
|
||||||
|
.. code ::
|
||||||
|
|
||||||
|
zabbix:
|
||||||
|
- zabbix_host: Zabbix server
|
||||||
|
type: nova.host
|
||||||
|
name: Zabbix server
|
||||||
|
|
||||||
|
4. Restart vitrage service in devstack/openstack
|
||||||
|
|
||||||
DONE
|
DONE
|
||||||
----
|
----
|
||||||
|
Loading…
Reference in New Issue
Block a user