Hi Nagios Team,
We are manually managing a bunch of Service Dependencies under static folder.
However, we noticed while deleting service using CCM, apply changes failed due to Service Dependency.
I understand this is the expected.
So we manually removed all the files using rm -f static/*
And followed the below steps :
1. CCM > Tools > Config File Management > Delete Files
2. CCM > Tools > Config File Management > Write Configs
3. CCM > Tools > Config File Management > Verify Files
4. All was good.
Now, we noticed that Service Dependency .cfg files were back under static/*
afaik, this is not expected.
And due to this we are unable to Delete any Host/Service & Apply Changes, it always error out with weird Dependency of Host/Service errors. It seems like these manually managed Service Dependency has somehow has got into the database and is causing issues.
Also, I do not see any Service Dependency under CCM->Host Dependencies or CCM->Service Dependencies
How can I check if there is any host/service dependency data in the DB ?
How to get rid of it ?
Kindly assist.
Regards,
Vish.
NagiosXI 5.5.9 - service dependency issue...
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NagiosXI 5.5.9 - service dependency issue...
The items in the static directory will return if you go to apply config and it isn't sucessful because the system will restore the snapshot.
You can view host/service dependencies that are in the DB by navigating to CCM -> Host Dependencies and CCM -> Service Dependencies
You can view host/service dependencies that are in the DB by navigating to CCM -> Host Dependencies and CCM -> Service Dependencies
Re: NagiosXI 5.5.9 - service dependency issue...
Hi,
As I mentioned in initial post,
Service Dependency cfg files were managed manually under static directory.
CCM -> Host Dependencies and CCM -> Service Dependencies shows EMPTY.
So I am not sure how static directory will return if you go to apply config.
Kindly clarify.
Regards,
Vish.
As I mentioned in initial post,
Service Dependency cfg files were managed manually under static directory.
CCM -> Host Dependencies and CCM -> Service Dependencies shows EMPTY.
So I am not sure how static directory will return if you go to apply config.
Kindly clarify.
Regards,
Vish.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NagiosXI 5.5.9 - service dependency issue...
I was answering your question.vishfx wrote:As I mentioned in initial post,
Service Dependency cfg files were managed manually under static directory.
Now, there are backups created of the nagios/etc directory that contain everything that was in nagios/etc the last time the configuration was applied successfully, and if there is an unsuccessful Apply Configuration it will automatically roll back to the last known good configuration, which may include your files in the static directory.vishfx wrote:How can I check if there is any host/service dependency data in the DB ?
How to get rid of it ?
I would recommend doing the following (and if possible prevent any coworkers from running a Apply Configuration or running any wizards while you are doing so.
1. rm -f /usr/local/nagios/etc/static/*
1. CCM > Tools > Config File Management > Delete Files
2. CCM > Tools > Config File Management > Write Configs
3. CCM > Tools > Config File Management > Verify Files
if all is good, immediately run Apply Configuration
The Apply Configuration when successful will reset the last known good configuration to not contain the files that were removed from static.
Re: NagiosXI 5.5.9 - service dependency issue...
This seems to have done the trick !!!
Thanks a lot
Regards,
Vish.
Thanks a lot
Regards,
Vish.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NagiosXI 5.5.9 - service dependency issue...
Glad to hear it is resolved!!vishfx wrote:This seems to have done the trick !!!
Thanks a lot
Regards,
Vish.
Locking thread