Long check output (>255) and dropped State History
Posted: Fri Jan 29, 2016 9:26 am
Hi,
It looks like some check results are not saved into State History because the output is too long (>255 chars). I'm currently experiencing this with a passive check (SNMP traps, using the wizard -> with volatile+stalking options on so that is not the problem), but maybe this also applies to active checks.
Compare these:
Status information field on the Service Status page (full output show):
This event is generated whenever a threshold crossing has 10.54.17.2 2 Threshold 84 86 0 DHCP high threshold reset: Member: 10.54.17.2 Network: 172.19.4.0/24/default Range: 172.19.4.40/172.19.4.230///default/ High Trigger Mark: 86% High Reset Mark: 85% Current Usage: 84% Active Leases: 162 Available Leases: 29 Total Addresses: 191 / ibNodeName.0 (OCTETSTR):10.54.17.2 ibTrapSeverity.0 (INTEGER):2 ibObjectName.0 (OCTETSTR):Threshold ibCurThresholdValue.0 (INTEGER):84 ibThresholdHigh.0 (INTEGER):86 ibThresholdLow.0 (INTEGER):0 ibTrapDesc.0 (OCTETSTR):DHCP high threshold reset: Member: 10.54.17.2 Network: 172.19.4.0/24/default Range: 172.19.4.40/172.19.4.230///default/ High Trigger Mark: 86% High Reset Mark: 85% Current Usage: 84% Active Leases: 162 Available Leases: 29 Total Addresses: 191
Information field on the Event Log page (trimmed output, but no problem for me that this is trimmed here):
SERVICE ALERT: gen-infoblox-n02-lan;SNMP Traps;OK;HARD;1;This event is generated whenever a threshold crossing has 10.54.17.2 2 Threshold 84 86 0 DHCP high threshold reset: Member: 10.54.17.2 Network: 172.19.4.0/24/default Range: 172.19.4.40/172.19.
State History page:
Not showing these check results (while multiple similar traps have been sent). It does show 2 traps however that have a small ouput.
I did some digging and found this:
Are the results being dropped from State History because the output field is only 255 chars? What is the long_output? This does not seem to be used then?
XI version: 5.2.3
It looks like some check results are not saved into State History because the output is too long (>255 chars). I'm currently experiencing this with a passive check (SNMP traps, using the wizard -> with volatile+stalking options on so that is not the problem), but maybe this also applies to active checks.
Compare these:
Status information field on the Service Status page (full output show):
This event is generated whenever a threshold crossing has 10.54.17.2 2 Threshold 84 86 0 DHCP high threshold reset: Member: 10.54.17.2 Network: 172.19.4.0/24/default Range: 172.19.4.40/172.19.4.230///default/ High Trigger Mark: 86% High Reset Mark: 85% Current Usage: 84% Active Leases: 162 Available Leases: 29 Total Addresses: 191 / ibNodeName.0 (OCTETSTR):10.54.17.2 ibTrapSeverity.0 (INTEGER):2 ibObjectName.0 (OCTETSTR):Threshold ibCurThresholdValue.0 (INTEGER):84 ibThresholdHigh.0 (INTEGER):86 ibThresholdLow.0 (INTEGER):0 ibTrapDesc.0 (OCTETSTR):DHCP high threshold reset: Member: 10.54.17.2 Network: 172.19.4.0/24/default Range: 172.19.4.40/172.19.4.230///default/ High Trigger Mark: 86% High Reset Mark: 85% Current Usage: 84% Active Leases: 162 Available Leases: 29 Total Addresses: 191
Information field on the Event Log page (trimmed output, but no problem for me that this is trimmed here):
SERVICE ALERT: gen-infoblox-n02-lan;SNMP Traps;OK;HARD;1;This event is generated whenever a threshold crossing has 10.54.17.2 2 Threshold 84 86 0 DHCP high threshold reset: Member: 10.54.17.2 Network: 172.19.4.0/24/default Range: 172.19.4.40/172.19.
State History page:
Not showing these check results (while multiple similar traps have been sent). It does show 2 traps however that have a small ouput.
I did some digging and found this:
Code: Select all
mysql> DESCRIBE nagios_statehistory;
+-----------------------+---------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+---------------+------+-----+---------------------+----------------+
| statehistory_id | int(11) | NO | PRI | NULL | auto_increment |
| instance_id | smallint(6) | NO | | 0 | |
| state_time | datetime | NO | MUL | 0000-00-00 00:00:00 | |
| state_time_usec | int(11) | NO | | 0 | |
| object_id | int(11) | NO | MUL | 0 | |
| state_change | smallint(6) | NO | | 0 | |
| state | smallint(6) | NO | | 0 | |
| state_type | smallint(6) | NO | | 0 | |
| current_check_attempt | smallint(6) | NO | | 0 | |
| max_check_attempts | smallint(6) | NO | | 0 | |
| last_state | smallint(6) | NO | | -1 | |
| last_hard_state | smallint(6) | NO | | -1 | |
| output | varchar(255) | NO | | | |
| long_output | varchar(8192) | NO | | | |
+-----------------------+---------------+------+-----+---------------------+----------------+
14 rows in set (0.00 sec)XI version: 5.2.3