Page 1 of 1
Get License Key information from command line
Posted: Wed Nov 15, 2017 3:12 pm
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
Re: Get License Key information from command line
Posted: Wed Nov 15, 2017 3:59 pm
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.
Re: Get License Key information from command line
Posted: Thu Nov 16, 2017 7:24 am
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
Re: Get License Key information from command line
Posted: Thu Nov 16, 2017 11:19 am
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!
Re: Get License Key information from command line
Posted: Thu Nov 16, 2017 1:10 pm
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
Re: Get License Key information from command line
Posted: Thu Nov 16, 2017 2:42 pm
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.
Re: Get License Key information from command line
Posted: Wed Nov 29, 2017 2:42 pm
by lrnnetops
Hi lmiltchev / Team,
Thank you for your help.
Please mark this ticker as resolved.
Regards,
Rohan