JenkMon Supports Monitoring Multiple Agents

JenkMon is synthetic monitoring of Jenkins by running a simulated pipelines on Jenkins agents to capture issues before they have an impact. Previously JenkMon ran on it’s own agent to monitor the health of Jenkins but we have now added support for specifying specific agents that the monitoring can run on. This will allow us to monitor different types of agents including windows Agents.

The simulated pipeline is managed through ciinabox-pipelines repo here and the default configuration of the pipeline is managed via the jenkins-distribution docker image here.

Updating JenkMon

The latest JenkMon update is available in the latest (jenkins-distrubtion)[] release 2.332.2-b3 as well as the latest ciinabox2 release of 0.8.1 to add required IAM permissions for push metrics to cloudwatch from the Jenkins controller.

JenkMon will create a new pipeline job in the monitoring folder with the default schedule of 0 7 * * * of the timezone specified in Jenkins. Old JenkMon jobs can be safely deleted.

Overriding JenkMon Defaults

JenkMon comes with a default config managed by the jenkins-distribution docker image which creates a monitoring pipeline job on the default EC2 Amazon Linux agent.

    cron: '0 7 * * *' # how often the test pipeline will run
    check_docker: 'true' # executes a docker test in the pipeline
    label: 'linux' # label specified in jenkins to run the pipeline on

To override this configuration create a new yaml file in the jcasc code commit repo called parameters.yaml and add your overrides to the yaml file and commit the changes. This will then apply the changes through the jcasc configuration.

For example if you wanted to override the cron schedule to 1am, apply the following config to the parameters.yaml file:

    cron: '0 1 * * *'

To add additional agents to be monitored add additional blocks to jenkmon with each key being unique and supplying all 3 properties

    cron: '0 3 * * *'
    check_docker: 'false'
    label: 'windows-build'
    cron: '0 1 * * *'
    check_docker: 'false'
    label: 'windows-test'

Guardian Configuration

To add alarm for JenkMon Guardian version 0.7.15 is required.

To configure guardian alarms for JenkMon add the following config to your guardian configuration.

  - Id: # value of env.JENKINS_URL defined in your jenkins
    Label: linux # label specified in jenkmon config
  - Id:
    Label: windows-build
  - Id:
    Label: windows-test