Jenkins Monitoring
Last updated on 01 October, 2024LogicMonitor’s Jenkins monitoring package leverages the native Jenkins API and Metrics API plugin to monitor and alert on the status of builds as well as server system stats.
Technology Type
- DevOps
Compatibility
As of December 2021, LogicMonitor’s Jenkins package is compatible with:
- Version 2.320 of Jenkins native API
- Version 4.0 of the Metrics plugin
As Jenkins releases newer versions of these, LogicMonitor will test and extend coverage as necessary.
Setup Requirements
Satisfying Dependencies
- Collector version 30.000 or higher.
- Installed Metrics plugin on Jenkins server. See Jenkins Metrics API plugin for details.
Add resources into monitoring
Add your Jenkins servers into monitoring. For more information on adding resources into monitoring, see Adding Devices.
Obtain credentials
LogicMonitor must provide the appropriate credentials to access the Jenkins resource’s data. To ensure proper permissions, LogicMonitor recommends creating a custom read-only role for a dedicated API user account that has been assigned the following minimum permissions:
Section | Permissions |
Overall | Read |
Job | Read |
View | Read |
Metrics | View, Healthcheck |
Reference documentation Metrics plugin.
Assign properties to resources
The following custom properties must be set on the Jenkins resource within LogicMonitor. For more information on setting properties, see Resource and Instance Properties.
Property | Value |
jenkins.user | REST API username. |
jenkins.key | REST API key. Has preference over pass. You can choose to configure key or pass. Only one is required |
jenkins.pass | REST API password. You can choose to configure pass or key. Only one is required. |
jenkins.port | (Optional) Defaults to 8080. |
Import LogicModules
From the LogicMonitor public repository, import all Jenkins LogicModules, which are listed in the LogicModules in Package section of this support article. If these LogicModules are already present, ensure you have the most recent versions.
After the LogicModules are imported (assuming all previous setup requirements have been met), data collection will automatically commence.
Troubleshooting
The modules in this package are designed with a debug mode embedded in the data collection scripts. If issues occur, turn on debug mode by setting the variable debug to “true” to get more information in the output when testing the script in the Collector Debug Facility. For more information on testing scripts in the Collector Debug Facility, see Script Troubleshooting.
LogicModules in Package
LogicMonitor’s package for Jenkins consists of the following LogicModules. For full coverage, please ensure that all of these LogicModules are imported into your LogicMonitor platform.
Display Name | Type | Description |
addCategory_Jenkins | PropertySource | Verifies that credentials are present and working for Jenkins monitoring. |
Jenkins Build Statistics | DataSource | Monitors job specific build metrics including scores, duration, and status. |
Jenkins Overview Metrics | DataSource | Provides metrics on Jenkins server including basic health and status info for the server as well as more detailed overview build metrics. |
Jenkins Health | EventSource | Alerts when a healthcheck returns false for “healthy”. Attempts to prevent event duplication using script cache. |
Jenkins Troubleshooter | DataSource | Verifies that the proper permissions are present for modules in the Jenkins suite. Creates an instance for each module that lacks the necessary permissions to authenticate. |
When setting static datapoint thresholds on the various metrics tracked by this package’s DataSources, LogicMonitor follows the Jenkins’s best practice KPI recommendations. If necessary, we encourage you to adjust these predefined thresholds to meet the unique needs of your environment. For more information on tuning datapoint thresholds, see Tuning Static Thresholds for Datapoints.