We use Zabbix for montoring of the Openstack clusters. Each cluster/region has a set of Zabbix-proxies that relay monitoring data to the Zabbix server.
The discovery rules help registering the Openstack infrastructure servers to be monitored in Zabbix. We use two rules for each platform; one for servers running the Zabbix-agents and one for the BMC of physical servers (SNMP based).
The following configuration is needed for each discovery rule:
As the BMC network is highly protected we use the default SNMP community "public". Create discovery checks setting check-type "SNMPv2 agent" and the following OIDs:
These OID work for HP (ILO) and Dell (iDrac) servers.
Add the following checks:
We have a number of discovery actions i Zabbix that adds hosts, configures servergroups and links templates as Zabbix agents and other services are discovered.
These actions can be grouped as follows:
To monitor the Openstack controllplane we need one infrastructure VM (usually named "apimon"-something) in each region to run our Openstack Zabbix template. This VM needs to have the API clients for Openstack and the Zabbix client installed. This is achieved by assigning the server the Puppet role "apimon".
In the "services" project of the Openstack platform there should be a user named "apicheck". Create it as a member of the "services" project if it doesn't exist. Also create a application credential for this user.
Before assigning the "NTNU Openstack" Zabbix-template to the VM, we must configure some Zabbix macro-values that the template needs to be able to access the Openstack APIs. These are summarized in the following table.
| Macro-name | Description | Value | Default |
|---|---|---|---|
| {$OPENSTACK.DATABASE.HOST} | FQDN of the Openstack MySQL cluster | adminapi.<PLATFORM>.ntnu.no | NA |
| {$OPENSTACK.DATABASE.PASSWORD} | Password of the "zabbix_ro"-user on MySQL cluster | Is found in Heira-key ntnuopenstack::zabbix::database::password | NA |
| {$OPENSTACK.DATABASE.USER} | Username to use for MySQL cluster. | Is set by Heira-key ntnuopenstack::zabbix::database::username | zabbix_ro |
| {$OPENSTACK.APPCRED.ID} | App cred ID for the "apicheck" user. | Is found in Heira: profile::zabbix::openstack::appcred::id | NA |
| {$OPENSTACK.APPCRED.SECRET} | App cred secret for the "apicheck" user. | Is found in Heira: profile::zabbix::openstack::appcred::secret | NA |
| {$OPENSTACK.APPCRED.PASSWORD} | The password of the "apicheck" user. | Is found in Heira: profile::zabbix::openstack::apicheck::password | NA |
| {$OPENSTACK.ADMIN.API.FQDN} | adminapi.<PLATFORM>.ntnu.no | NA | |
| {$OPENSTACK.HORIZON.FQDN} | FQDN of Horzion frontend | NA | |
| {$OPENSTACK.KEYSTONE.API.FQDN} | api.<PLATFORM>.ntnu.no | NA | |
| {$OPENSTACK.PUBLIC.API.FQDN} | api.<PLATFORM>.ntnu.no | NA | |
| {$OPENSTACK.SWIFT.API.FQDN} | s3.<PLATFORM>.ntnu.no | NA |
We also check the availability of some webservices from the apimon-server. This is done by the "NTNU - Web" template.
| Macro-name | Description | Value | Default |
|---|---|---|---|
| {$SHIFTLEADER.FQDN} | FQDN for the Shiftleader server for the platform | NA | |
| {$ZABBIX.FQDN} | FQDN for the Zabbix-server for the platform | NA |
In addition to the macros mentioned above, there are some macros that needs to be set specifically for some services.
| Service | Description | Macro-name | Value | Default |
|---|---|---|---|---|
| Apache | {$APACHE.PROCESS_NAME} | apache2 | httpd | |
| HAProxy (adminlb and servicelb servers) | {$HAPROXY.STATS.PATH} | / | NA | |
| {$HAPROXY.STATS.PORT} | 9000 | NA | ||
| MySQL | {$MYSQL.DSN} | /var/run/mysqld/mysqld.sock | NA | |
| {$MYSQL.USER} | zabbix_agent | NA | ||
| RabbitMQ | {$RABBITMQ.API.USER} | Found in Heira profile::rabbitmq::rabbituser | NA | |
| {$RABBITMQ.API.PASSWORD} | Found in Heira profile::rabbitmq::rabbitpass | NA | ||
| PostgreSQL | {$PG.USER} | zbx_monitor | NA | |
| {$PG.PASSWORD} | Found in Heira profile::postgres::zbx_monitor_password | NA |