Manually update components from command line?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Manually update components from command line?

Post by eloyd »

Is there a command line equivalent of "Check for updates" and "Install updates" in the Nagios XI Admin -> Manage Components screen? We have a customer that wants to automate this process and I realized we had no knowledge of a script that did that, outside of the update script from a fresh install.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Manually update components from command line?

Post by npolovenko »

@eloyd, This is currently not possible. I can submit a feature request on your behalf if you'd like. Otherwise, you can try making a php script and have it require '/usr/local/nagiosxi/basedir/html/admin/components.php', then call the following functions:
do_checkupdates()
followed by
do_configure()
This should work in theory but needs to be tested.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Manually update components from command line?

Post by eloyd »

Feature request me, please! :-)

In the meantime, I'm happy to go test....

Code: Select all

<html>
<body>
<data>Find big hammer...</data>
</body>
</html>
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Manually update components from command line?

Post by npolovenko »

@eloyd, Ok, I will submit it!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Manually update components from command line?

Post by eloyd »

Can't do it without a session ID, and I'm not ready to start hacking together a session ID from the command line. Maybe there's a way to do it with a valid token Id....
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Manually update components from command line?

Post by npolovenko »

@eloyd, I see. I don't think token is going to work here because it is used just for the API right now. Guess we'll have to wait for Devs to look into this feature request then.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Manually update components from command line?

Post by eloyd »

My next attempt will be via scripted curl, but I'm too lazy to program that before I leave for the day. :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Manually update components from command line?

Post by npolovenko »

@eloyd, No problem, let us know how it goes when you get to it!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked