Actions component

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gregwhite
Posts: 206
Joined: Wed Jun 01, 2011 12:40 pm

Actions component

Post by gregwhite »

When we migrated NagiosXI to a new server and converted to MariaDB all the links in the action component were lost. Since the data has not been able to be retrieved, I have been recreating these links over the past several weeks. This morning I added some and then this afternoon went back to the actions component and all the data was gone! IT was back to how it looked after a fresh install. I had created 100 links so far and it's bad enough having to recreate them but the thought that they could be lost again concerns me. Any thoughts?
Also, our backup that we use to restore to a backup server is not picking up the data so we do not have a backup.

Thanks,
Greg
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Actions component

Post by pbroste »

Hello @gregwhite

Thanks for reaching out, want to get the System Profile from you so we can see what is going on.

To send us your system profile.
  • Login to the Nagios XI GUI using a web browser.
  • Click the "Admin" > "System Profile" Menu
  • Click the "Download Profile" button
  • Save the profile.zip file and send via Private Message
Thanks,
Perry
gregwhite
Posts: 206
Joined: Wed Jun 01, 2011 12:40 pm

Re: Actions component

Post by gregwhite »

I tried sending the profile.zip and received the error message that it exceeded the size limit of 50meg.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Actions component

Post by pbroste »

Hello @gregwhite

Thanks for following up, please use the split command to size down the compressed Profile.

Code: Select all

split -b 40M profile.tar.gz part
Please send each 'part[x]' in a separate PM.

Thanks,
Perry
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Actions component

Post by pbroste »

Hello @gregwhite

Thanks for following up with the System Profile info. Nice to reference the System Profile to get a good picture of the environment.

Since the issue surrounds the database switchover, want to list out the database tables:

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
Let's get the database logs as well:

Code: Select all

tar -czvf /tmp/logs.tar.gz /var/log/msql/ /var/log/httpd/* /var/log/apache2/*
Please send the results on both,
Perry
gregwhite
Posts: 206
Joined: Wed Jun 01, 2011 12:40 pm

Re: Actions component

Post by gregwhite »

I haven't heard any further update on this issue.
I decided to go ahead and start re-creating the links. The same issue happened. All 90 links gone!! In a previous version of NagiosXI I had over 250 links. Now when I approach 90 they get wiped out. Has a limit been put in place that will not allow me to create beyond a certain number? It is important that we get these links back into Nagios.

Thanks,
Greg
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Actions component

Post by pbroste »

Hello @gregwhite

Want to get the following from you Nagios XI environment so we can see what is going on.

Since the issue surrounds the database switchover, want to list out the database tables:

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
Let's get the database logs as well:

Code: Select all

tar -czvf /tmp/logs.tar.gz /var/log/msql/ /var/log/httpd/* /var/log/apache2/* /usr/local/nagiosxi/var/
Please send the results on both,
Perry
pkarr
Posts: 57
Joined: Fri Oct 05, 2012 1:01 pm

Re: Actions component

Post by pkarr »

Hi Perry,
I PM-ed that info to you on Feb4th for Greg. Do you not receive it?

Please let us know.

thanks,
Penny
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Actions component

Post by pbroste »

Hello @pkarr and @gregwhite

Thanks for following up,

We see that the actions_component_options are stored in the database and can be read by:

Code: Select all

mysql -uroot -pnagiosxi nagiosxi -e "SELECT * FROM xi_options WHERE name = 'actions_component_options'";
To verify the settings; should look like this:
mysql -uroot -pnagiosxi nagiosxi -e "DESC xi_options";

+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| option_id | int | NO | PRI | NULL | auto_increment |
| name | varchar(128) | NO | MUL | | |
| value | text | YES | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
To backup the database:

Code: Select all

mysqldump --user root --password nagiosxi  --all-databases > backup_all-databases.sql
Thanks,
Perry
pkarr
Posts: 57
Joined: Fri Oct 05, 2012 1:01 pm

Re: Actions component

Post by pkarr »

Hi Perry,
Here is the output from the first 2 commands:

[root@lpnagiosp01 tmp]# mysql -uroot -pnagiosxi nagiosxi -e "SELECT * FROM xi_options WHERE name = 'actions_component_options'";
+-----------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+-----------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 161 | actions_component_options | a:2:{s:7:"enabled";i:1;s:7:"actions";a:2:{i:0;a:13:{s:7:"enabled";i:1;s:4:"type";s:3:"any";s:4:"host";s:4:"/.*/";s7:"service";s:4:"/.*/";s:9:"hostgroup";s:0:"";s:12:"servicegroup";s:0:"";s:4:"text";s:24:"Adding devices in nagios";s:11:"action_type";s:3:"url";s:3:"url";s210:"https://shareplace.atriushealth.org/col ... ";s:246:"/* EXAMPLE CODE

if ((%objecttype% == 'host' && '%hoststateid%' != '0') || (%objecttype%=='service' && '%servicestateid%'!='0')) {
$img = '/nagiosxi/images/schedulecheck.png';
$showlink = true;
} else {
$showlink = false;
}
*/";s:5:"perms";s:0:"";s:3:"uid";s:6:"enUvM3";}i:1;a:13:{s:7:"enabled";i:1;s:4:"type";s:3:"any";s:4:"host";s:4:"/.*/";s:7:"service";s:4:"/.*/";s:9:"hostgrou";s:33:"Application - Ancillary - Audbase";s:12:"servicegroup";s:0:"";s:4:"text";s:50:"Application Imaging - Audbase Escalation Procedure";s:11:"action_type;s:3:"url";s:3:"url";s:214:"https://shareplace.atriushealth.org/col ... ";s:246:"/* EXAMPLE CODE

if ((%objecttype% == 'host' && '%hoststateid%' != '0') || (%objecttype%=='service' && '%servicestateid%'!='0')) {
$img = '/nagiosxi/images/schedulecheck.png';
$showlink = true;
} else {
$showlink = false;
}
*/";s:5:"perms";s:0:"";s:3:"uid";s:6:"kDvPXA";}}} |
+-----------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
And this one:
[root@lpnagiosp01 tables]# mysql -uroot -pnagiosxi nagiosxi -e "DESC xi_options";
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| option_id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(128) | NO | MUL | NULL | |
| value | text | YES | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
[root@lpnagiosp01 tables]#

I will PM the tar files from the mysqldump to you spearately.

thanks,
Penny
Locked