JenkinsRunFailureTotal #
Job run failures: ({{$value}}) {{$labels.jenkins_job}}. Healthcheck failure for {{$labels.instance}}
in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})
Alert Rule
alert: JenkinsRunFailureTotal
annotations:
description: |-
Job run failures: ({{$value}}) {{$labels.jenkins_job}}. Healthcheck failure for `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})
VALUE = {{ $value }}
LABELS = {{ $labels }}
runbook: https://srerun.github.io/prometheus-alerts/runbooks/metric-plugin/jenkinsrunfailuretotal/
summary: Jenkins run failure total (instance {{ $labels.instance }})
expr: delta(jenkins_runs_failure_total[1h]) > 100
for: 0m
labels:
severity: warning
Here is a runbook for the Prometheus alert rule JenkinsRunFailureTotal
:
Meaning #
The JenkinsRunFailureTotal
alert is triggered when the total number of Jenkins job run failures exceeds 100 in a 1-hour period. This indicates a significant problem with the Jenkins instance, potentially caused by misconfiguration, resource issues, or application errors.
Impact #
This alert has a significant impact on the development and deployment pipeline, as failed Jenkins jobs can prevent code changes from being built, tested, and deployed. This can lead to delayed releases, reduced productivity, and increased errors. Furthermore, failed jobs can also indicate underlying issues with the application or infrastructure, which if left unchecked, can lead to more severe consequences.
Diagnosis #
To diagnose the root cause of the Jenkins run failures, follow these steps:
- Check the Jenkins job console output for error messages.
- Review the Jenkins instance logs for any errors or exceptions.
- Verify that the Jenkins instance has sufficient resources (e.g., CPU, memory, disk space).
- Check for any recent changes to the Jenkins configuration, plugins, or job definitions.
- Investigate any underlying infrastructure issues (e.g., networking, database connectivity).
Mitigation #
To mitigate the impact of Jenkins run failures, follow these steps:
- Investigate and resolve the root cause of the failures (as identified in the diagnosis step).
- Restart the failed Jenkins jobs to resume the build and deployment pipeline.
- Consider increasing the resources allocated to the Jenkins instance to prevent similar failures in the future.
- Implement additional monitoring and logging to detect and alert on potential issues before they cause significant failures.
- Verify that the Jenkins instance is properly configured and up-to-date, including all plugins and dependencies.