Custom Reporting or Database

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Custom Reporting or Database

Post by peter.zanetti »

With the devices we monitor we have put them on power management putting them to sleep at night and waking them up in the morning. What I am trying to do is be able to verify that these devices are going to sleep. We can do this manually one by one in the GUI:
graph for device.PNG
Is there a place in the database where we can see the time the device actually stopped communicating? Is there a way to do this in the reporting tab?
You do not have the required permissions to view the files attached to this post.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Custom Reporting or Database

Post by jolson »

Do these devices generate alerts when they are put to sleep? It might be an interesting use case for the 'event timeline' report.
2015-06-16 11_43_52-Nagios XI - Reports - Firefox Developer Edition.png
Let me know if that report could help at all - it may be too cluttered depending on your environment.
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: Custom Reporting or Database

Post by peter.zanetti »

I will look into it but our environment on that server is close to 3500 hosts.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: Custom Reporting or Database

Post by peter.zanetti »

Yeah, I can't even get the page to load. Each device has 4 services that would send an alert to that report. Any other ideas?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Custom Reporting or Database

Post by jolson »

Am I correct in assuming that these devices are a combination of Windows hosts and Linux hosts? The easiest solution might be to monitor the event log for a 'sleep' message, and alert if one hasn't been generated in the last day or so.

Is that a solution that would work for you?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: Custom Reporting or Database

Post by peter.zanetti »

On this box all of the host are windows desktops.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Custom Reporting or Database

Post by jolson »

In that case, are you using NSClient to monitor these boxes? If so, you could use a command like this to check for a 'sleep' event log in the past day:

Code: Select all

[root@localhost nagios]# /usr/local/nagios/libexec/check_nrpe -H 192.168.x.x -c check_eventlog -a scan-range=24h filter=id=42 ok=count=1 warn=count=0 crit=count=0
OK: Event log seems fine|'count'=1;0;0
As a test, I put my computer to sleep and generated the event you see displayed above. If the event is not present, check_eventlog returns the following:

Code: Select all

[root@localhost nagios]# /usr/local/nagios/libexec/check_nrpe -H 192.168.x.x -c check_eventlog -a scan-range=24h filter=id=42 ok=count=1 warn=count=0 crit=count=0
CRITICAL: No entries found|'count'=0;0;0
Event ID 42 is the sleep event - this should be generated whenever a Windows Server/workstation enters sleep mode.

Please test the above and let me know if it will work for you. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: Custom Reporting or Database

Post by peter.zanetti »

I tried that and I got the response

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Custom Reporting or Database

Post by jolson »

It's likely that you need to add the following to your NSClient configuration on the Windows box in question.

Code: Select all

[/settings/default]
allowed hosts = 192.168.x.x

[/settings/NRPE/server]
insecure = 1
You can also use certificate-based authentication: http://www.medin.name/blog/2012/12/02/s ... ntication/
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: Custom Reporting or Database

Post by peter.zanetti »

What am I supposed to put instead of 192.168.x.x
Locked