Error verify configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Error verify configuration

Post by paulol »

When i click on button Delete All Host / Service -> Write Configs To File - > Verify Configuration i got the following error:

Error: Could not find a service matching host name 'Site LBV' and description 'Status' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 338)
Error: Could not expand members specified in servicegroup 'Sites' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting at line 338)

define servicegroup {
servicegroup_name Sites
alias Sites da IBVs
members Site LBV,Status,Site do Paraguay,Status,Site Uruguay,Status,Site AVA,Status,Site Portugal,Status,Site LGW,Status,Site Paiva Netto,Status,Site TBV,Status,Site Argentina,Status,Site Bolivia,Status,Site Religiao de Deus,Status,Site Boa Vontade,Status

}

define host {
host_name Site LBV
use xiwizard_website_host
alias Site LBV
address http://www.lbv.org
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
flap_detection_enabled 0
contacts nagiosadmin
contact_groups Equipe_DB,Equipe_WEB
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 0
icon_image www_server.png
statusmap_image www_server.png
_xiwizard website
register 1
}

and when i go to apply configuration button i got this error:
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Error verify configuration

Post by jdalrymple »

paulol wrote:Error: Could not find a service matching host name 'Site LBV' and description 'Status'

Sorry, I don't mean to state the obvious, but I can't see anywhere that you've defined that service. Maybe I'm totally missing it though? Wouldn't be the first time.
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Error verify configuration

Post by paulol »

No, you are right, some services he didnt export to directory nagios files like ROMA.cfg and Site LBV.cfg

After i Apply many times he created the files Site LBV.cfg e ROMA.cfg into services directory.

Do you know why this happen?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error verify configuration

Post by lmiltchev »

Nagios cannot start or restart with a bad configuration. On config errors, Nagios will revert back to the last good known checkpoint.
Be sure to check out our Knowledgebase for helpful articles and solutions!
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Error verify configuration

Post by paulol »

Understood...

But what im doing wrong?

For example: let's take the services from ROMA.cfg file.

Code: Select all

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/ROMA.cfg', starting on line 80)
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Error verify configuration

Post by ssax »

Your configuration that you posted looks proper, are you receiving that error now?

If you are (or if it happens again), run these commands and post the output:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Error verify configuration

Post by paulol »

You can close the threat. Somehow the problem was gone.

Thanks.
Locked