sensu / sensu-chef

Sensu Chef cookbook.
https://supermarket.chef.io/cookbooks/sensu
Apache License 2.0
222 stars 280 forks source link

Fixed sensu-enterprise.default.erb #554

Closed maf23 closed 7 years ago

maf23 commented 7 years ago

This changes CONFIG_DIR to CONFD_DIR which is the value actually used by sensu-service script.

cwjohnston commented 7 years ago

Hi @maf23, thanks for your pull request but I don't see any evidence that this change is appropriate for the sensu-enterprise defaults file. Perhaps you intended for this change to land in the /etc/defaults/sensu file, but I'm not sure the change of variable name is right either.

The /usr/bin/sensu-enterprise script which consumes this defaults file uses the CONFIG_DIR variable, as currently implemented here.

The sensu-service script you mention is part of the Sensu Core package and not used by Sensu Enterprise.

You can review the source for the current sensu-service script here, it appears to use CONFIG_DIR as well.

Sensu's environment variables are also documented here.

Do you have an issue open describing the problem you are trying to solve?

maf23 commented 7 years ago

Ah, it is probably just me being confused then. I'm looking at upgrading sensu to version 0,28 and one of the things I have found is that previously you configured the configuration directory by setting CONFIG_DIR in /etc/defalt/sensu but in 0.28 it should be CONFD_DIR.

Looking further into this I see that replacing this file is something we do in our wrapper cookbook so I can't blame your cookbook :)

On Fri, Mar 24, 2017 at 6:49 PM, Cameron Johnston notifications@github.com wrote:

Hi @maf23 https://github.com/maf23, thanks for your pull request but I don't see any evidence that this change is appropriate for the sensu-enterprise defaults file. Perhaps you intended for this change to land in the /etc/defaults/sensu file, but I'm not sure the change of variable name is right either.

The /usr/bin/sensu-enterprise script which consumes this defaults file uses the CONFIG_DIR variable, as currently implemented here.

The sensu-service script you mention is part of the Sensu Core package and not used by Sensu Enterprise.

You can review the source for the current sensu-service script here https://github.com/sensu/sensu-omnibus/blob/release/0.28/config/templates/sensu-gem/sysvinit/sensu-service.erb#L19, it appears to use CONFIG_DIR as well.

Sensu's environment variables are also documented here https://sensuapp.org/docs/latest/reference/configuration.html#sensu-service-script-configuration-variables .

Do you have an issue open describing the problem you are trying to solve?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sensu/sensu-chef/pull/554#issuecomment-289096074, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEHdYCMEYnalGZzwxqNTvmn69XZChaKks5rpAJDgaJpZM4MoSnl .

--

Martin Forssén

Director of Information Security

Recorded Future https://www.recordedfuture.com/

+46 760 252357

maf@recordedfuture.com