icingaDB - Performance status and counters

Before you ask a question, you can check the troubleshooting documentation first, maybe you can find an answer here.

Please describe your problem as detailed as possible and don’t forget to use a meaningful title :slight_smile:
We also have a markdown formatting guide to help you make your topics more readable!

Give as much information as you can, e.g.

  • Icinga DB Web version (System - About):v1.0.0-rc2-dev
  • Icinga Web 2 version (System - About): 2.9.5
  • Web browser: Chrome (latest)
  • Icinga 2 version (icinga2 --version): 2.13.2-1
  • Icinga DB version (icingadb --version): v1.0.0-rc2-dev
  • PHP version used (php --version): PHP 7.1.8 (cli) (built: Aug 8 2017 09:01:08)
  • Server operating system and version: Red Hat Enterprise Linux Server release 7.6
  1. Can we have performance status for icingaDB, same like idoqueue details for IDO DB.

“status”: {
“idomysqlconnection”: {
“ido-mysql”: {
“connected”: true,
“instance_name”: “default”,
“query_queue_item_rate”: 860.2333333333333,
“query_queue_items”: 0,
“version”: “1.15.1”
}
}
}
2. Is there any reason why many fields are binary format of tables in icingaDB.
icinga(IDO):
mysql> describe icinga_zones;
±----------------------±--------------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±----------------------±--------------------±-----±----±--------±---------------+
| zone_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| instance_id | bigint(20) unsigned | YES | | 0 | |
| zone_object_id | bigint(20) unsigned | YES | MUL | 0 | |
| config_type | smallint(6) | YES | | 0 | |
| parent_zone_object_id | bigint(20) unsigned | YES | MUL | 0 | |
| is_global | smallint(6) | YES | | NULL | |
| config_hash | varchar(64) | YES | | NULL | |
±----------------------±--------------------±-----±----±--------±---------------+

icingaDB:
mysql> describe zone;
±--------------------±--------------------±-----±----±--------±------+
| Field | Type | Null | Key | Default | Extra |
±--------------------±--------------------±-----±----±--------±------+
| id | binary(20) | NO | PRI | NULL | |
| environment_id | binary(20) | NO | MUL | NULL | |
| name_checksum | binary(20) | NO | | NULL | |
| properties_checksum | binary(20) | NO | | NULL | |
| name | varchar(255) | NO | | NULL | |
| name_ci | varchar(255) | NO | | NULL | |
| is_global | enum(‘n’,‘y’) | NO | | NULL | |
| parent_id | binary(20) | YES | MUL | NULL | |
| depth | tinyint(3) unsigned | NO | | NULL | |
±--------------------±--------------------±-----±----±--------±------+

We have many sql queries to check stale hosts issue and other environment specific queries on current icinga and unable to obtain similar data from icingaDB.

Any pointers to get those binary fields in readable format would be very helpful.

Thanks
MB

Hi,

  1. There’s the status type IcingaDB in the status endpoint of the Icinga 2 api. Though, it doesn’t provide the same details, you’d want to open a feature request over at the Icinga 2 issue tracker.

  2. I can’t give you a reason. By looking at the schema you’ll notice there are comments describing the ids. Though, why do you need them in a readable format? Just use them as they are, you shouldn’t care how they’re created if you are simply querying. If you can’t handle binary in your script due to encoding issues, handle them with the HEX / UNHEX functions at the query level.

Thanks Johannes,
I have opened https://github.com/Icinga/icinga2/issues/9374 for the same