Add an Icinga passive check to a Jenkins job
If you would like Icinga to raise an alert when a Jenkins job has not completed successfully in a while, you can add an Icinga passive check to the Jenkins job by configuring Puppet.
Add a parameterized build trigger to the Jenkins job you wish to monitor in Puppet, so that the success or failure of the job builds will be reported to Icinga.
If the alert should be a warning rather than a critical alert, configure the alert level by setting the status code parameter in the build trigger configured in the previous step (example):
Valid values are 0 = OK, 1 = warning, 2 = critical, 3 = unknown. The default is 2.
icinga::passive_checkexported resource in the Puppet manifest file for the Jenkins job you wish to monitor, making sure that the service description matches the one used to configure the build trigger above.
You will need to determine an appropriate ‘freshness threshold’, which determines how much time can pass, in seconds, before Icinga will raise a 'freshness threshold alert’. You should allow enough time for the interval between scheduled builds, plus the time it usually takes the job to run, plus a little extra in case the job takes longer than usual.
Strongly consider creating a page in this manual which explains the alert and suggests how to resolve it.
In the page metadata, configure the section to be
icinga::passive_checkpuppet settings added in the previous step: configure the
notes_urlso that it links to your new page.
More about Monitoring
- Add a deployment dashboard for an application
- Add sidekiq-monitoring to your application
- Error reporting with Sentry
- GOV.UK and Virtual Private Networks (VPNs)
- Graphite and deployment dashboards
- How to deal with errors
- Monitor Sidekiq queues for your application
- Monitoring screens
- Nagios NRPE connection failures
- Pingdom Bouncer canary check
- Tools: Icinga, Grafana and Graphite, Kibana and Fabric
- Uptime Metrics
- Use AWS X-Ray to trace app requests
- Use Terraboard to monitor Terraform state