Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for arbitrary top-level configuration hashes #661

Closed
agoddard opened this issue Jun 13, 2017 · 2 comments
Closed

Implement support for arbitrary top-level configuration hashes #661

agoddard opened this issue Jun 13, 2017 · 2 comments

Comments

@agoddard
Copy link

In order to configure Sensu Enterprise integrations, arbitrary configuration for handlers (wherein a handler looks for a particular named configuration hash) and in order to configure new features that simply require additional configuration (such as defining contacts, etc), it would be great to support a method within the module which could take an arbitrary hash and render it into a JSON file, for example:

sensu::config{'email':
  host => "127.0.0.1",
  port => 25
}

will render /etc/sensu.conf.d/email.json

{
  "email": {
    "host": "127.0.0.1",
    "port": 25
  }
}
@ghoneycutt
Copy link
Collaborator

@agoddard Have you tried using sensu::write_json for this?

@cwjohnston
Copy link
Contributor

Closing this as we believe sensu::write_json provides the needed functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants