-
Notifications
You must be signed in to change notification settings - Fork 289
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
Unable to define Contact Routing for Sensu Enterprise #597
Comments
Yes this isn't possible currently, we'd need a PR to get this working. You could possibly fudge it using |
I didn't see much need from other having arbitrary JSON in the top level scope, other than what was talked about in #157, but that seems to have been resolved by adding the extension type. Is it safe to assume that it'll be best to add a contact type to handle this use case?
Which |
Using arbitrary hashes w/ #661 and |
Left off adding spec tests to the defined type, modeled off the handler defined type. Resolves sensu#597
Left off adding spec tests to the defined type, modeled off the handler defined type. Resolves sensu#597
Without this patch the Puppet module doesn't provide an affordance for [contact routing](https://sensuapp.org/docs/0.29/enterprise/contact-routing.html) This patch addresses the problem by adding a new defined type, sensu::contact backed by a custom type and provider for sensu_contact. Example usage: sensu::contact { 'support': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::contact { 'ops': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::check { 'check_ntp': command => 'PATH=$PATH:/usr/lib64/nagios/plugins check_ntp_time -H pool.ntp.org -w 30 -c 60', handlers => 'email', contacts => ['ops', 'support'], } Resolves sensu#597
Without this patch the Puppet module doesn't provide an affordance for [contact routing](https://sensuapp.org/docs/0.29/enterprise/contact-routing.html) This patch addresses the problem by adding a new defined type, sensu::contact backed by a custom type and provider for sensu_contact. Example usage: sensu::contact { 'support': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::contact { 'ops': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::check { 'check_ntp': command => 'PATH=$PATH:/usr/lib64/nagios/plugins check_ntp_time -H pool.ntp.org -w 30 -c 60', handlers => 'email', contacts => ['ops', 'support'], } Resolves sensu#597
Without this patch the Puppet module doesn't provide an affordance for [contact routing](https://sensuapp.org/docs/0.29/enterprise/contact-routing.html) This patch addresses the problem by adding a new defined type, sensu::contact backed by a custom type and provider for sensu_contact. Example usage: sensu::contact { 'support': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::contact { 'ops': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::check { 'check_ntp': command => 'PATH=$PATH:/usr/lib64/nagios/plugins check_ntp_time -H pool.ntp.org -w 30 -c 60', handlers => 'email', contacts => ['ops', 'support'], } Resolves sensu#597
Without this patch the Puppet module doesn't provide an affordance for [contact routing](https://sensuapp.org/docs/0.29/enterprise/contact-routing.html) This patch addresses the problem by adding a new defined type, sensu::contact backed by a custom type and provider for sensu_contact. Example usage: sensu::contact { 'support': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::contact { 'ops': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::check { 'check_ntp': command => 'PATH=$PATH:/usr/lib64/nagios/plugins check_ntp_time -H pool.ntp.org -w 30 -c 60', handlers => 'email', contacts => ['ops', 'support'], } Resolves sensu#597
Without this patch the Puppet module doesn't provide an affordance for [contact routing](https://sensuapp.org/docs/0.29/enterprise/contact-routing.html) This patch addresses the problem by adding a new defined type, sensu::contact backed by a custom type and provider for sensu_contact. Example usage: sensu::contact { 'support': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::contact { 'ops': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::check { 'check_ntp': command => 'PATH=$PATH:/usr/lib64/nagios/plugins check_ntp_time -H pool.ntp.org -w 30 -c 60', handlers => 'email', contacts => ['ops', 'support'], } Resolves sensu#597
@stevenviola We've implemented this in #728 and should have it merged / released soon. Please let us know if you have any questions or comments about the implementation of the |
Without this patch the Puppet module doesn't provide an affordance for [contact routing](https://sensuapp.org/docs/0.29/enterprise/contact-routing.html) This patch addresses the problem by adding a new defined type, sensu::contact backed by a custom type and provider for sensu_contact. Example usage: sensu::contact { 'support': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::contact { 'ops': config => { 'email' => { 'to' => '[email protected]' } }, } sensu::check { 'check_ntp': command => 'PATH=$PATH:/usr/lib64/nagios/plugins check_ntp_time -H pool.ntp.org -w 30 -c 60', handlers => 'email', contacts => ['ops', 'support'], } Resolves sensu#597
(#597) Add sensu::contact type (Enterprise Only)
Fixed in release v2.20.0 |
Description of problem
Per the Sensu Enterprise documentation, contacts need to be defined within the
"contacts": {}
configuration scope. An example of the way the contacts config should be defined is below:Using this puppet module, I don't see a way to define a contacts hash at the top level configuration scope. I tried tricking the module and used
sensu::config
to specify the contact hash, but I was unable to get this to work, when specifying the hash as the event or the config. Even if this did work, it was not an ideal solution, as I would need to masquerade the config as additional check configuration, and not as a contacts file.I was finally able to find a solution by adding a handler using
sensu::handler
named contacts, and providing the contacts as a hash to the handler config. I needed to provide a dummy command to this handler, but since I am not going to be using it, I guess it's not a big deal. This added the"contacts": {}
configuration scope and seems to be working, although it feels a bit hacky.Is there any way to specify arbitrary configuration at the top level? Is there any need to add a contacts resource? How are others implementing the contact configuration with this puppet module?
Platform and version information
The text was updated successfully, but these errors were encountered: