Giter Club home page Giter Club logo

rundeck-prometheuspushplugin's Introduction

Prometheus Push Rundeck Plugin

A notification plugin to send the result of a Rundeck job execution to the Prometheus Pushgateway.
Supported Rundeck job trigger types are: success, failure


Build Requirements

  • Gradle
  • Java >= 1.8

Installation

Copy your compiled jar into /var/lib/rundeck/libext (can also be done via the interface in newer versions via Configuration -> Plugins -> Upload Plugin).

chown rundeck:rundeck /var/lib/rundeck/libext/rundeck-prometheuspushplugin*.jar
rm -rf /var/lib/rundeck/libext/cache
service rundeckd restart

Plugin Properties

Name Description Default Value
pushgateway_endpoints Comma seperated list of Pushgateway endpoints ${globals.prometheus_pushgateway_endpoints}
metric_prefix Metric name prefix ${globals.prometheus_metric_prefix}

Project level configuration example (Project Settings -> Edit Configuration -> Edit Configuration File):

project.globals.prometheus_pushgateway_endpoints=pushgateway1:9091,pushgateway2:9091
project.globals.prometheus_metric_prefix=app

Prometheus Data

Metric Labels Example Description Source
* job my_rundeck_job Prometheus job ID Rundeck job ID
PREFIX name type environment project app{job="my_rundeck_job",name="My Rundeck Job",project="RundeckProjectName",
type="RundeckJobGroupFirst",environment="RundeckJobGroupSecond"}
Root of PREFIX labels Rundeck Project, Rundeck Job Group (type/environment)
PREFIX_state app_state{job="my_rundeck_job"} Execution state (1 = healthy 0 = unhealthy) Rundeck job execution succeeded/failed
PREFIX_epochtime Execution timestamp Rundeck job execution startime
PREFIX_duration Time taken to get retrieve health state Rundeck job execution duration
PREFIX_execution instance execution app_execution{execution="322335",instance="https://myrundeck:8080",job="my_rundeck_job"} Root of execution labels Rundeck instance and job execution ID

Data Example

app{job="check_application_state",name="Check Application State",project="Internal",type="Applicative",environment="Development"}

PromQL Example

Get application state based on environment:

app_state and on(job) app{environment="Development"}

Log

Plugin errors are written into /var/log/rundeck/service.log.
On failure it will notify Rundeck by returning "false", but it is currently unclear how you can actually act on it...

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.