NLnetLabs / routinator

An RPKI Validator and RTR server written in Rust
https://nlnetlabs.nl/projects/routing/routinator/
BSD 3-Clause "New" or "Revised" License
470 stars 71 forks source link

grafana integration - quesion #324

Closed dudster83 closed 4 years ago

dudster83 commented 4 years ago

not an issue, but a stupid question, I guess I'd install everything, seems better than other validators. I'm still having troubles on the grafana integration I can see the results under /metrics with curl or regular browsing. when i'm trying to add Prometheus data source and point it to the server, i can't fetch the data what am I missing please?

ximon18 commented 4 years ago

SSH into the Prometheus server

1.To add the metric source you must edit the prometheus.yml file adding a stanza under scrape_configs like this:

scrape_configs:
   ...
   - job_name: 'routinator'
    static_configs:
    - targets: ['domain.name.of.your.routinator.instance:9556']

/metrics is the default so we don't need to specify that.

  1. Reload Prometheus, e.g. sudo systemctl reload prometheus.service.

In the Prometheus web user interface

  1. On the targets page, e.g. http://domain.name.of.your.prometheus.instance:9090/targets, you should see your new job and its status. It will show as state unknown at first and change to state UP.

image

  1. On the graph page, e.g. http://domain.name.of.your.prometheus.instance:9090/graph, you should be able to query for a Routinator metric, e.g. http://domain.name.of.your.prometheus.instance:9090/graph?g0.range_input=15m&g0.stacked=1&g0.expr=routinator_rrdp_status&g0.tab=0

image

In the Grafana web user interface:

  1. You need to have added your Prometheus instance as a datasource. Press the settings cog on the left in the web ui, click on Data Sources -> Add data source -> Prometheus and set HTTP URL to http://domain.name.of.your.prometheus.instance:9090/.
  2. Click + on the left in the web ui, click on Import and enter 11922 in the "Grafana.com Dashboard" field and press "Load".

Dadda! You now hava a Routinator dashboard in Grafana.

image

See:

Hope that helps,

Ximon

dudster83 commented 4 years ago

Hi Ximon thanks for your fast and detailed reply, of course it helped.

ximon18 commented 4 years ago

Great, glad that worked!

For anyone reading this in future the guidance above was correct at the time for the following application versions: