Manually update components from command line?
Manually update components from command line?
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.
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?
@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:
This should work in theory but needs to be tested.do_checkupdates()
followed by
do_configure()
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Manually update components from command line?
Feature request me, please! 
In the meantime, I'm happy to go test....
In the meantime, I'm happy to go test....
Code: Select all
<html>
<body>
<data>Find big hammer...</data>
</body>
</html>
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?
@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.
Re: Manually update components from command line?
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....
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?
@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.
Re: Manually update components from command line?
My next attempt will be via scripted curl, but I'm too lazy to program that before I leave for the day. 
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?
@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.