Code Monkey home page Code Monkey logo

jenkins-datadog-plugin's Introduction

Jenkins Datadog Plugin

A Jenkins plugin used to forward metrics, events, and service checks to an account at Datadog, automatically.

There is a Jenkins-CI Wiki page for this plugin, but it refers to our DataDog/jenkins-datadog-plugin for documentation.

Features

Currently, the plugin is tracking the following data.

List of events:

  • Started build
  • Finished build

List of metrics:

  • Build duration, in seconds (jenkins.job.duration)

List of service checks:

  • Build status (jenkins.job.status)

All events, metrics, and service checks include the following tags, if they are available:

  • job
  • result
  • branch

These are optional tags that can be included in all events, metrics, and service checks, if enabled from the Manage Jenkins -> Configure System page (disabled by default):

  • node

Customization

Currently we allow you the ability to blacklist any jobs which you do not want to have events, metrics, and service checks reported for.

Installation

This plugin requires Jenkins 1.580.1 or newer.

This plugin can be installed from the Update Center (found at Manage Jenkins -> Manage Plugins) in your Jenkins installation. Select the Available tab, search for Datadog and look for Datadog Plugin. Once you find it, check the checkbox next to it, and install via your preference by using one of the two install buttons at the bottom of the screen. Check to see that the plugin has been successfully installed by searching for Datadog Plugin on the Installed tab. If the plugin has been successfully installed, then continue on to the configuration step, described below.

Note: If you do not see the version of Datadog Plugin that you are expecting, make sure you have run Check Now from the Manage Jenkins -> Manage Plugins screen.

Configuration

To configure your newly installed Datadog Plugin, simply navigate to the Manage Jenkins -> Configure System page on your Jenkins installation. Once there, scroll down to find the Datadog Plugin section. Find your API Key from the API Keys page on your Datadog account, and copy/paste it into the API Key textbox on the Jenkins configuration screen. You can test that your API Key works by pressing the Test Key button, on the Jenkins configuration screen, directly below the API Key textbox. Once your configuration changes are finished, simply save them, and you're good to go!

Logging

Logging is done by utilizing the java.util.Logger, which follows the best logging practices for Jenkins. In order to obtain logs, follow the directions listed here. When adding a Logger, all Datadog plugin functions start with org.datadog.jenkins.plugins.datadog. and the function name you're after should autopopulate. As of this writing, the only function available was org.datadog.jenkins.plugins.datadog.DatadogBuildListener.

Release Process

Overview

Our DataDog/jenkins-datadog-plugin repository handles the most up-to-date changes we've made to the Datadog Plugin, as well as issue tickets revolving around that work. Releases are merged to the Jenkins-CI git repo for our plugin, and represents the source used for plugin releases found in the Update Center in your Jenkins installation.

Every commit to our DataDog/jenkins-datadog-plugin repository triggers a Jenkins build on our internal Jenkins installation.

A list of our releases is here.

How to Release

To release a new plugin version, change the project version in the pom.xml from x.x.x-SNAPSHOT to the updated version number you'd like to see. Add an entry for the new release number to CHANGELOG.md, and ensure that all the changes are listed accurately. Then run the jenkins-datadog-plugin-release job in our Jenkins installation. If the job completes successfully, then the newly updated plugin should be available from the Jenkins Update Center within ~4 hours (plus mirror propogation time).

Issue Tracking

We use Github's built in issue tracking system for all issues tickets relating to this plugin, found here. However, given how Jenkins Plugins are hosted, there may be issues that are posted to JIRA as well. You can check here for those issue postings.

Here are unresolved issues on JIRA mentioning Datadog.

Changes

See the CHANGELOG.md

How to contribute code

First of all and most importantly, thank you for sharing.

If you want to submit code, please fork this repository and submit pull requests against the master branch. For more information, checkout the contributing guidelines for our agent. We'll attempt to follow these here, as well, where it makes sense.

Manual Testing

In order to keep track of some testing procedures for ensuring proper functionality of the Datadog Plugin on Jenkins, there is a testing document.

jenkins-datadog-plugin's People

Contributors

johnlzeller avatar remh avatar

Watchers

Ben Regenspan avatar Tamas Neltz avatar James Cloos avatar Péter Szász avatar Mylo28 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.