GithubHelp home page GithubHelp logo

jkstatus_exporter's Introduction

JK Status Exporter

Um projeto simples em que faz o parse do arquivo gerado pela página do JKStatus, em formato XML para o formato do Prometheus.

Não foi utilizado a lib do prometheus client.

O projeto possui um Dockerfile simples, e uma imagem no Dockerhub, para fazer uso, utilize o seguinte formato de arquivo config.yml

remote:
  url: https://remote/
  context: jkstatus
  login: admin
  pass: secret

local:
  url: http://127.0.0.1/
  context: jkstatus

Para adicionar em um arquivo docker-compose.yml utilize o seguinte formato de exemplo:

jkstatus-exporter:
    image: romulofc/jkstatus_exporter
    container_name: jkstatus-exporter
    volumes:
    - ./config.yml:/etc/jkstatus_exporter/config.yml:ro
    ports: 
    - 9573:9573

Para realizar alteração e geração de um novo JAR, execute a seguinte sequência:

gradle clean
gradle assemble

Caso deseje executar de forma isolada e em formato de serviço, execute:

docker run -it --name jkstatus_exporter -v config.yml:/etc/jkstatus_exporter/config.yml:ro -p 9573:9573 romulofc/jkstatus_exporter

Para que a chamada no Prometheus funcione de forma correta, adicione o seguinte trecho:

- job_name: 'jkstatus-exporter'
    metrics_path: /probe
    static_configs:
      - targets:
        - remote
        - local
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: jkstatus-exporter:9571

Para testar se a comunicação ocorreu de forma correta, utilize a seguinte URL: http://127.0.0.1:9573/probe?target=remote .

jkstatus_exporter's People

Contributors

romulofagundes avatar

Watchers

 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.