Page 1 of 1

check_uptime with check_nrpe_v2

Posted: Fri Oct 13, 2023 2:41 pm
by JohnFLi
I am having some brain issues today, so I am hoping somebody might be able to point me in the right direction.

I am needing a check that will let me know if a server (windows) has not restarted in under 30 days.
check_uptime.jpg
if i just run the check as is, it returns
OK: uptime: 1w 2d 10:5h, boot: 2023-10-04 09:34:55 (UTC)|'uptime'=813920s;172800;86400

any thoughts on what I need to do to accomplish my goal?

Re: check_uptime with check_nrpe_v2

Posted: Thu Oct 19, 2023 3:42 pm
by cbyers
Good afternoon JohnFLi,

Are you are using NSClient++ on your windows server ? If so you can find NSClient's documentation via the link below:
https://nsclient.org/docs/
Unfortunately NSClient++ isn't our product and as a result we can't provide any official support or guidance for it. Have you tried using NCPA ?
If you are willing to try NCPA here is a link regarding information about it:
https://www.nagios.org/ncpa/

Re: check_uptime with check_nrpe_v2

Posted: Fri Oct 20, 2023 9:00 am
by JohnFLi
I have nsClient++ and NCPA installed (in process of migrating to ncpa)

if you know how to have ncpa check for uptime, please let me know.

Re: check_uptime with check_nrpe_v2

Posted: Tue Oct 24, 2023 9:52 am
by cbyers
Good morning JohnFLi,

I created a new check command in the core config manager. This is the command I created:
$USER1$/check_ncpa.py -H $HOSTADDRESS$ -t $_HOSTTOKEN$ -M $ARG1$ $ARG2$
From there I created a service using the check command I just created
$ARG1$: 'system/uptime'
$ARG2$: -c 2592000 -w 2419200
The warning is at the 28th day, while the critical is at the 30th day. You can change those (time in seconds) as you see fit for your alerting desires.
I then created a free variable in the host I wanted to monitor called _token and gave it the value of the NCPA token for that machine. If you only use one token for everything or only have one machine you can just put in your token instead of $_HOSTTOKEN$

If you have anymore questions please feel free to reach out

Re: check_uptime with check_nrpe_v2

Posted: Wed Dec 20, 2023 9:44 am
by JohnFLi
Sorry for the delay...

Thank you for your assistance on this.