All alerts going to single user

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

All alerts going to single user

Post by hockad »

We are in the process of migrating from an older Nagios version to new one by doing a new install. We have successfully migrated everything and all seems to be functioning "normally" with one exception.

Our service/host escalation are set to go to user "A". But all notifications are going to user "B". All looks good in the GUI, and have confirmed that the configuration files are set correctly after applying the configuration.

If we disable user "B" the notifications stop going to them, but "A" still does not get anything.

Thanks in advance.

Adam
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: All alerts going to single user

Post by benjaminsmith »

Hi Adam,

It sure seems like there may still be an issue with the configuration files - such as the settings for user A. I have a few questions to help narrow this down.

1. Which process did you use to migrate to the new server. Did you follow this guide?

Backing Up and Restoring Your Nagios XI System

2. Is user 'A" getting any notifications or is this specific to the service/host escalations?

3. If you go to Configure > Core Config Manager > Configuration Snapshots, you can restore a previous snapshot (from a period when escalations were working) and test to see if user 'A' now receives notifications.

4. Lastly, if you're still having trouble, send us your system profile along with the name of the host/service escalation in question and 'A''s contact name.

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 share in a private message and then reply to this post to bring it up in the queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: All alerts going to single user

Post by hockad »

1. We built a new server, tar'ed up all the cfg files on old server and copied them to new server where we used the import config file tool. Then committed.
2. No they are not getting any notifications.
3. From what we can tell the escalations/notifications have not been working since day one.
4. User that should be getting notifications is qp2235 (Swapan Singh), the user getting all the notifications gi7898 (Kurt Johnson)
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: All alerts going to single user

Post by ssax »

You will need to use the backup/restore functionality OR do a Core migration following these guides (your only options) so that things are done properly:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: All alerts going to single user

Post by hockad »

We tried the Back-up-and-Restore documentation and this is the output it didn't work :). We are going to test the "Migration" method later today.

[root@lxjh531 nagiosxi]# /usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1566142282.tar.gz
WARNING: you are trying to restore a el6 backup on a el7 system
Compiled plugins and other binaries as well as httpd configurations
will NOT be restored.

You will need to re-download the Nagios XI tarball, and re-install
the subcomponents for this system. More info here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Are you sure you want to continue? [y/N] y
TS=1566144396
Extracting backup to /store/backups/nagiosxi/1566144396-restore...
In /store/backups/nagiosxi/1566144396-restore/1566142282...
Backup files look okay. Preparing to restore...
Shutting down services...
Restoring directories to /...
Restoring Nagios Core...
Restoring Nagios XI...
Restoring NRDP backups...
Restoring MRTG...
Restoring Nagvis backups...
Restoring MySQL databases...
Restoring Nagios XI PostgresQL database...
CREATE ROLE
CREATE DATABASE
Sleeping for a few seconds (please wait)...
SET
SET
SET
SET
SET
SET
SET
ERROR: index "xi_usermeta_autoload_idx" does not exist
ERROR: index "xi_sysstat_metric_idx" does not exist
ERROR: index "xi_options_name_idx" does not exist
ERROR: index "xi_meta_metatype_id_idx" does not exist
ERROR: index "xi_meta_metaobj_id_idx" does not exist
ERROR: index "xi_meta_keyname_idx" does not exist
ERROR: index "xi_commands_event_time_idx" does not exist
ERROR: index "xi_auditlog_user" does not exist
ERROR: index "xi_auditlog_type" does not exist
ERROR: index "xi_auditlog_source" does not exist
ERROR: index "xi_auditlog_log_time" does not exist
ERROR: index "xi_auditlog_ip_address" does not exist
ERROR: index "event_time" does not exist
ERROR: relation "public.xi_users" does not exist
ERROR: relation "public.xi_users" does not exist
ERROR: relation "public.xi_usermeta" does not exist
ERROR: relation "public.xi_usermeta" does not exist
ERROR: relation "public.xi_sysstat" does not exist
ERROR: relation "public.xi_options" does not exist
ERROR: relation "public.xi_meta" does not exist
ERROR: relation "public.xi_events" does not exist
ERROR: relation "public.xi_commands" does not exist
ERROR: relation "public.xi_auditlog" does not exist
ERROR: relation "public.xi_auditlog" does not exist
ERROR: table "xi_users" does not exist
ERROR: sequence "xi_users_user_id_seq" does not exist
ERROR: table "xi_usermeta" does not exist
ERROR: sequence "xi_usermeta_usermeta_id_seq" does not exist
ERROR: table "xi_sysstat" does not exist
ERROR: sequence "xi_sysstat_sysstat_id_seq" does not exist
ERROR: table "xi_options" does not exist
ERROR: sequence "xi_options_option_id_seq" does not exist
ERROR: table "xi_meta" does not exist
ERROR: sequence "xi_meta_meta_id_seq" does not exist
ERROR: table "xi_incidents" does not exist
ERROR: sequence "xi_incidents_id_seq" does not exist
ERROR: table "xi_events" does not exist
ERROR: sequence "xi_events_event_id_seq" does not exist
ERROR: table "xi_eventqueue" does not exist
ERROR: sequence "xi_eventqueue_eventqueue_id_seq" does not exist
ERROR: table "xi_commands" does not exist
ERROR: sequence "xi_commands_command_id_seq" does not exist
ERROR: sequence "xi_auditlog_auditlog_id_seq" does not exist
ERROR: table "xi_auditlog" does not exist
ERROR: sequence "if_usermeta_id_seq" does not exist
ERROR: sequence "if_user_id_seq" does not exist
ERROR: sequence "if_sysstat_id_seq" does not exist
ERROR: sequence "if_option_id_seq" does not exist
ERROR: sequence "if_meta_id_seq" does not exist
ERROR: sequence "if_command_id_seq" does not exist
ERROR: must be owner of schema public
ERROR: schema "public" already exists
ALTER SCHEMA
ERROR: must be owner of schema public
SET
CREATE SEQUENCE
ALTER TABLE
setval
--------
20
(1 row)

CREATE SEQUENCE
ALTER TABLE
setval
--------
16
(1 row)

CREATE SEQUENCE
ALTER TABLE
setval
--------
25
(1 row)

CREATE SEQUENCE
ALTER TABLE
setval
--------
15
(1 row)

CREATE SEQUENCE
ALTER TABLE
setval
--------
14
(1 row)

CREATE SEQUENCE
ALTER TABLE
setval
--------
142
(1 row)

SET
SET
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
setval
--------
71354
(1 row)

CREATE SEQUENCE
ALTER TABLE
setval
--------
14129
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
---------
1800415
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
---------
2543843
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
--------
1
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
---------
2543715
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
--------
176
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
--------
101
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
--------
3924
(1 row)

CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
--------
128
(1 row)

CREATE TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
WARNING: no privileges could be revoked for "public"
REVOKE
WARNING: no privileges could be revoked for "public"
REVOKE
WARNING: no privileges were granted for "public"
GRANT
WARNING: no privileges were granted for "public"
GRANT
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.
/usr/local/nagiosxi/scripts/restore_xi.sh: line 333: DROP TABLE IF EXISTS nagiosxi;: No such file or directory
Restarting database servers...
Restoring Apache cronjobs...
Restoring logrotate config files...
Skipping Apache config files restoration
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.

===============
RESTORE COMPLETE
===============
[root@lxjh531 nagiosxi]#
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: All alerts going to single user

Post by ssax »

Did you install the same version of XI on the new server first, before you tried to restore? You need to do that if you didn't.

Or did you try to backup/restore to a different XI version?

You'll need to run the restore repair script as well from the guide.
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: All alerts going to single user

Post by hockad »

We did not install the same version. We installed the newest version and a new OS.

What is the proper method to move from different versions of Nagios XI and OS?

OLD
CentOS 6.9
Nagios XI 5.4.13

NEW
CentOS 7.5.1804
Nagios XI 5.6.5
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: All alerts going to single user

Post by benjaminsmith »

Hello @hockad,

You'll need migrate between the same versions of Nagios XI. You have the option to either upgrade OLD to 5.6.5 or install 5.4.13 on NEW and then upgrade to the latest version after migrating.

You can download previous version on our archives page:

Nagios XI - Previous Versions

Let us know if you need further assistance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked