Page 2 of 2

Re: Windows Activation Monitoring

Posted: Wed Aug 25, 2021 3:57 pm
by vtrac
Hi,
You can add the if/then condition to your bat script to check for number of days left.

I'm not a programmer, so please find someone with that knowledge ... :-)

I would check for number of days left, for example:

Code: Select all

if dayleft <= 60
    exist 1
elseif daysleft <= 30
    exist 2
else
    exist 0
Nagios understands the following exit codes:
0 - Service is OK.
1 - Service has a WARNING.
2 - Service is in a CRITICAL status.
3 - Service status is UNKNOWN.


Regards,
Vinh

Re: Windows Activation Monitoring

Posted: Thu Sep 30, 2021 5:10 am
by kalyanpabolu
Hello,

We have written a batch script in which we will receive an alert 30 days before the license expires. Thank you so much for all your support. :D

Regards,
Devendra

Re: Windows Activation Monitoring

Posted: Thu Sep 30, 2021 9:05 am
by vtrac
Great!! ... closing thread ... :-)