Code Monkey home page Code Monkey logo

siddhi-io-prometheus's Introduction

Siddhi IO Prometheus

Jenkins Build Status GitHub Release GitHub Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-io-prometheus extension is an extension to Siddhi that consumes and expose Prometheus metrics from/to Prometheus server.

For information on Siddhi and it's features refer Siddhi Documentation.

Download

  • Versions 2.x and above with group id io.siddhi.extension.* from here.
  • Versions 1.x and lower with group id org.wso2.extension.siddhi.* from here.

Latest API Docs

Latest API Docs is 2.1.3.

Features

  • prometheus (Sink)

    This sink publishes events processed by Siddhi into Prometheus metrics and exposes them to the Prometheus server at the specified URL. The created metrics can be published to Prometheus via 'server' or 'pushGateway', depending on your preference.
     The metric types that are supported by the Prometheus sink are 'counter', 'gauge', 'histogram', and 'summary'. The values and labels of the Prometheus metrics can be updated through the events.

  • prometheus (Source)

    This source consumes Prometheus metrics that are exported from a specified URL as Siddhi events by sending HTTP requests to the URL. Based on the source configuration, it analyzes metrics from the text response and sends them as Siddhi events through key-value mapping.The user can retrieve metrics of the 'including', 'counter', 'gauge', 'histogram', and 'summary' types. The source retrieves the metrics from a text response of the target. Therefore, it is you need to use 'string' as the attribute type for the attributes that correspond with the Prometheus metric labels. Further, the Prometheus metric value is passed through the event as 'value'. This requires you to include an attribute named 'value' in the stream definition.
    The supported types for the 'value' attribute are 'INT', 'LONG', 'FLOAT', and 'DOUBLE'.

Dependencies

  • Prometheus server instance should be started.

  • Prometheus Pushgateway should be started. (optional)

  • Download and copy the prometheus client jars to the Siddhi Class path from https://mvnrepository.com/artifact/io.prometheus

    • simpleclient_common-*.jar
    • simpleclient-*.jar
    • simpleclient_httpserver-*.jar
    • simpleclient_pushgateway-*.jar

Installation

For installing this extension on various siddhi execution environments refer Siddhi documentation section on adding extensions.

Integration Test with Local Docker (Optional)

  • The prometheus sink can be tested with the Docker base integration test framework. The test framework initialize a Docker container with required configuration before execute the test suit.

    To start integration tests,

    1. Install and run Docker

    2. To run the integration tests,

      • navigate to the siddhi-io-prometheus/ directory and issue the following command.
        mvn verify -P local-prometheus
        
  • Prometheus target configurations can be modified at the directory for integration tests :

    siddhi-io-prometheus/component/src/test/resources/prometheus/prometheus.yml

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.

  • If you find any issues related to the extension please report them on the issue tracker.

  • For production support and other contribution related information refer Siddhi Community documentation.

siddhi-io-prometheus's People

Contributors

anugayan avatar dasuni-30 avatar dnwick avatar hindujab avatar maheshika avatar mayuravaani avatar mohanvive avatar niveathika avatar pcnfernando avatar rukshiw avatar suhothayan avatar sujanan avatar tishan89 avatar wso2-jenkins-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siddhi-io-prometheus's Issues

Prometheus Sample doesn't work with Java 11

Description:
$subject (PublishPrometheusMetrics in tooling), with the following error. However, it works fine with Java8.

[2022-03-24 19:02:22,338] ERROR {io.siddhi.core.SiddhiAppRuntimeImpl} - Error starting Siddhi App 'PublishPrometheusMetrics', triggering shutdown process. sun/misc/ServiceConfigurationError

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.