fuel-library/deployment/puppet/zabbix/templates/check_db.conf.erb
Dmitry Nikishov dffe720cc2 Zabbix fuel-library integration
this commit is made by squashing 12 commits:

Zabbix server installation

Add custom types for zabbix configuration

Add basic server config

Zabbix agent installation
Basic OS monitoring

Add nova monitoring with zabbix
Keystone monitoring with zabbix

Glance monitoring with zabbix

cinder and swift monitoring with zabbix

memcached, mysql, horizon and rabbit monitoring with zabbix

misc services monitoring with zabbix

haproxy, zabbix server, firewall, virtual openstack cluster

Neutron monitoring with zabbix

Add zabbix class declaration to osnailyfacter
Add minor fix to zabbix agent scripts
Userparameters now use the correct zabbix_agent.d path
Fixed mysql userparameters
Unset mysql root password
Fix for rabbitmq-manage exec call
Retry API call to zabbix, if it's unavailable
Configure zabbix server to log to rsyslog

Change-Id: I97590c19dc974636dc7f718becd5e6cad20f96c5
Implements: blueprint monitoring-system
2014-07-10 13:53:42 +04:00

38 lines
2.7 KiB
Plaintext

[query_db]
log_level=CRITICAL
#Count tokens in keystone db
token_count_connection=mysql://keystone:<%= scope.lookupvar('zabbix::params::openstack::keystone_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/keystone
token_count_query=select count(*) from token
#Count instances in error state
instance_error_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
instance_error_query=select count(*) from instances where vm_state='error' and deleted=0
#Count offline services - nova
services_offline_nova_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
services_offline_nova_query=select count(*) from services where disabled=0 and deleted=0 and timestampdiff(SECOND,updated_at,utc_timestamp())>60
#Count running instances
instance_count_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
instance_count_query=select count(*) from instances where deleted=0 and vm_state='active'
#Sum all vcpus in cluster
cpu_total_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
cpu_total_query=select ifnull(sum(vcpus), 0) from compute_nodes where deleted=0
#Sum used vcpus in cluster
cpu_used_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
cpu_used_query=select ifnull(sum(vcpus), 0) from instances where deleted=0 and vm_state='active'
#Sum all memory in cluster
ram_total_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
ram_total_query=select ifnull(sum(memory_mb), 0) from compute_nodes where deleted=0
#Sum used memory in cluster
ram_used_connection=mysql://nova:<%= scope.lookupvar('zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('zabbix::params::openstack::db_vip') %>/nova
ram_used_query=select ifnull(sum(memory_mb), 0) from instances where deleted=0 and vm_state='active'
#Count offline services - cinder
services_offline_cinder_connection=mysql://cinder:<%= scope.lookupvar('zabbix::params::openstack::cinder_db_password') %>@<%= scope.lookupvar('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