Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari is overiding the config change

SOLVED Go to solution
Highlighted

Ambari is overiding the config change

Explorer

I was configuring Nagios server. I modified the needed changes to the config file in config folder of Nagios by logging into node where Nagios server is installed. Upon restart of Nagios server through Ambari, the old config is restored overiding my changes.

Entire config file is not shown in Ambari so that I can make config changes for Nagios in ambari directly.

Please let me know how to prevent this.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Ambari is overiding the config change

Contributor
@Shankar B

On your ambari server, edit the nagios config file in this location: /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/

This is the location where ambari stores the configuration files for nagios.

Once you have edited the file, restart the ambari-server process. This will push your new nagios changes to your nagios server. Then in ambari, restart the nagios service. You should now see your changes in the Nagios Admin UI.

We had a similiar case where we needed more than one contact in nagios. Updating the contacts.cfg.j2 on the ambari server pushed the new contacts into the nagios config and everything worked like a charm.

8 REPLIES 8

Re: Ambari is overiding the config change

Rising Star

You are not supposed to edit config files manually. Use Ambari to make required change. If you can't see that property in corresponding service you can add new property under "Custom <file-name>" section.

Re: Ambari is overiding the config change

Explorer

Thank you!

Re: Ambari is overiding the config change

Expert Contributor

@Shankar B can you please let us know what version of ambari are you using ? What is Nagios file that you need to change and kind of changes that you want to do ?

Re: Ambari is overiding the config change

Explorer

@jaimin

I am using Ambari 1.7.0 and Nagios Core 3

I need to setup email contacts and the commands to send a notification via email for every alert. In particular I am trying to update few parameters as mentioned here :

https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/objectdefinitions.html#contact

Re: Ambari is overiding the config change

Expert Contributor

All the Nagios files are deployed via python Jinja templates (https://github.com/apache/ambari/tree/branch-1.7.0/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates).

UI exposes some of the basic setting of these files but not entire files.

For doing advances changes in Nagios files, you will need to search these templates and change them directly on Nagios server host and on ambari-server host.

Re: Ambari is overiding the config change

Explorer

Thank you!

Re: Ambari is overiding the config change

Contributor
@Shankar B

On your ambari server, edit the nagios config file in this location: /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/

This is the location where ambari stores the configuration files for nagios.

Once you have edited the file, restart the ambari-server process. This will push your new nagios changes to your nagios server. Then in ambari, restart the nagios service. You should now see your changes in the Nagios Admin UI.

We had a similiar case where we needed more than one contact in nagios. Updating the contacts.cfg.j2 on the ambari server pushed the new contacts into the nagios config and everything worked like a charm.

Re: Ambari is overiding the config change

Explorer

Thanks a lot! This helped me a lot