Information about license status ( Win Srv 2008 )
Information about license status ( Win Srv 2008 )
Hi,
Can you tell me if it is possible to pull somehow in Nagios the information about time remaining ? ( like as below image )
Cheers,
bb
Can you tell me if it is possible to pull somehow in Nagios the information about time remaining ? ( like as below image )
Cheers,
bb
You do not have the required permissions to view the files attached to this post.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Information about license status ( Win Srv 2008 )
You can get that line from running the following
You can create a command with that line in NSClient++ to return the data to Nagios.
This isn't going to do any checking on if it is expired, you would have to write a file script to parse that data if you wanted to do that.
Code: Select all
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "Time Remaining"
This isn't going to do any checking on if it is expired, you would have to write a file script to parse that data if you wanted to do that.
Re: Information about license status ( Win Srv 2008 )
So,
I created the command in NSClient++ file. There are two more commands functioning correctly. The script should return "Licensed" but it returns "Error: product key not found."
I created the command in NSClient++ file. There are two more commands functioning correctly. The script should return "Licensed" but it returns "Error: product key not found."
You do not have the required permissions to view the files attached to this post.
Re: Information about license status ( Win Srv 2008 )
All settings below :
You do not have the required permissions to view the files attached to this post.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Information about license status ( Win Srv 2008 )
Can you post the output of running this from the windows command line
and
Code: Select all
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli
Code: Select all
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "Time Remaining"
Re: Information about license status ( Win Srv 2008 )
Code: Select all
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "Time Remaining"
You do not have the required permissions to view the files attached to this post.
Re: Information about license status ( Win Srv 2008 )
I tried below command :
which returns
Nagios output is "Unrecognized option: -dli ".
Code: Select all
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "License Status"
Nagios output is "Unrecognized option: -dli ".
You do not have the required permissions to view the files attached to this post.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Information about license status ( Win Srv 2008 )
Ok, we did some work on this for you and here is what we came up with:
Create a file license.bat in C:\Program Files\NSClient++\scripts with the following contents
Change your NSC.ini to be
restart NSClient++ service
Create a file license.bat in C:\Program Files\NSClient++\scripts with the following contents
Code: Select all
@echo off
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli | find "Time Remaining"
Code: Select all
check_license=scripts\license.bat
Re: Information about license status ( Win Srv 2008 )
It is OK now.
Thank you !
Thank you !
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Information about license status ( Win Srv 2008 )
Awesome.
Glad you got it working.
Glad you got it working.