Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIWARE-Ops/OrionExporter

Repository files navigation

FIWARE Banner

Orion Context Broker exporter for Prometheus

Docker badge Build Status

Overview

This project is part of FIWARE OPS infrastructure. It provides the possibility to organize Prometheus monitoring of Orion's state. Orion can be protected by Keyrock, in this case KeyrockTokenProvider should be define. It works as a service and allows to check several entities as well.

How to run

$ docker run -it --rm \
             -p 0.0.0.0:${PORT}:${PORT} \
             fiware/service.orionexporter \
             --ip ${IP} \
             --port ${PORT} \
             --config ${PATH_TO_CONFIG}
$ curl http://localhost:${PORT}/ping

How to configure

Sample config is located here. If entities are defined, you should provide at least an id (the exporter will use this id to export metrics) or type.

Example of query

curl orionexporter:${PORT}/probe?target=https://wilma.example.com

List of endpoints

  • /probe - endpoint to communicate with Prometheus
  • /ping - returns pong
  • /version - returns build and commit

Prometheus config (for this example)

  - job_name: 'orions'
    scrape_interval: 10m
    metrics_path: /probe
    static_configs:
      - targets:
        - https://wilma.example.com
        - http://orion.example.com:1026
        - http://wilma2.example.com:4444
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: orionexporter:${PORT}

Prometheus alert rule

groups:
- name: orion.rules
  rules:
  - alert: EndpointDown
    expr: orion_check_instance == 0
    for: 3m
    labels:
      severity: "critical"
    annotations:
      summary: "Endpoint {{ $labels.instance }} is down"

  - alert: EntityDown
    expr: orion_check_entities == 0
    for: 3m
    labels:
      severity: "warning"
    annotations:
      summary: "Some problems with entities"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published