Page 1 of 3
Notifications for Windows disk usage are not sent out
Posted: Fri Oct 21, 2016 7:34 pm
by genmais
I am using Nagios XI and have updated from 2012r2.9 to 5.3.1 recently. Now notifications for Windows disk usage are no longer sent out.
Disk usage is monitored by
Code: Select all
check_xi_service_snmp_win_storage! -C public --v2c -m ^C: -w 70 -c 80 -f
which produces the following output:
C:\ Label:System Serial Number e28c2a7c: 69%used(42648MB/61440MB) (<70%) : OK | 'C:\_Label:System__Serial_Number_e28c2a7c'=42648MB;43008;49152;0;61440
XI Event Log and Notifications reports show the notification properly. However, no email is sent.
The eventman.log shows the following error:
PHP Notice: unserialize(): Error at offset 937 of 1020 bytes in /usr/local/nagiosxi/cron/eventman.php on line 145
*** GLOBAL HANDLER...
Array
(
[event_id] => 50070
[event_source] => 2
[event_type] => 2
[event_time] => 2016-10-22 01:20:21
[event_meta] =>
[logging_enabled] => 1
)
*** GLOBAL HANDLER (snmptrapsender)...
Array
(
[event_id] => 50070
[event_source] => 2
[event_type] => 2
[event_time] => 2016-10-22 01:20:21
[event_meta] =>
[logging_enabled] => 1
)
ERROR: Could not find user_id for contact ''
It seems that the event_meta could not be parsed and so it's empty. Hence, no contact is found. For other services (e.g. Linux disk usage) the eventman.log shows that event_meta includes an Array with all event data.
I assume that parsing the output of check_xi_service_snmp_win_storage was broken (if the output includes Windows volume information).
Is there any fix available? Thanks!
Re: Notifications for Windows disk usage are not sent out
Posted: Sun Oct 23, 2016 9:43 pm
by Box293
Can you please post your service definition for this particular service.
Re: Notifications for Windows disk usage are not sent out
Posted: Mon Oct 24, 2016 12:08 am
by genmais
Hi,
Thanks for taking a closer look into my issue.
Here is the config snippet of the service:
define service {
host_name mywindowshost
service_description Drive C: Disk Usage
use xiwizard_windowssnmp_storage
check_command check_xi_service_snmp_win_storage! -C public --v2c -m ^C: -w 70 -c 80 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts nagiosadmin
_xiwizard windowssnmp
register 1
}
Re: Notifications for Windows disk usage are not sent out
Posted: Mon Oct 24, 2016 3:29 pm
by ssax
Sounds like you may have crashed tables, please check your
/var/log/mysqld.log or your
/var/log/mariadb/mariadb.log to see if you see any crashed tables messages, if you do please follow this KB article here:
https://support.nagios.com/kb/article.php?id=24
Thank you
Re: Notifications for Windows disk usage are not sent out
Posted: Tue Oct 25, 2016 12:41 am
by genmais
Hi,
I've checked the log(s). There is no single error in /var/log/mysqld.log, mariadb.log does not exist. So it seems that crashed tables are not the cause.
If your assumption was correct, wouldn't this affect all services and notifications?
On my system there are only issues with three particular services that monitor Windows drive usage each. For all other services (including Linux drive usage) things work fine.
Any other ideas? Thanks...!
Re: Notifications for Windows disk usage are not sent out
Posted: Tue Oct 25, 2016 10:39 am
by rkennedy
Could you post your /usr/local/nagios/var/objects.cache file for us to look at, as this will be all of your compiled definitions (after templates)?
Then, please provide the host and service name for the working one that is running your linux drive usage.
Re: Notifications for Windows disk usage are not sent out
Posted: Tue Oct 25, 2016 2:04 pm
by genmais
I've copied two snippets from /usr/local/nagios/var/objects.cache, the one from the non-working Windows disk usage and the one from the well-working Linux disk usage. If you like to get the entire objects.cache I can send it by private message. I don't want to disclose my entire host/service config here.
define service {
host_name mywindowshost
service_description Drive C: Disk Usage
check_period xi_timeperiod_24x7
check_command check_xi_service_snmp_win_storage! -C public --v2c -m ^C: -w 70 -c 80 -f
contacts nagiosadmin
notification_period xi_timeperiod_24x7
initial_state o
importance 0
check_interval 5.000000
retry_interval 1.000000
max_check_attempts 5
is_volatile 0
parallelize_check 1
active_checks_enabled 1
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options a
freshness_threshold 0
check_freshness 0
notification_options a
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
_XIWIZARD windowssnmp
}
define service {
host_name mylinuxhost
service_description Root Partition
check_period xi_timeperiod_24x7
check_command check_xi_service_snmp_linux_storage! -C public --v2c -m "^/$" -w 80 -c 95 -f!!!!!!!
contacts nagiosadmin
notification_period xi_timeperiod_24x7
initial_state o
importance 0
check_interval 5.000000
retry_interval 1.000000
max_check_attempts 5
is_volatile 0
parallelize_check 1
active_checks_enabled 1
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options a
freshness_threshold 0
check_freshness 0
notification_options a
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
_XIWIZARD linuxsnmp
}
For me both look pretty similar...
Re: Notifications for Windows disk usage are not sent out
Posted: Tue Oct 25, 2016 2:26 pm
by dwhitfield
Yes, please PM the objects.cache to one of the techs. If you PM it to me, I will put it in a private location for the techs.
EDIT: objects.cache received and on private network store.
Re: Notifications for Windows disk usage are not sent out
Posted: Tue Oct 25, 2016 7:55 pm
by genmais
I've sent a PM to dwhitfield with objects.cache attached.
Re: Notifications for Windows disk usage are not sent out
Posted: Wed Oct 26, 2016 1:34 pm
by tgriep
Can you run the following 2 commands as root on the XI server and post the output?
Code: Select all
echo "\d xi_usermeta;" | psql nagiosxi nagiosxi
tail -50 /var/lib/pgsql/data/pg_log/postgresql-Wed.log
Then run this command as root on the XI server
Code: Select all
tail -f /usr/local/nagiosxi/var/e*
Then in the XI GUI, go to the Home Service details menu and select the service that is not sending the notifications. click on the Advanced Tab and send a custom notification.
Then post the output of the tail command.