Script to notify when system is up x days

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
hoffman2503
Posts: 4
Joined: Thu Aug 11, 2016 8:57 am

Script to notify when system is up x days

Post by hoffman2503 »

Hi team,

I was wondering, if any of you knows any script can run on Windows to notify Nagios to notify the users when the Windows is up 90 days and post a custom alert message?

Thanks for all your time.
hoffman2503
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Script to notify when system is up x days

Post by rkennedy »

It's a bit beyond the support we can provide, but you should be able to modify this powershell script to work for your needs. It'll output the variable uptime at the end, which you could use to set up your own if conditions.

http://ss64.com/ps/syntax-get-uptime.html
Former Nagios Employee
Locked