Coder Social home page Coder Social logo

gravitee-prometheus-exporter's Introduction

Gravitee.IO Prometheus exporter

An exporter for Prometheus based on the logs backend (ElasticSearch) of Gravitee.io.

Environment variables

  • GPE_GIO_URL : Gravitee.IO management Url (default : http://localhost:8005/management )
  • GPE_GIO_USR Gravitee basic auth Username (default : admin)
  • GPE_GIO_PWD Gravitee basic auth Password (default : admin)
  • GPE_ES_URL Elasticsearch Url (default : http://localhost:9200))
  • GPE_ES_USER ElasticSearch basic auth user (default : 'None')
  • GPE_ES_PWD Elasticsearch basic auth password (default : 'None')
  • GPE_ES_INDEX Index Pattern for Gravitee index. Must contains %Y, %m, %d. (default : gravitee-%Y.%m.%d)
  • GPE_PORT Port to listen on. (default : 8888)
  • LOG_LEVEL (ERROR, WARNING, INFO, DEBUG)

Metrics returned

# HELP api_count Number of APIS in Gravitee.io
# TYPE api_count gauge
api_count 2.0
# HELP gio_http_call Api calls
# TYPE gio_http_call gauge
gio_http_call{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCode="200",uri="/v1/customers"} 166.0
gio_http_call{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCode="201",uri="/v1/customers"} 10.0
gio_http_call{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCode="404",uri="/v1/customers"} 3.0
# TYPE gio_http_call_familly gauge
gio_http_call_familly{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCodeFamily="1XX",uri="/v1/customers"} 0.0
gio_http_call_familly{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCodeFamily="2XX",uri="/v1/customers"} 176.0
gio_http_call_familly{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCodeFamily="3XX",uri="/v1/customers"} 0.0
gio_http_call_familly{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCodeFamily="4XX",uri="/v1/customers"} 3.0
gio_http_call_familly{api_id="...",api_name="V1Customer",description="About customer ressources...",owner="admin",responseCodeFamily="5XX",uri="/v1/customers"} 0.0

Internals

This application scrape Elasticsearch to retrieve gravitee logs. It consolidate datas by calling Gravitee Management API.

Cache

To avoid too much trafic load on elasticsearch & gravitee, a little cache layer is added

  • Api informations is available for 300 seconds (api name, owner name, description etc)
  • Logs Count is available for 10 seconds
  • Api count is available for 300 seconds

gravitee-prometheus-exporter's People

Contributors

adefossez-zenika avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gravitee-prometheus-exporter's Issues

Logs format

Logs format should be chosen (plaintext, json)

restarts on K8S

Got some random restarts on my cluster, but no info why it happens.
More logs, please!

Logs output

Logs are displayed on stdout, I want to be able to write logs in a file

Loggin

Add logLevel in log messages ๐Ÿ‘

2019-10-17 05:50:17 Something went wrong when fetching https://lys-d-elastic-hmbu-p-lys-loyalty.aivencloud.com:24115/gravitee-request-2019.10.17/_search, got status code 404

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.