Docs » Integrations Guide » Use the Smart Agent » Monitors » collectd/jenkins

collectd/jenkins 🔗

Monitor Type: collectd/jenkins (Source)

Accepts Endpoints: Yes

Multiple Instances Allowed: Yes

Overview 🔗

Monitors jenkins by using the jenkins collectd Python plugin, which collects metrics from Jenkins instances by hitting these endpoints: ../api/json (job metrics) and metrics/<MetricsKey>/.. (default and optional Codahale/Dropwizard JVM metrics).

Requires Jenkins 1.580.3 or later, as well as the Jenkins Metrics Plugin (see Setup).

Install Jenkins Metrics Plugin 🔗

This monitor requires the Metrics Plugin in Jenkins. Go to Manage Jenkins -> Manage Plugins -> Available -> Search "Metrics Plugin" to find and install this plugin in your Jenkins UI.

Example Config 🔗

Sample YAML configuration:

- type: collectd/jenkins
  port: 8080
  metricsKey: reallylongmetricskey

Sample YAML configuration with specific enhanced metrics included

- type: collectd/jenkins
  port: 8080
  metricsKey: reallylongmetricskey
  - "vm.daemon.count"
  - "vm.terminated.count"

Sample YAML configuration with all enhanced metrics included

- type: collectd/jenkins
  port: 8080
  metricsKey: reallylongmetricskey
  enhancedMetrics: true

Configuration 🔗

To activate this monitor in the Smart Agent, add the following to your agent config:

monitors:  # All monitor config goes under this key
 - type: collectd/jenkins
   ...  # Additional config

For a list of monitor options that are common to all monitors, see Common Configuration.

Config option Required Type Description
pythonBinary no string Path to a python binary that should be used to execute the Python code. If not set, a built-in runtime will be used. Can include arguments to the binary as well.
host yes string
port yes integer
path no string
metricsKey yes string Key required for collecting metrics. The access key located at Manage Jenkins > Configure System > Metrics > ADD. If empty, click Generate.
enhancedMetrics no bool Whether to enable enhanced metrics (default: false)
excludeJobMetrics no bool Set to true to to exclude job metrics retrieved from /api/json endpoint (default: false)
includeMetrics no list of strings Used to enable individual enhanced metrics when enhancedMetrics is false
username no string User with security access to jenkins
apiToken no string API Token of the user
useHTTPS no bool Whether to enable HTTPS. (default: false)
sslKeyFile no string Path to the keyfile
sslCertificate no string Path to the certificate
sslCACerts no string Path to the ca file
skipVerify no bool Skip SSL certificate validation (default: false)

Metrics 🔗

These are the metrics available for this monitor. This monitor emits all metrics by default; however, none are categorized as container/host – they are all custom.

  • gauge.jenkins.job.duration (gauge)
    Time taken to complete the job in ms.
  • gauge.jenkins.node.executor.count.value (gauge)
    Total Number of executors in an instance
  • (gauge)
    Total number of executors being used in an instance
  • (gauge)
    Mean health score of an instance
  • (gauge)
    Binary value of disk space health
  • (gauge)
    Boolean value indicating state of plugins
  • (gauge)
    Binary value of temporary space health
  • (gauge)
    Boolean value indicating a deadlock
  • (gauge)
    Boolean value of instance is reachable or not
  • gauge.jenkins.node.queue.size.value (gauge)
    Total number pending jobs in queue
  • (gauge)
    Boolean value for slave is reachable or not
  • gauge.jenkins.node.vm.memory.heap.usage (gauge)
    Percent utilization of the heap memory
  • gauge.jenkins.node.vm.memory.non-heap.used (gauge)
    Total amount of non-heap memory used
  • (gauge)
    Total Memory used by instance The agent does not do any built-in filtering of metrics coming out of this monitor.