Jenkins

Jenkins is a free and open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.

Available solutions




This template is for Zabbix version: 5.4

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/jenkins?at=release/5.4

Jenkins by HTTP

Overview

For Zabbix version: 5.4 and higher
The template to monitor Apache Jenkins by Zabbix that work without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.

This template was tested on:

  • Jenkins, version 2.263.1

Setup

See Zabbix template operation for basic instructions.

Metrics are collected by requests to Metrics API.
For common metrics: Install and configure Metrics plugin parameters according official documentations. Do not forget to configure access to the Metrics Servlet by issuing API key and change macro {$JENKINS.API.KEY}.

For monitoring computers and builds: Create API token for monitoring user according official documentations and change macro {$JENKINS.USER}, {$JENKINS.API.TOKEN}. Don't forget to change macros {$JENKINS.URL}.

Zabbix configuration

No specific Zabbix configuration is required.

Macros used

Name Description Default
{$JENKINS.API.KEY}

API key to access Metrics Servlet

``
{$JENKINS.API.TOKEN}

API token for HTTP BASIC authentication.

``
{$JENKINS.FILE_DESCRIPTORS.MAX.WARN}

Maximum percentage of file descriptors usage alert threshold (for trigger expression).

85
{$JENKINS.JOB.HEALTH.SCORE.MIN.WARN}

Minimum job's health score (for trigger expression).

50
{$JENKINS.PING.REPLY}

Expected reply to the ping.

pong
{$JENKINS.URL}

Jenkins URL in the format <scheme>://<host>:<port>

``
{$JENKINS.USER}

Username for HTTP BASIC authentication

zabbix

Template links

There are no template links in this template.

Discovery rules

Name Description Type Key and additional info
Jobs discovery HTTP_AGENT jenkins.jobs

Preprocessing:

- JSONPATH: $.jobs.[*]

Computers discovery HTTP_AGENT jenkins.computers

Preprocessing:

- JSONPATH: $.computer.[*]

Items collected

Group Name Description Type Key and additional info
Jenkins Jenkins: Disk space check message

The message will reference the first node which fails this check. There may be other nodes that fail the check, but this health check is designed to fail fast.

DEPENDENT jenkins.disk_space.message

Preprocessing:

- JSONPATH: $['disk-space'].message

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: Temporary space check message

The message will reference the first node which fails this check. There may be other nodes that fail the check, but this health check is designed to fail fast.

DEPENDENT jenkins.temporary_space.message

Preprocessing:

- JSONPATH: $['temporary-space'].message

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: Plugins check message

The message of plugins health check.

DEPENDENT jenkins.plugins.message

Preprocessing:

- JSONPATH: $['plugins'].message

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: Thread deadlock check message

The message of thread deadlock health check.

DEPENDENT jenkins.thread_deadlock.message

Preprocessing:

- JSONPATH: $['thread-deadlock'].message

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: Disk space check

Returns FAIL if any of the Jenkins disk space monitors are reporting the disk space as less than the configured threshold.

DEPENDENT jenkins.disk_space

Preprocessing:

- JSONPATH: $['disk-space'].healthy

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Plugins check

Returns FAIL if any of the Jenkins plugins failed to start.

DEPENDENT jenkins.plugins

Preprocessing:

- JSONPATH: $.plugins.healthy

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Temporary space check

Returns FAIL if any of the Jenkins temporary space monitors are reporting the temporary space as less than the configured threshold.

DEPENDENT jenkins.temporary_space

Preprocessing:

- JSONPATH: $['temporary-space'].healthy

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Thread deadlock check

Returns FAIL if there are any deadlocked threads in the Jenkins master JVM.

DEPENDENT jenkins.thread_deadlock

Preprocessing:

- JSONPATH: $['thread-deadlock'].healthy

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Executors count

The number of executors available to Jenkins. This is corresponds to the sum of all the executors of all the on-line nodes.

DEPENDENT jenkins.executor.count

Preprocessing:

- JSONPATH: $.gauges.['jenkins.executor.count.value'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Executors free

The number of executors available to Jenkins that are not currently in use.

DEPENDENT jenkins.executor.free

Preprocessing:

- JSONPATH: $.gauges.['jenkins.executor.free.value'].value

Jenkins Jenkins: Executors in use

The number of executors available to Jenkins that are currently in use.

DEPENDENT jenkins.executor.in_use

Preprocessing:

- JSONPATH: $.gauges.['jenkins.executor.in-use.value'].value

Jenkins Jenkins: Nodes count

The number of build nodes available to Jenkins, both on-line and off-line.

DEPENDENT jenkins.node.count

Preprocessing:

- JSONPATH: $.gauges.['jenkins.node.count.value'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Nodes offline

The number of build nodes available to Jenkins but currently off-line.

DEPENDENT jenkins.node.offline

Preprocessing:

- JSONPATH: $.gauges.['jenkins.node.offline.value'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Nodes online

The number of build nodes available to Jenkins and currently on-line.

DEPENDENT jenkins.node.online

Preprocessing:

- JSONPATH: $.gauges.['jenkins.node.online.value'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Plugins active

The number of plugins in the Jenkins instance that started successfully.

DEPENDENT jenkins.plugins.active

Preprocessing:

- JSONPATH: $.gauges.['jenkins.plugins.active'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Plugins failed

The number of plugins in the Jenkins instance that failed to start. A value other than 0 is typically indicative of a potential issue within the Jenkins installation that will either be solved by explicitly disabling the plugin(s) or by resolving the plugin dependency issues.

DEPENDENT jenkins.plugins.failed

Preprocessing:

- JSONPATH: $.gauges.['jenkins.plugins.failed'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Plugins inactive

The number of plugins in the Jenkins instance that are not currently enabled.

DEPENDENT jenkins.plugins.inactive

Preprocessing:

- JSONPATH: $.gauges.['jenkins.plugins.inactive'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Plugins with update

The number of plugins in the Jenkins instance that have an newer version reported as available in the current Jenkins update center metadata held by Jenkins. This value is not indicative of an issue with Jenkins but high values can be used as a trigger to review the plugins with updates with a view to seeing whether those updates potentially contain fixes for issues that could be affecting your Jenkins instance.

DEPENDENT jenkins.plugins.with_update

Preprocessing:

- JSONPATH: $.gauges.['jenkins.plugins.withUpdate'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Projects count

The number of projects.

DEPENDENT jenkins.project.count

Preprocessing:

- JSONPATH: $.gauges.['jenkins.project.count.value'].value

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Jobs count

The number of jobs in Jenkins.

DEPENDENT jenkins.job.count.value

Preprocessing:

- JSONPATH: $.gauges.['jenkins.job.count.value'].value

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: Job scheduled, m1 rate

The rate at which jobs are scheduled. If a job is already in the queue and an identical request for scheduling the job is received then Jenkins will coalesce the two requests. This metric gives a reasonably pure measure of the load requirements of the Jenkins master as it is unaffected by the number of executors available to the system.

DEPENDENT jenkins.job.scheduled.m1.rate

Preprocessing:

- JSONPATH: $.meters.['jenkins.job.scheduled'].m1_rate

Jenkins Jenkins: Jobs scheduled, m5 rate

The rate at which jobs are scheduled. If a job is already in the queue and an identical request for scheduling the job is received then Jenkins will coalesce the two requests. This metric gives a reasonably pure measure of the load requirements of the Jenkins master as it is unaffected by the number of executors available to the system.

DEPENDENT jenkins.job.scheduled.m5.rate

Preprocessing:

- JSONPATH: $.meters.['jenkins.job.scheduled'].m5_rate

Jenkins Jenkins: Job blocked, m1 rate

The rate at which jobs in the build queue enter the blocked state.

DEPENDENT jenkins.job.blocked.m1.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.blocked.duration'].m1_rate

Jenkins Jenkins: Job blocked, m5 rate

The rate at which jobs in the build queue enter the blocked state.

DEPENDENT jenkins.job.blocked.m5.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.blocked.duration'].m5_rate

Jenkins Jenkins: Job blocked duration, p95

The amount of time which jobs spend in the blocked state.

DEPENDENT jenkins.job.blocked.duration.p95

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.blocked.duration'].p95

Jenkins Jenkins: Job blocked duration, median

The amount of time which jobs spend in the blocked state.

DEPENDENT jenkins.job.blocked.duration.p50

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.blocked.duration'].p50

Jenkins Jenkins: Job building, m1 rate

The rate at which jobs are built.

DEPENDENT jenkins.job.building.m1.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.building.duration'].m1_rate

Jenkins Jenkins: Job building, m5 rate

The rate at which jobs are built.

DEPENDENT jenkins.job.building.m5.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.building.duration'].m5_rate

Jenkins Jenkins: Job building duration, p95

The amount of time which jobs spend building.

DEPENDENT jenkins.job.building.duration.p95

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.building.duration'].p95

Jenkins Jenkins: Job building duration, median

The amount of time which jobs spend building.

DEPENDENT jenkins.job.building.duration.p50

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.building.duration'].p50

Jenkins Jenkins: Job buildable, m1 rate

The rate at which jobs in the build queue enter the buildable state.

DEPENDENT jenkins.job.buildable.m1.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.buildable.duration'].m1_rate

Jenkins Jenkins: Job buildable, m5 rate

The rate at which jobs in the build queue enter the buildable state.

DEPENDENT jenkins.job.buildable.m5.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.buildable.duration'].m5_rate

Jenkins Jenkins: Job buildable duration, p95

The amount of time which jobs spend in the buildable state.

DEPENDENT jenkins.job.buildable.duration.p95

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.buildable.duration'].p95

Jenkins Jenkins: Job buildable duration, median

The amount of time which jobs spend in the buildable state.

DEPENDENT jenkins.job.buildable.duration.p50

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.buildable.duration'].p50

Jenkins Jenkins: Job queuing, m1 rate

The rate at which jobs are queued.

DEPENDENT jenkins.job.queuing.m1.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.queuing.duration'].m1_rate

Jenkins Jenkins: Job queuing, m5 rate

The rate at which jobs are queued.

DEPENDENT jenkins.job.queuing.m5.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.queuing.duration'].m5_rate

Jenkins Jenkins: Job queuing duration, p95

The total time which jobs spend in the build queue.

DEPENDENT jenkins.job.queuing.duration.p95

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.queuing.duration'].p95

Jenkins Jenkins: Job queuing duration, median

The total time which jobs spend in the build queue.

DEPENDENT jenkins.job.queuing.duration.p50

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.queuing.duration'].p50

Jenkins Jenkins: Job total, m1 rate

The rate at which jobs are queued.

DEPENDENT jenkins.job.total.m1.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.total.duration'].m1_rate

Jenkins Jenkins: Job total, m5 rate

The rate at which jobs are queued.

DEPENDENT jenkins.job.total.m5.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.total.duration'].m5_rate

Jenkins Jenkins: Job total duration, p95

The total time which jobs spend from entering the build queue to completing building.

DEPENDENT jenkins.job.total.duration.p95

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.total.duration'].p95

Jenkins Jenkins: Job total duration, median

The total time which jobs spend from entering the build queue to completing building.

DEPENDENT jenkins.job.total.duration.p50

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.total.duration'].p50

Jenkins Jenkins: Job waiting, m1 rate

The rate at which jobs enter the quiet period.

DEPENDENT jenkins.job.waiting.m1.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.waiting.duration'].m1_rate

Jenkins Jenkins: Job waiting, m5 rate

The rate at which jobs enter the quiet period.

DEPENDENT jenkins.job.waiting.m5.rate

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.waiting.duration'].m5_rate

Jenkins Jenkins: Job waiting duration, p95

The total amount of time that jobs spend in their quiet period.

DEPENDENT jenkins.job.waiting.duration.p95

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.waiting.duration'].p95

Jenkins Jenkins: Job waiting duration, median

The total amount of time that jobs spend in their quiet period.

DEPENDENT jenkins.job.waiting.duration.p50

Preprocessing:

- JSONPATH: $.timers.['jenkins.job.waiting.duration'].p50

Jenkins Jenkins: Build queue, blocked

The number of jobs that are in the Jenkins build queue and currently in the blocked state.

DEPENDENT jenkins.queue.blocked

Preprocessing:

- JSONPATH: $.gauges.['jenkins.queue.blocked.value'].value

Jenkins Jenkins: Build queue, size

The number of jobs that are in the Jenkins build queue.

DEPENDENT jenkins.queue.size

Preprocessing:

- JSONPATH: $.gauges.['jenkins.queue.size.value'].value

Jenkins Jenkins: Build queue, buildable

The number of jobs that are in the Jenkins build queue and currently in the blocked state.

DEPENDENT jenkins.queue.buildable

Preprocessing:

- JSONPATH: $.gauges.['jenkins.queue.buildable.value'].value

Jenkins Jenkins: Build queue, pending

The number of jobs that are in the Jenkins build queue and currently in the blocked state.

DEPENDENT jenkins.queue.pending

Preprocessing:

- JSONPATH: $.gauges.['jenkins.queue.pending.value'].value

Jenkins Jenkins: Build queue, stuck

The number of jobs that are in the Jenkins build queue and currently in the blocked state.

DEPENDENT jenkins.queue.stuck

Preprocessing:

- JSONPATH: $.gauges.['jenkins.queue.stuck.value'].value

Jenkins Jenkins: HTTP active requests, rate

The number of currently active requests against the Jenkins master Web UI.

DEPENDENT jenkins.http.active_requests.rate

Preprocessing:

- JSONPATH: $.counters.['http.activeRequests'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 400, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/400 status code.

DEPENDENT jenkins.http.bad_request.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.badRequest'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 500, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/500 status code.

DEPENDENT jenkins.http.server_error.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.serverError'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 503, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/503 status code.

DEPENDENT jenkins.http.service_unavailable.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.serviceUnavailable'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 200, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/200 status code.

DEPENDENT jenkins.http.ok.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.ok'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response other, rate

The rate at which the Jenkins master Web UI is responding to requests with a non-informational status code that is not in the list: HTTP/200, HTTP/201, HTTP/204, HTTP/304, HTTP/400, HTTP/403, HTTP/404, HTTP/500, or HTTP/503.

DEPENDENT jenkins.http.other.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.other'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 201, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/201 status code.

DEPENDENT jenkins.http.created.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.created'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 204, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/204 status code.

DEPENDENT jenkins.http.no_content.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.noContent'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 404, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/404 status code.

DEPENDENT jenkins.http.not_found.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.notFound'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 304, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/304 status code.

DEPENDENT jenkins.http.not_modified.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.notModified'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP response 403, rate

The rate at which the Jenkins master Web UI is responding to requests with a HTTP/403 status code.

DEPENDENT jenkins.http.forbidden.rate

Preprocessing:

- JSONPATH: $.meters.['http.responseCodes.forbidden'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP requests, rate

The rate at which the Jenkins master Web UI is receiving requests.

DEPENDENT jenkins.http.requests.rate

Preprocessing:

- JSONPATH: $.timers.['http.requests'].count

- CHANGE_PER_SECOND

Jenkins Jenkins: HTTP requests, p95

The time spent generating the corresponding responses.

DEPENDENT jenkins.http.requests_p95.rate

Preprocessing:

- JSONPATH: $.timers.['http.requests'].p95

Jenkins Jenkins: HTTP requests, median

The time spent generating the corresponding responses.

DEPENDENT jenkins.http.requests_p50.rate

Preprocessing:

- JSONPATH: $.timers.['http.requests'].p50

Jenkins Jenkins: Version

Version of Jenkins server.

DEPENDENT jenkins.version

Preprocessing:

- JSONPATH: $.gauges.['jenkins.versions.core'].value

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: CPU Load

The system load on the Jenkins master as reported by the JVM’s Operating System JMX bean. The calculation of system load is operating system dependent. Typically this is the sum of the number of processes that are currently running plus the number that are waiting to run. This is typically comparable against the number of CPU cores.

DEPENDENT jenkins.system.cpu.load

Preprocessing:

- JSONPATH: $.gauges.['system.cpu.load'].value

Jenkins Jenkins: Uptime

The number of seconds since the Jenkins master JVM started.

DEPENDENT jenkins.system.uptime

Preprocessing:

- JSONPATH: $.gauges.['vm.uptime.milliseconds'].value

- MULTIPLIER: 0.001

Jenkins Jenkins: File descriptor ratio

The ratio of used to total file descriptors

DEPENDENT jenkins.descriptor.ratio

Preprocessing:

- JSONPATH: $.gauges.['vm.file.descriptor.ratio'].value

- MULTIPLIER: 100

Jenkins Jenkins: Service ping HTTP_AGENT jenkins.ping

Preprocessing:

- REGEX: {$JENKINS.PING.REPLY}$ 1

⛔️ON_FAIL: CUSTOM_VALUE -> 0

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Health score

Represents health of project. A number between 0-100.

Job Description: {#DESCRIPTION}

Job Url: {#URL}

DEPENDENT jenkins.build.health[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].healthReport..score.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Build number

Details: {#URL}/lastBuild/

DEPENDENT jenkins.last_build.number[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastBuild.number.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Build duration

Build duration (in seconds).

DEPENDENT jenkins.last_build.duration[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastBuild.duration.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Build timestamp DEPENDENT jenkins.last_build.timestamp[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastBuild.timestamp.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Build result DEPENDENT jenkins.last_build.result[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastBuild.result.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Failed Build number

Details: {#URL}/lastFailedBuild/

DEPENDENT jenkins.last_failed_build.number[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastFailedBuild.number.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Failed Build duration

Build duration (in seconds).

DEPENDENT jenkins.last_failed_build.duration[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastFailedBuild.duration.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Failed Build timestamp DEPENDENT jenkins.last_failed_build.timestamp[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastFailedBuild.timestamp.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Successful Build number

Details: {#URL}/lastSuccessfulBuild/

DEPENDENT jenkins.last_successful_build.number[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastSuccessfulBuild.number.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Successful Build duration

Build duration (in seconds).

DEPENDENT jenkins.last_successful_build.duration[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastSuccessfulBuild.duration.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins job [{#NAME}]: Last Successful Build timestamp DEPENDENT jenkins.last_successful_build.timestamp[{#NAME}]

Preprocessing:

- JSONPATH: $.jobs.[?(@.name == "{#NAME}")].lastSuccessfulBuild.timestamp.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Executors

The maximum number of concurrent builds that Jenkins may perform on this node.

DEPENDENT jenkins.computer.numExecutors[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].numExecutors.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: State

Represents the actual online/offline state.

Node description: {#DESCRIPTION}

DEPENDENT jenkins.computer.state[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].offline.first()

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Offline cause reason

If the computer was offline (either temporarily or not), will return the cause as a string (without user info). Empty string if the system was put offline without given a cause.

DEPENDENT jenkins.computer.offline.reason[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].offlineCauseReason.first()

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Idle

Returns true if all the executors of this computer are idle.

DEPENDENT jenkins.computer.idle[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].idle.first()

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Temporarily offline

Returns true if this node is marked temporarily offline.

DEPENDENT jenkins.computer.temp_offline[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].temporarilyOffline.first()

- BOOL_TO_DECIMAL

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Available disk space

The available disk space of $JENKINS_HOME on agent.

DEPENDENT jenkins.computer.disk_space[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.DiskSpaceMonitor'].size.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Available temp space

The available disk space of the temporary directory. Java tools and tests/builds often create files in the temporary directory, and may not function properly if there's no available space.

DEPENDENT jenkins.computer.temp_space[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.TemporarySpaceMonitor'].size.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Response time average

The round trip network response time from the master to the agent

DEPENDENT jenkins.computer.response_time[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.ResponseTimeMonitor'].average.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Available physical memory

The total physical memory of the system, available bytes.

DEPENDENT jenkins.computer.available_physical_memory[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.SwapSpaceMonitor'].availablePhysicalMemory.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Available swap space

Available swap space in bytes.

DEPENDENT jenkins.computer.available_swap_space[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.SwapSpaceMonitor'].availableSwapSpace.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Total physical memory

Total physical memory of the system, in bytes.

DEPENDENT jenkins.computer.total_physical_memory[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.SwapSpaceMonitor'].totalPhysicalMemory.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Total swap space

Total number of swap space in bytes.

DEPENDENT jenkins.computer.total_swap_space[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.SwapSpaceMonitor'].totalSwapSpace.first()

⛔️ON_FAIL: DISCARD_VALUE ->

Jenkins Jenkins: Computer [{#DISPLAY_NAME}]: Clock difference

The clock difference between the master and nodes.

DEPENDENT jenkins.computer.clock_difference[{#DISPLAY_NAME}]

Preprocessing:

- JSONPATH: $.computer.[?(@.displayName == "{#DISPLAY_NAME}")].monitorData['hudson.node_monitors.ClockMonitor'].diff.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- MULTIPLIER: 0.001

Zabbix_raw_items Jenkins: Get service metrics

-

HTTP_AGENT jenkins.get_metrics
Zabbix_raw_items Jenkins: Get healthcheck HTTP_AGENT jenkins.healthcheck
Zabbix_raw_items Jenkins: Get jobs info

-

HTTP_AGENT jenkins.job_info
Zabbix_raw_items Jenkins: Get computer info

-

HTTP_AGENT jenkins.computer_info

Triggers

Name Description Expression Severity Dependencies and additional info
Jenkins: Disk space is too low

Jenkins disk space monitors are reporting the disk space as less than the configured threshold. The message will reference the first node which fails this check.

Health check message: {{ITEM.LASTVALUE2}.regsub("(.*)",\1)}

{TEMPLATE_NAME:jenkins.disk_space.last()}=0 and {Jenkins by HTTP:jenkins.disk_space.message.strlen()}>0 WARNING
Jenkins: One or more Jenkins plugins failed to start

A failure is typically indicative of a potential issue within the Jenkins installation that will either be solved by explicitly disabling the failing plugin(s) or by resolving the corresponding plugin dependency issues.

Health check message: {{ITEM.LASTVALUE2}.regsub("(.*)",\1)}

{TEMPLATE_NAME:jenkins.plugins.last()}=0 and {Jenkins by HTTP:jenkins.plugins.message.strlen()}>0 INFO

Manual close: YES

Jenkins: Temporary space is too low

Jenkins temporary space monitors are reporting the temporary space as less than the configured threshold. The message will reference the first node which fails this check.

Health check message: {{ITEM.LASTVALUE2}.regsub("(.*)",\1)}

{TEMPLATE_NAME:jenkins.temporary_space.last()}=0 and {Jenkins by HTTP:jenkins.temporary_space.message.strlen()}>0 WARNING
Jenkins: There are deadlocked threads in Jenkins master JVM

There are any deadlocked threads in the Jenkins master JVM.

Health check message: {{ITEM.LASTVALUE2}.regsub('(.*)',\1)}

{TEMPLATE_NAME:jenkins.thread_deadlock.last()}=0 and {Jenkins by HTTP:jenkins.thread_deadlock.message.strlen()}>0 WARNING
Jenkins: Service has no online nodes

-

{TEMPLATE_NAME:jenkins.node.online.last()}=0 AVERAGE
Jenkins: Version has changed (new version: {ITEM.VALUE})

Jenkins version has changed. Ack to close.

{TEMPLATE_NAME:jenkins.version.diff()}=1 and {TEMPLATE_NAME:jenkins.version.strlen()}>0 INFO

Manual close: YES

Jenkins: has been restarted (uptime < 10m)

Uptime is less than 10 minutes

{TEMPLATE_NAME:jenkins.system.uptime.last()}<10m INFO

Manual close: YES

Jenkins: Current number of used files is too high (over {$JENKINS.FILE_DESCRIPTORS.MAX.WARN}% for 5m)

-

{TEMPLATE_NAME:jenkins.descriptor.ratio.min(5m)}>{$JENKINS.FILE_DESCRIPTORS.MAX.WARN} WARNING
Jenkins: Service is down

-

{TEMPLATE_NAME:jenkins.ping.last()}=0 AVERAGE

Manual close: YES

Jenkins job [{#NAME}]: Job is unhealthy

-

{TEMPLATE_NAME:jenkins.build.health[{#NAME}].last()}<{$JENKINS.JOB.HEALTH.SCORE.MIN.WARN} WARNING

Manual close: YES

Jenkins: Computer [{#DISPLAY_NAME}]: Node is down

Node down with reason: {{ITEM.LASTVALUE2}.regsub("(.*)",\1)}

{TEMPLATE_NAME:jenkins.computer.state[{#DISPLAY_NAME}].last()}=1 and {Jenkins by HTTP:jenkins.computer.offline.reason[{#DISPLAY_NAME}].strlen()}>0 AVERAGE

Depends on:

- Jenkins: Computer [{#DISPLAY_NAME}]: Node is temporarily offline

Jenkins: Computer [{#DISPLAY_NAME}]: Node is temporarily offline

Node is temporarily Offline with reason: {{ITEM.LASTVALUE2}.regsub("(.*)",\1)}

{TEMPLATE_NAME:jenkins.computer.temp_offline[{#DISPLAY_NAME}].last()}=1 and {Jenkins by HTTP:jenkins.computer.offline.reason[{#DISPLAY_NAME}].strlen()}>0 INFO

Manual close: YES

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.

Articles and documentation

+ Propose new article

Didn't find what you are looking for?