×

Reset Upgrade Status In Nagios Web Interface - How to Perform it ?


Reset Upgrade Status In Nagios Web Interface - How to Perform it ?

Generally, when we upgrade Nagios XI using the web interface, we come across the message "Upgrade in progress".

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform several Nagios queries.

In this context, we shall look into how we can reset the upgrade status.


Reset Upgrade Status In Nagios Web Interface

With the "Upgrade in progress", message the upgrade may stall. In such a case, we need to clear this message manually due to unforeseen circumstances.

In order to reset the status, we require two pieces of information to execute the command:


1. Database Type

To store the Nagios XI preferences they use either a PostgreSQL database or MySQL/MariaDB. It depends on the versions.

To determine which we use, we execute the following command in the Nagios XI server:

awk ‘/”nagiosxi” => array\(/{getline;print}’ /usr/local/nagiosxi/html/config.inc.php

Out output will look similar to either of the following:

“dbtype” => ‘pgsql’,

OR

“dbtype” => ‘mysql’,


2. Database Password

Generally, there is a username and password associated with the “nagiosxi” database. The default username is “nagiosxi” and the password is “n@gweb”.

We need to refer to the config.inc.php file to see if we changed it at any point.

In order to check, open the file in any text editor.

vi /usr/local/nagiosxi/html/config.inc.php

Then we locate the following nagiosxi section:

“nagiosxi” => array(
“dbtype” => ‘mysql’,
“dbserver” => ”,
“user” => ‘nagiosxi’,
“pwd” => ‘n@gweb’,
“db” => ‘nagiosxi’,

From the output, we can see the user and pwd fields contain the values we require for further procedures.


How to Reset Upgrade Status in Nagios ?

Here, you will see how to reset the upgrade status on Nagios XI. With the default username and password above, we run:

i. MySQL/MariaDB:

mysql -u’nagiosxi’ -p’n@gweb’ nagiosxi -e “update xi_commands set status_code = ‘2’ where command = ‘1120’;”

ii. PostgreSQL:

psql -U nagiosxi -W -d nagiosxi -c “update xi_commands set status_code = ‘2’ where command = ‘1120’”

There will be a prompt for the password at the command line.

Once we execute the command, we can navigate to the web interface Admin > System Information > Check For Updates.

Eventually, we can see the upgrade status will now be reset.


[Need help with the resetting Upgrade Status in Nagios? We are here for you. ]

Who We Are ?

Most prominent, efficient, and well-performing IT companies and software solutions.

Related Posts