dffe720cc2
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
85 lines
3.7 KiB
Puppet
85 lines
3.7 KiB
Puppet
class zabbix::monitoring::openstack_virtual_mon {
|
|
|
|
include zabbix::params
|
|
|
|
if $zabbix::params::host_name == $zabbix::params::openstack::virtual_cluster_hostname {
|
|
package {
|
|
'python-sqlalchemy':
|
|
ensure => present;
|
|
'MySQL-python':
|
|
ensure => present;
|
|
'python-simplejson':
|
|
ensure => present;
|
|
}
|
|
|
|
zabbix_host { $zabbix::params::openstack::virtual_cluster_name:
|
|
host => $zabbix::params::openstack::virtual_cluster_name,
|
|
ip => $::internal_address,
|
|
groups => $zabbix::params::host_groups,
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
|
|
zabbix_template_link { "$zabbix::params::openstack::virtual_cluster_name Template OpenStack Cluster":
|
|
host => $zabbix::params::openstack::virtual_cluster_name,
|
|
template => 'Template OpenStack Cluster',
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
|
|
zabbix_template_link { "$zabbix::params::openstack::virtual_cluster_name Template App OpenStack Cinder API check":
|
|
host => $zabbix::params::openstack::virtual_cluster_name,
|
|
template => 'Template App OpenStack Cinder API check',
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
|
|
zabbix_template_link { "$zabbix::params::openstack::virtual_cluster_name Template App OpenStack Glance API check":
|
|
host => $zabbix::params::openstack::virtual_cluster_name,
|
|
template => 'Template App OpenStack Glance API check',
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
|
|
zabbix_template_link { "$zabbix::params::openstack::virtual_cluster_name Template App OpenStack Keystone API check":
|
|
host => $zabbix::params::openstack::virtual_cluster_name,
|
|
template => 'Template App OpenStack Keystone API check',
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
|
|
zabbix_template_link { "$zabbix::params::openstack::virtual_cluster_name Template App OpenStack Nova API OSAPI check":
|
|
host => $zabbix::params::openstack::virtual_cluster_name,
|
|
template => 'Template App OpenStack Nova API OSAPI check',
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
|
|
zabbix::agent::userparameter {
|
|
'db.token.count.query':
|
|
command => "/etc/zabbix/scripts/query_db.py token_count";
|
|
'db.instance.error.query':
|
|
command => "/etc/zabbix/scripts/query_db.py instance_error";
|
|
'db.services.offline.nova.query':
|
|
command => "/etc/zabbix/scripts/query_db.py services_offline_nova";
|
|
'db.instance.count.query':
|
|
command => "/etc/zabbix/scripts/query_db.py instance_count";
|
|
'db.cpu.total.query':
|
|
command => "/etc/zabbix/scripts/query_db.py cpu_total";
|
|
'db.cpu.used.query':
|
|
command => "/etc/zabbix/scripts/query_db.py cpu_used";
|
|
'db.ram.total.query':
|
|
command => "/etc/zabbix/scripts/query_db.py ram_total";
|
|
'db.ram.used.query':
|
|
command => "/etc/zabbix/scripts/query_db.py ram_used";
|
|
'db.services.offline.cinder.query':
|
|
command => "/etc/zabbix/scripts/query_db.py services_offline_cinder";
|
|
'nova.api.status':
|
|
command => "/etc/zabbix/scripts/check_api.py nova_os http ${::zabbix::params::openstack::nova_vip} 8774";
|
|
'glance.api.status':
|
|
command => "/etc/zabbix/scripts/check_api.py glance http ${::zabbix::params::openstack::glance_vip} 9292";
|
|
'keystone.api.status':
|
|
command => "/etc/zabbix/scripts/check_api.py keystone http ${::zabbix::params::openstack::keystone_vip} 5000";
|
|
'keystone.service.api.status':
|
|
command => "/etc/zabbix/scripts/check_api.py keystone_service http ${::zabbix::params::openstack::keystone_vip} 35357";
|
|
'cinder.api.status':
|
|
command => "/etc/zabbix/scripts/check_api.py cinder http ${::zabbix::params::openstack::cinder_vip} 8776";
|
|
}
|
|
|
|
}
|
|
}
|