Page 1 of 1

Issues deleting services and hosts

Posted: Tue Sep 26, 2017 3:37 pm
I tried to delete some services and hosts and when I APPPLY CONFIGURATION I get the following errors:

Error: Could not find any host matching 'grhc-mgmt-02.grhc.local' (config file '/usr/local/nagios/etc/services/grhc-mgmt-02.grhc.local.cfg', starting on line 159)
Error: Failed to expand host list 'grhc-mgmt-02.grhc.local' for service 'Uptime' (/usr/local/nagios/etc/services/grhc-mgmt-02.grhc.local.cfg:159)

Re: Issues deleting services and hosts

Posted: Tue Sep 26, 2017 3:44 pm
I ran: tail -f /usr/local/nagiosxi/var/cmdsubsys.log

and re-ran the APPLY CONFIG and got the following...

PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-09-26 13:40:55-- https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:443... connected.
WARNING: cannot verify localhost's certificate, issued by `/DC=local/DC=grhc/CN=CERT':
Unable to locally verify the issuer's authority.
WARNING: certificate common name `nagiosxi.grhc.local' doesn't match requested host name `localhost'.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'

0K .......... ........ 881K=0.02s

2017-09-26 13:40:56 (881 KB/s) - `nagiosql.login' saved [19100]

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=taiufp' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
OUTPUT=/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=taiufp' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
.....
PROCESSED 1 COMMANDS

Re: Issues deleting services and hosts

Posted: Tue Sep 26, 2017 3:50 pm
by scottwilkerson
Lets go to Admin -> Reset Security Credentials
leave all as is and click "Update Credentials" button

While still running the following try to Apply Configuration again

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
If you get the same error can you post the contents of the following file

Code: Select all

/usr/local/nagiosxi/scripts/nagiosql.login

Re: Issues deleting services and hosts

Posted: Tue Sep 26, 2017 4:59 pm
This has been resolved by a reboot,,,

Re: Issues deleting services and hosts

Posted: Wed Sep 27, 2017 9:04 am
by tgriep
Thanks for reporting back that the issue is resolved. I'll close and lock the post but feel free to open a new post for any new issues / questions.