blob: 4cc05ebea990ea2254b3c9a8fc059624debc447f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Ouroboros metrics
A collection of observability tools for exporting and
visualising metrics collected from Ouroboros.
Currently has one very simple exporter for InfluxDB, and provides
additional visualization via grafana.
More features will be added over time.
## Requirements:
InfluxDB OSS 2.0, https://docs.influxdata.com/influxdb/v2.0/
## Optional requirements:
Grafana, https://grafana.com/
## Setup
Install and run InfluxDB and create a bucket in influxDB for exporting
Ouroboros metrics, and a token for writing to that bucket. Consult the
InfluxDB documentation on how to do this,
https://docs.influxdata.com/influxdb/v2.0/get-started/#set-up-influxdb.
To use grafana, install and run grafana open source,
https://grafana.com/grafana/download
https://grafana.com/docs/grafana/latest/?pg=graf-resources&plcmt=get-started
Go to the grafana UI (usually http://localhost:3000) and set up
InfluxDB as your datasource:
Go to Configuration -> Datasources -> Add datasource and select InfluxDB
Set "flux" as the Query Language, and
under "InfluxDB Details" set your Organization as in InfluxDB and set
the copy/paste the token for the bucket to the Token field.
To add the Ouroboros dashboard,
select Dashboards -> Manage -> Import
and then either upload the json file from this repository in
dashboards/general.json
or copy the contents of that file to the "Import via panel json"
textbox and click "Load".
## Run the exporter:
Clone this repository.
Create and activate a virtual environment and install the dependencies:
```
python -m venv venv
source venv/bin/activate
pip install .
```
Edit the config.ini.example file and fill out the InfluxDB
information (token, org). Save it as config.ini.
and run oexport.py
```
python oexport.py
```
|