Information about license status ( Win Srv 2008 )

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bogdan_B
Posts: 34
Joined: Fri Aug 03, 2012 1:56 am

Information about license status ( Win Srv 2008 )

Post by Bogdan_B »

Hi,

Can you tell me if it is possible to pull somehow in Nagios the information about time remaining ? ( like as below image )
001.jpg
Cheers,
bb
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Information about license status ( Win Srv 2008 )

Post by scottwilkerson »

You can get that line from running the following

Code: Select all

cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "Time Remaining"
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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bogdan_B
Posts: 34
Joined: Fri Aug 03, 2012 1:56 am

Re: Information about license status ( Win Srv 2008 )

Post by Bogdan_B »

So,

I created the command in NSClient++ file. There are two more commands functioning correctly.
nsclient.jpg
The script should return "Licensed" but it returns "Error: product key not found."
script_win.jpg
returned.jpg
You do not have the required permissions to view the files attached to this post.
Bogdan_B
Posts: 34
Joined: Fri Aug 03, 2012 1:56 am

Re: Information about license status ( Win Srv 2008 )

Post by Bogdan_B »

All settings below :
command.jpg
serv_manag.jpg
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Information about license status ( Win Srv 2008 )

Post by scottwilkerson »

Can you post the output of running this from the windows command line

Code: Select all

cscript //NoLogo c:\windows\system32\slmgr.vbs -dli
and

Code: Select all

cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "Time Remaining"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bogdan_B
Posts: 34
Joined: Fri Aug 03, 2012 1:56 am

Re: Information about license status ( Win Srv 2008 )

Post by Bogdan_B »

command_promt.jpg
No output for last command.

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.
Bogdan_B
Posts: 34
Joined: Fri Aug 03, 2012 1:56 am

Re: Information about license status ( Win Srv 2008 )

Post by Bogdan_B »

I tried below command :

Code: Select all

cscript //NoLogo c:\windows\system32\slmgr.vbs -dli|find "License Status"
which returns
bbb.jpg
Nagios output is "Unrecognized option: -dli ".
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Information about license status ( Win Srv 2008 )

Post by scottwilkerson »

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

Code: Select all

@echo off
cscript //NoLogo c:\windows\system32\slmgr.vbs -dli | find "Time Remaining"
Change your NSC.ini to be

Code: Select all

check_license=scripts\license.bat
restart NSClient++ service
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bogdan_B
Posts: 34
Joined: Fri Aug 03, 2012 1:56 am

Re: Information about license status ( Win Srv 2008 )

Post by Bogdan_B »

It is OK now.

Thank you !
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Information about license status ( Win Srv 2008 )

Post by scottwilkerson »

Awesome.

Glad you got it working.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked