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.
$ 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}/pingSample 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.
curl orionexporter:${PORT}/probe?target=https://wilma.example.com- /probe - endpoint to communicate with Prometheus
- /ping - returns
pong - /version - returns
buildandcommit
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}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"