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

Ability to add additional client / check configuration in Check type. #61

Closed
phobos182 opened this issue Mar 28, 2013 · 0 comments
Closed

Comments

@phobos182
Copy link

Sensu Puppet types & providers need the ability to specify both client side check configuration as well as the ability to send data to the handler when events are produced.

Check configuration
This allows the Type to specify information which can be used in command token substitution for checks. Reasoning being that the check can be generic and reusable across all hosts. The variables in the check are configured on a client-by-client basis.

Example - Client Check Configuration

kafka_topics.json
{
  "kafka": {
    "topics": ["topic1", "topic2", "topic3"]
  }
}

check_kafka_topics.json
{
  "checks": {
    "kafka_topics": {
      "subscribers": [
        "kafka"
      ],
      "handlers": [
        "pagerduty",
        "sendgrid"
      ],
      "command": "/etc/sensu/plugins/check_kafka -w 30 -c 60 --topics :::kafka.topics:::",
      "interval": 60,
      "standalone": "true"
    }
  }
}

Additional Check Metadata
All JSON values configured in the check is sent to the Sensu server / handler when an event is triggered. Using this feature clients can configure overrides as well as send additional metadata to with event for use in handlers. In this example, I override the email address to send the alert to in the 'sendgrid' handler instead of the default email address. The event also contains a URL to the wiki on how to fix the issue. The puppet module should allow me to specify 'check level' additional JSON values to send to the handler so I can use it in my custom handler code..

Example - Additional check metadata sent to Sensu handlers

namenode_alive.json
{
  "checks": {
    "namenode_alive": {
      "runbook": "https://mywiki/namenode_alerts/#NameNodeprocessdownalert",
      "sendgrid": {
        "mail_to": "oncall@domain.com"
      }
    }
  }
}
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

1 participant