nagiosxi/admin/updates.php via shell?
nagiosxi/admin/updates.php via shell?
Our servers are behind a private network and most of our settings have been working fine for this. The only thing that does not seem to be working is the web interface for "Check for Updates". I am having some trouble figuring out what to put in for the proxy configuration and would like some pointers for that.
Additionally, I was wondering if there was a way to run the updates.php script from the terminal (I have our proxy set up in our bash env for other tasks)?
We already automate removal of services/hosts with php scripts:
/usr/local/nagiosxi/scripts/nagiosql_delete_service.php
/usr/local/nagiosxi/scripts/nagiosql_delete_host.php
...and I know /usr/local/nagiosxi/scripts/reconfigure_nagios.sh also calls php scripts in line.
If I can be told the proper script to use and what arguments to feed it I would not have to use the web interface and can use the shell proxy settings I already use for upgrade installations. It may also help the XI community in implementing some other DevOps-y tasks like we use the scripts mentioned above.
Thanks,
Robert
Additionally, I was wondering if there was a way to run the updates.php script from the terminal (I have our proxy set up in our bash env for other tasks)?
We already automate removal of services/hosts with php scripts:
/usr/local/nagiosxi/scripts/nagiosql_delete_service.php
/usr/local/nagiosxi/scripts/nagiosql_delete_host.php
...and I know /usr/local/nagiosxi/scripts/reconfigure_nagios.sh also calls php scripts in line.
If I can be told the proper script to use and what arguments to feed it I would not have to use the web interface and can use the shell proxy settings I already use for upgrade installations. It may also help the XI community in implementing some other DevOps-y tasks like we use the scripts mentioned above.
Thanks,
Robert
Re: nagiosxi/admin/updates.php via shell?
Have you tried
locate .php | grep -i update
and
php </path/script>.php
After reading the script to make sure its just checking?
Use the same technique to do the update once you trust the update bit.
You have to be a bit of a detective to figure out Nagios stuff... :)
locate .php | grep -i update
and
php </path/script>.php
After reading the script to make sure its just checking?
Use the same technique to do the update once you trust the update bit.
You have to be a bit of a detective to figure out Nagios stuff... :)
Re: nagiosxi/admin/updates.php via shell?
This does not work as it looks to be crypted by SourceGuardian.gormank wrote:Have you tried
locate .php | grep -i update
and
php </path/script>.php
After reading the script to make sure its just checking?
Use the same technique to do the update once you trust the update bit.
Re: nagiosxi/admin/updates.php via shell?
I don't know php, but it should be trivial to create a script to call the function in this:
/usr/local/nagiosxi/html/includes/utils-updatecheck.inc.php
I'm not subtle... :)
find / -name *.php | grep nagios | xargs grep do_update_check
/root/nagios_install/files/install_admin.php:do_update_check(true,true);
/usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-misc.inc.php: do_update_check($force);
/usr/local/nagiosxi/html/includes/utils-updatecheck.inc.php:function do_update_check($forced = false, $firstcheck = false)
/usr/local/nagiosxi/html/install.php: do_update_check(true, true);
/usr/local/nagiosxi/html/includes/utils-updatecheck.inc.php
I'm not subtle... :)
find / -name *.php | grep nagios | xargs grep do_update_check
/root/nagios_install/files/install_admin.php:do_update_check(true,true);
/usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-misc.inc.php: do_update_check($force);
/usr/local/nagiosxi/html/includes/utils-updatecheck.inc.php:function do_update_check($forced = false, $firstcheck = false)
/usr/local/nagiosxi/html/install.php: do_update_check(true, true);
Re: nagiosxi/admin/updates.php via shell?
Anyone know what to put in for the "Proxy Address:" field? Should we put in http:// or https://, etc? What does the "Use HTTP tunnel" mean? What url is it trying to contact for the update/licensing?Pres-Gas wrote:Our servers are behind a private network and most of our settings have been working fine for this. The only thing that does not seem to be working is the web interface for "Check for Updates". I am having some trouble figuring out what to put in for the proxy configuration and would like some pointers for that.
Thanks,
Robert
Re: nagiosxi/admin/updates.php via shell?
I realized I may not be clear on what I am trying to do. Our licensing is renewed but our servers cannot see this fact as they need to "phone home". The sales team says I should really just be able to go to Admin=>Check for Updates, but since we are in a private network it can't phone home.
Re: nagiosxi/admin/updates.php via shell?
You need to re-apply the new license.
For the proxy, go to admin, proxy configuration and enter the proxy address/hostname, port, etc.
For the proxy, go to admin, proxy configuration and enter the proxy address/hostname, port, etc.
Re: nagiosxi/admin/updates.php via shell?
Just put in your proxy IP address or DNS name in the component settings, no need to use "http://" or "https://".
I've always seen the "Use HTTP tunnel" set but here is what it means:
https://curl.haxx.se/libcurl/c/CURLOPT_ ... UNNEL.html
As for upgrading from the command line, these commands should work:
I've always seen the "Use HTTP tunnel" set but here is what it means:
https://curl.haxx.se/libcurl/c/CURLOPT_ ... UNNEL.html
As for upgrading from the command line, these commands should work:
Code: Select all
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz -O /usr/local/nagiosxi/tmp/xi-latest.tar.gz
/usr/local/nagiosxi/scripts/upgrade_to_latest.shRe: nagiosxi/admin/updates.php via shell?
ssax,ssax wrote:Just put in your proxy IP address or DNS name in the component settings, no need to use "http://" or "https://".
I've always seen the "Use HTTP tunnel" set but here is what it means:
https://curl.haxx.se/libcurl/c/CURLOPT_ ... UNNEL.html
As for upgrading from the command line, these commands should work:
Code: Select all
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz -O /usr/local/nagiosxi/tmp/xi-latest.tar.gz /usr/local/nagiosxi/scripts/upgrade_to_latest.sh
I have no trouble actually performing an upgrade. When we renewed our license, sales directed me to go to the Admin=>Check for Updates link. Maybe that is the wrong place? Should Admin=>License Information also perform some sub function that "phones home" to let my installation know it is activated for another year?
Thanks for chiming in,
Robert
Re: nagiosxi/admin/updates.php via shell?
Yes it should go out and check your maintenance every time you go to Admin > License Information and if you have the proxy component setup it will try to go through the proxy (validated it on my proxy logs). Is yours not showing the extended date?