Notifications for Windows disk usage are not sent out

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
genmais
Posts: 19
Joined: Sun Jan 12, 2014 3:19 am

Notifications for Windows disk usage are not sent out

Post 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 | &apos;C:\_Label:System__Serial_Number_e28c2a7c&apos;=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!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Notifications for Windows disk usage are not sent out

Post by Box293 »

Can you please post your service definition for this particular service.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
genmais
Posts: 19
Joined: Sun Jan 12, 2014 3:19 am

Re: Notifications for Windows disk usage are not sent out

Post 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
}
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Notifications for Windows disk usage are not sent out

Post 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
genmais
Posts: 19
Joined: Sun Jan 12, 2014 3:19 am

Re: Notifications for Windows disk usage are not sent out

Post 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...!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Notifications for Windows disk usage are not sent out

Post 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.
Former Nagios Employee
genmais
Posts: 19
Joined: Sun Jan 12, 2014 3:19 am

Re: Notifications for Windows disk usage are not sent out

Post 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...
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Notifications for Windows disk usage are not sent out

Post 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.
genmais
Posts: 19
Joined: Sun Jan 12, 2014 3:19 am

Re: Notifications for Windows disk usage are not sent out

Post by genmais »

I've sent a PM to dwhitfield with objects.cache attached.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Notifications for Windows disk usage are not sent out

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked