Trying to Clean config for check_restart NRPE call

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Nicholson
Posts: 2
Joined: Tue Aug 19, 2014 4:06 pm

Trying to Clean config for check_restart NRPE call

Post by Nicholson »

Here, or somewhere, I found some code that would help me monitor a Windows client reboot request in the Windows log files.
I found the attached bits and pieces and have added the servers snippet: here it is:

# Check Required Restart
define service{
use generic-service
host_name windows_ax_servers
service_description Event Log Restart Req
check_command check_restart
}

I also added the command to that config file (attached). And I enabled a bunch of flags in the nsc.ini file on the client servers. I recall adding a command as well, but am not recognizing it now. I am attaching the nsc.ini file

I have attached both of these, and the body of the email I received today (attached); this is after 4 days since I was notified by the vendor who is working on this project let us know about the pending reboots.

The body of this email indicates that the process is working, but obviously not optimally. I believe it is sending the critical notification once it has reached some threshold, although I cannot figure out how to configure that, or the other arguments.

Can anyone point me to a web or book location that will educate me on this? Any answers appreciated.
Attachments
NSC.ini
client ini file
(12.88 KiB) Downloaded 101 times
emailed_critical.txt
Output after 4 days
(1.01 KiB) Downloaded 102 times
commands_snip.txt
snip of command from commands.cfg
(354 Bytes) Downloaded 128 times
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Trying to Clean config for check_restart NRPE call

Post by Box293 »

This page explains CheckEventLog and filters:

http://www.nsclient.org/nscp/wiki/Check ... k_eventlog

It can be pretty frustrating using NSClient++ at times. I suggest the following in your nsc.ini:

[log]
debug=1
file=nsclient.log

Save and restart NSClient++ Service.

Execute your command from the Nagios CLI, and then refer to the nsclient.log file as to what the command just performed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Nicholson
Posts: 2
Joined: Tue Aug 19, 2014 4:06 pm

Re: Trying to Clean config for check_restart NRPE call

Post by Nicholson »

This helped quite a bit; I had uncommented out the calls in the NSC.ini file, but I was still getting a load of useless information back. I went back to the deprecated Nagios wiki (we are running an older version of Core) and found a command template that I was able to modify for what I needed.

I still have a lot to learn about this tool, and will stay tuned to more information here.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Trying to Clean config for check_restart NRPE call

Post by slansing »

Awesome, yeah let us know if you have any questions, we're here to help!
Locked