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)
Issues deleting services and hosts
-
[email protected]
- Posts: 52
- Joined: Wed Nov 12, 2014 3:09 pm
Re: Issues deleting services and hosts
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
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
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues deleting services and hosts
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
If you get the same error can you post the contents of the following file
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.logCode: Select all
/usr/local/nagiosxi/scripts/nagiosql.login-
[email protected]
- Posts: 52
- Joined: Wed Nov 12, 2014 3:09 pm
Re: Issues deleting services and hosts
This has been resolved by a reboot,,,
Re: Issues deleting services and hosts
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!