Page 1 of 2

unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 11:02 am
by ravish78
We re facing issue while adding user to nagios web GUI.

ERROR: UNABLE TO ADD USERID

Re: unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 11:47 am
by abrist
1. Are you trying to add the user as an admin user?
2. Is postgres running?

Code: Select all

service postgresql status
3. Does this error happen from any user, for any new user, or is it specific to just a particular admin and potential username?

Re: unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 12:36 pm
by ravish78
It happens for all new users.

We are doing as admin user

postgres is running

tmproot@usa7061lv955>service postgresql status
postmaster (pid 31150 25048 23649 21448 21058 20532 19250 17387 12859 11638 11485 11353 9945 9790 9488 9487 9486 9484 9469 8101 6835 5095 2885 2695 2665 2652 2628 539) is running...

Re: unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 12:46 pm
by slansing
Is this happening for other users you try to add as well? Try a new user, with no current contact or any associations. The problem we may be seeing here is the user is already listed in the postgres database but it is not being pulled into XI properly. We may have to list the table and manually remove that user if it is there.

Re: unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 1:28 pm
by ravish78
We have problem with one user account which is already created who is unable to acknowledge alerts.

So we removed his id with following commands:

echo "select object_id from nagios_objects,nagios_contacts where object_id=contact_object_id and name1='w3y6rm70';"|mysql -pnagiosxi nagios
echo "select object_id from nagios_objects where name1='w3y6rm70';"|mysql -pnagiosxi nagios

echo "DELETE from nagios_objects where object_id=4780;"|mysql -pnagiosxi nagios

Remove contact from hosts and services
Then we tried to create his id again and we got this error.Also now we are not able to create other users too.

Re: unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 4:08 pm
by abrist
The user information is stored in postgres, not mysql. . .
Can you run a repair on mysql, and then try to create a user again?
Additionally, the object configs are in the nagiosql mysql database, not the nagios mysql database. You may have removed historical information . . . .

Code: Select all

service mysqld stop
/usr/local/nagiosxi/scripts/repairmysql.sh nagios

Re: unable to add new users in nagios Web interface

Posted: Wed Oct 09, 2013 4:09 pm
by sreinhardt
How long ago has this happened? The user information, short of contacts for nagios core, is not contained in mysql but in postgres. Likely if you have backups or if it has happened within a few days where our automated backups might still be in place with a good copy, it would be a good suggestion to restore from the most recent backup, prior to these commands.

Re: unable to add new users in nagios Web interface

Posted: Thu Oct 10, 2013 9:44 am
by ravish78
We have old backups but we did many modifications after that

-bash-3.2$ ls -lrt /store/backups/
total 12
drwx------ 6 root root 4096 Jul 29 13:30 nagiosxi
drwxr-xr-x 5 root root 4096 Sep 8 07:01 mysql
drwxr-xr-x 5 root root 4096 Sep 8 08:00 postgresql

Do we need to redo again all changes if we restore .


Note:we faced issue couple of days back. It worked fine till then

Re: unable to add new users in nagios Web interface

Posted: Thu Oct 10, 2013 9:47 am
by abrist
What changed a couple of days ago? Any new packages, updates, etc? Any errors, power issues, etc?

Re: unable to add new users in nagios Web interface

Posted: Thu Oct 10, 2013 12:36 pm
by ravish78
we had issue with some users who are unable to acknowledge alerts and schedule downtime.
So we tried removing one user id and recreating it again.After that we got this issue.
We did not try for other users.
We cannot create the removed id as well as any new id in manage users.