Page 1 of 1
active xi license from shell command
Posted: Sun Aug 18, 2019 9:12 am
by elade
Hi,
There is any way to activate XI license from server shell and not from the GUI?
Re: active xi license from shell command
Posted: Mon Aug 19, 2019 10:28 am
by benjaminsmith
Hi
@elade,
That functionality doesn't exist int the API, and I can submit a feature request on your behalf if you'd like. However, the license keys are stored in the
nagiosxi database, and you can query the db for view license keys/update values.
See this post:
Get license Key from the command line
For a mysql/mariadb datatabase, run the following command to view the license:
Code: Select all
echo "SELECT value FROM xi_options where name='license_key';" | mysql -u root -pnagiosxi nagiosxi
To change the license key values, run the following command:
Code: Select all
echo "UPDATE xi_options SET value='###licensekey###' where name='license_key';" | mysql -u root -pnagiosxi nagiosxi
Re: active xi license from shell command
Posted: Wed Aug 21, 2019 2:30 am
by elade
Hi benjaminsmith,
I would like to add this as feature request.
You can close the topic.
Re: active xi license from shell command
Posted: Wed Aug 21, 2019 9:19 am
by benjaminsmith
Hi
@elade,
I would like to add this as feature request.
Will do. Thanks for the input.
Re: active xi license from shell command
Posted: Wed Aug 21, 2019 10:58 am
by benjaminsmith
Hi
@elade,
Update. Turns out that if you're running a recent version of Nagios XI, you can do this from the command line from the following script:
Code: Select all
/usr/local/nagiosxi/tools/mod_license.php --help
Re: active xi license from shell command
Posted: Thu Oct 03, 2019 2:17 am
by elade
This mod is not appear in version 5.5.8 under /usr/local/nagiosxi/tools/
Re: active xi license from shell command
Posted: Thu Oct 03, 2019 7:25 am
by scottwilkerson
elade wrote:This mod is not appear in version 5.5.8 under /usr/local/nagiosxi/tools/
That is correct, it was added in 5.6.3