Get License Key information from command line

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Get License Key information from command line

Post by lrnnetops »

Hi Team,

We wanted to fetch "License Key" from one of our nagios XI license server from command line. reason for command line info is we have disabled network access of server.

Please let us know is earlier applied License Key gets stored in any file then share the name & location of file, if not in flat file then any nagios command which will fetch the details.

Regards,
Rohan
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Get License Key information from command line

Post by npolovenko »

@lrnnetops, You should be able to get the license key after you run the following query from your command line:

Code: Select all

 echo ' select * from xi_options;' |mysql -u root -pnagiosxi nagiosxi |grep license_key
Let us know if that works for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Get License Key information from command line

Post by lrnnetops »

Hi npolovenko,

Provided command did not worked as database mentioned in the command not their.

Our nagiosxi version was - 5.4.4

below are the only databases present on server.
db-names.JPG
when we execute command provided by you we got below output.
query2.JPG
Can you help us in which DB & table we should get the key.

Regards.
Rohan
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Get License Key information from command line

Post by lmiltchev »

If the "nagiosxi" db doesn't exist, this means that most probably it is in the postgresql database. If this is the case, you could run the following command the obtain the license key:

Code: Select all

echo 'select * from xi_options;' | psql nagiosxi postgres | grep license_key | awk '{print $5}'
Note: You you changed the "default" postgres password, modify the command above accordingly.

Let us know if this helped. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Get License Key information from command line

Post by lrnnetops »

Hi lmiltchev,

Thank you for the help.

Yes its a postgresql database.

We are able to see the key now, but same key was assigned to our another server which we removed & used 2 months back on our new server. at same time this server was live & we were able to see more that 100 hosts & more than 1000 services on it.

Is same key can be use on two different nagios XI server?

Regards,
Rohan
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Get License Key information from command line

Post by lmiltchev »

You can, but not if both are "production" servers. Each Nagios XI license is approved for up to three installations: one primary monitoring/production, one backup/failover, and one test environment. As long as you are only using one install for production monitoring, you are within the boundaries of our licensing policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Get License Key information from command line

Post by lrnnetops »

Hi lmiltchev / Team,

Thank you for your help.

Please mark this ticker as resolved.

Regards,
Rohan
Locked