Integrations

Jenkins plugin

This Coralogix Jenkins plugin adds support for sending job’s console logs & stats and push tags to Coralogix.

Installation

  • Download the hpi file from GitHub releases
  • Put the hpi file in the directory $JENKINS_HOME/plugins
  • Restart Jenkins

Configuration

This document includes cluster dependent URL’s. Each URL has a variable part (in Italic). Please match this part with a row entry within the following table. Copy the table row entry located under the column that matches the top level domain of your Coralogix account (.com, .in etc.). Replace the variable part of the URL with this entry.

 .com.in
Elasticsearch-APIhttps://coralogix-esapi.coralogix.com:9443https://es-api.app.coralogix.in:9443
SSL Certificateshttps://coralogix-public.s3-eu-west-1.amazonaws.com/certificate/Coralogix-EU.crthttps://coralogix-public.s3-eu-west-1.amazonaws.com/certificate/Coralogix-IN
.pem
Cluster URLcoralogix.comapp.coralogix.in

Go to Manage Jenkins, open Configure system, find Coralogix section and configure your account private key for sending system/audit/security logs and metrics:

If your Coralogix account top level domain is different than ‘.com’ overwrite the Coralogix API endpoint value by going to the Advanced... section and inserting,

https://api.Cluster URL

Credentials

Before usage you need to create Jenkins credentials with Coralogix private key for your team:

Usage

This plugin supports sending build logs and tags pushing both for Freestyle project and Pipelines.

Send logs

Send your build logs to Coralogix.

Freestyle project
Just check the Send build logs to Coralogix, select Private Key, and provide Application name:

Pipeline

This is the Groovy implementation:

pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                echo "Hello world!"
            }
        }
    }
    post {
        always {
            coralogixSend privateKeyCredentialId: 'coralogix-production',
                          application: 'MyApp',
                          subsystem: "${env.JOB_NAME}",
                          splitLogs: true
        }
    }
}

Send metrics

Send your pipeline metrics to Coralogix.

Pipeline

This is the Groovy implementation:

pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                echo "Hello world!"
            }
        }
    }
    post {
        always {
            coralogixMetricsSend privateKeyCredentialId: 'coralogix-production',
                                 application: 'MyApp',
                                 subsystem: "${env.JOB_NAME}",
                                 splitStages: false
        }
    }
}

Push tag

Push version tag to Coralogix.

Freestyle project
Add build step Push Coralogix tag and configure:

  • Private Key – your Coralogix account private key
  • Tag name – version tag name
  • Application name – your application name
  • Subsystem names – your subsystem names
  • Icon(optional) – your own tag picture

Pipeline

This is the Groovy representation of Push Coralogix tag build step:

pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                echo "Hello world!"
            }
        }
    }
    post {
        success {
            coralogixTag privateKeyCredentialId: 'coralogix-production',
                         tag: '1.0.0',
                         application: 'MyApp',
                         subsystems: [
                            [name: 'staging'],
                            [name: 'production']
                         ],
                         icon: 'https://raw.githubusercontent.com/coralogix/jenkins-coralogix-plugin/master/docs/images/logo.svg'
        }
    }
}

License

The Coralogix Plugin is licensed under the Apache 2.0 License.

Start solving your production issues faster

Let's talk about how Coralogix can help you

Managed, scaled, and compliant monitoring, built for CI/CD

Get a demo

No credit card required

© 2021 Copyright Coralogix. All rights reserved.

Get a personalized demo

Jump on a call with one of our experts and get a live personalized demonstration