Create trigger for nova/neutron/cinder services goes offline
Add item to monitor number of neutron services in offline state Change-Id: I1afa6c11156b17b9205fe805ea1134e7b0bccc4d Closes-bug: #1446257
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<zabbix_export>
|
<zabbix_export>
|
||||||
<version>2.0</version>
|
<version>2.0</version>
|
||||||
<date>2014-12-10T10:37:28Z</date>
|
<date>2015-07-27T12:25:30Z</date>
|
||||||
<groups>
|
<groups>
|
||||||
<group>
|
<group>
|
||||||
<name>Templates</name>
|
<name>Templates</name>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<template>Template OpenStack Cluster</template>
|
<template>Template OpenStack Cluster</template>
|
||||||
<name>Template OpenStack Cluster</name>
|
<name>Template OpenStack Cluster</name>
|
||||||
|
<description/>
|
||||||
<groups>
|
<groups>
|
||||||
<group>
|
<group>
|
||||||
<name>Templates</name>
|
<name>Templates</name>
|
||||||
@@ -506,6 +507,48 @@
|
|||||||
</applications>
|
</applications>
|
||||||
<valuemap/>
|
<valuemap/>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<name>Number of Neutron services in offline state</name>
|
||||||
|
<type>0</type>
|
||||||
|
<snmp_community/>
|
||||||
|
<multiplier>0</multiplier>
|
||||||
|
<snmp_oid/>
|
||||||
|
<key>db.services.offline.neutron.query</key>
|
||||||
|
<delay>30</delay>
|
||||||
|
<history>90</history>
|
||||||
|
<trends>365</trends>
|
||||||
|
<status>0</status>
|
||||||
|
<value_type>3</value_type>
|
||||||
|
<allowed_hosts/>
|
||||||
|
<units/>
|
||||||
|
<delta>0</delta>
|
||||||
|
<snmpv3_contextname/>
|
||||||
|
<snmpv3_securityname/>
|
||||||
|
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||||
|
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||||
|
<snmpv3_authpassphrase/>
|
||||||
|
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||||
|
<snmpv3_privpassphrase/>
|
||||||
|
<formula>1</formula>
|
||||||
|
<delay_flex/>
|
||||||
|
<params/>
|
||||||
|
<ipmi_sensor/>
|
||||||
|
<data_type>0</data_type>
|
||||||
|
<authtype>0</authtype>
|
||||||
|
<username/>
|
||||||
|
<password/>
|
||||||
|
<publickey/>
|
||||||
|
<privatekey/>
|
||||||
|
<port/>
|
||||||
|
<description/>
|
||||||
|
<inventory_link>0</inventory_link>
|
||||||
|
<applications>
|
||||||
|
<application>
|
||||||
|
<name>Capacity data</name>
|
||||||
|
</application>
|
||||||
|
</applications>
|
||||||
|
<valuemap/>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<name>Number of Nova services in offline state</name>
|
<name>Number of Nova services in offline state</name>
|
||||||
<type>0</type>
|
<type>0</type>
|
||||||
@@ -724,6 +767,36 @@
|
|||||||
</template>
|
</template>
|
||||||
</templates>
|
</templates>
|
||||||
<triggers>
|
<triggers>
|
||||||
|
<trigger>
|
||||||
|
<expression>{Template OpenStack Cluster:db.services.offline.nova.query.last(0)}>0</expression>
|
||||||
|
<name>Nova service status offline test failed</name>
|
||||||
|
<url/>
|
||||||
|
<status>0</status>
|
||||||
|
<priority>3</priority>
|
||||||
|
<description/>
|
||||||
|
<type>0</type>
|
||||||
|
<dependencies/>
|
||||||
|
</trigger>
|
||||||
|
<trigger>
|
||||||
|
<expression>{Template OpenStack Cluster:db.services.offline.cinder.query.last(0)}>0</expression>
|
||||||
|
<name>Cinder service status offline test failed</name>
|
||||||
|
<url/>
|
||||||
|
<status>0</status>
|
||||||
|
<priority>3</priority>
|
||||||
|
<description/>
|
||||||
|
<type>0</type>
|
||||||
|
<dependencies/>
|
||||||
|
</trigger>
|
||||||
|
<trigger>
|
||||||
|
<expression>{Template OpenStack Cluster:db.services.offline.neutron.query.last(0)}>0</expression>
|
||||||
|
<name>Neutron service status offline test failed</name>
|
||||||
|
<url/>
|
||||||
|
<status>0</status>
|
||||||
|
<priority>3</priority>
|
||||||
|
<description/>
|
||||||
|
<type>0</type>
|
||||||
|
<dependencies/>
|
||||||
|
</trigger>
|
||||||
<trigger>
|
<trigger>
|
||||||
<expression>{Template OpenStack Cluster:vip.cinder.api.status.last(0)}=0</expression>
|
<expression>{Template OpenStack Cluster:vip.cinder.api.status.last(0)}=0</expression>
|
||||||
<name>Cinder VIP API test failed</name>
|
<name>Cinder VIP API test failed</name>
|
||||||
@@ -962,6 +1035,18 @@
|
|||||||
<key>db.services.offline.nova.query</key>
|
<key>db.services.offline.nova.query</key>
|
||||||
</item>
|
</item>
|
||||||
</graph_item>
|
</graph_item>
|
||||||
|
<graph_item>
|
||||||
|
<sortorder>2</sortorder>
|
||||||
|
<drawtype>0</drawtype>
|
||||||
|
<color>0000C8</color>
|
||||||
|
<yaxisside>0</yaxisside>
|
||||||
|
<calc_fnc>2</calc_fnc>
|
||||||
|
<type>0</type>
|
||||||
|
<item>
|
||||||
|
<host>Template OpenStack Cluster</host>
|
||||||
|
<key>db.services.offline.neutron.query</key>
|
||||||
|
</item>
|
||||||
|
</graph_item>
|
||||||
</graph_items>
|
</graph_items>
|
||||||
</graph>
|
</graph>
|
||||||
<graph>
|
<graph>
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ class plugin_zabbix::monitoring::openstack_virtual_mon {
|
|||||||
command => '/etc/zabbix/scripts/query_db.py instance_error';
|
command => '/etc/zabbix/scripts/query_db.py instance_error';
|
||||||
'db.services.offline.nova.query':
|
'db.services.offline.nova.query':
|
||||||
command => '/etc/zabbix/scripts/query_db.py services_offline_nova';
|
command => '/etc/zabbix/scripts/query_db.py services_offline_nova';
|
||||||
|
'db.services.offline.neutron.query':
|
||||||
|
command => '/etc/zabbix/scripts/query_db.py services_offline_neutron';
|
||||||
'db.instance.count.query':
|
'db.instance.count.query':
|
||||||
command => '/etc/zabbix/scripts/query_db.py instance_count';
|
command => '/etc/zabbix/scripts/query_db.py instance_count';
|
||||||
'db.cpu.total.query':
|
'db.cpu.total.query':
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class plugin_zabbix::params::openstack {
|
|||||||
$access_hash = hiera('access')
|
$access_hash = hiera('access')
|
||||||
$keystone_hash = hiera('keystone')
|
$keystone_hash = hiera('keystone')
|
||||||
$nova_hash = hiera('nova')
|
$nova_hash = hiera('nova')
|
||||||
|
$neutron_hash = hiera('neutron_config')
|
||||||
$cinder_hash = hiera('cinder')
|
$cinder_hash = hiera('cinder')
|
||||||
$rabbit_hash = hiera('rabbit')
|
$rabbit_hash = hiera('rabbit')
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@ class plugin_zabbix::params::openstack {
|
|||||||
$access_tenant = $access_hash['tenant']
|
$access_tenant = $access_hash['tenant']
|
||||||
$keystone_db_password = $keystone_hash['db_password']
|
$keystone_db_password = $keystone_hash['db_password']
|
||||||
$nova_db_password = $nova_hash['db_password']
|
$nova_db_password = $nova_hash['db_password']
|
||||||
|
$neutron_db_password = $neutron_hash['database']['passwd']
|
||||||
$cinder_db_password = $cinder_hash['db_password']
|
$cinder_db_password = $cinder_hash['db_password']
|
||||||
$rabbit_password = $rabbit_hash['password']
|
$rabbit_password = $rabbit_hash['password']
|
||||||
$rabbitmq_service_name = 'rabbitmq-server'
|
$rabbitmq_service_name = 'rabbitmq-server'
|
||||||
|
|||||||
@@ -35,3 +35,7 @@ ram_used_query=select ifnull(sum(memory_mb), 0) from instances where deleted=0 a
|
|||||||
#Count offline services - cinder
|
#Count offline services - cinder
|
||||||
services_offline_cinder_connection=mysql://cinder:<%= scope.lookupvar('plugin_zabbix::params::openstack::cinder_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/cinder
|
services_offline_cinder_connection=mysql://cinder:<%= scope.lookupvar('plugin_zabbix::params::openstack::cinder_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/cinder
|
||||||
services_offline_cinder_query=select count(*) from services where disabled=0 and deleted=0 and timestampdiff(SECOND,updated_at,utc_timestamp())>60
|
services_offline_cinder_query=select count(*) from services where disabled=0 and deleted=0 and timestampdiff(SECOND,updated_at,utc_timestamp())>60
|
||||||
|
|
||||||
|
#Count offline services - neutron
|
||||||
|
services_offline_neutron_connection=mysql://neutron:<%= scope.lookupvar('plugin_zabbix::params::openstack::neutron_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/neutron
|
||||||
|
services_offline_neutron_query=select count(*) from agents where admin_state_up=1 and timestampdiff(SECOND,heartbeat_timestamp,utc_timestamp())>60
|
||||||
|
|||||||
Reference in New Issue
Block a user