-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Raman Sailopal edited this page Jun 10, 2021
·
13 revisions
- Install Grafana - https://grafana.com/docs/grafana/latest/installation/
- Install Prometheus - https://prometheus.io/docs/prometheus/latest/installation/
- Run the YottaDB metrics “exporter” by following the instructions here https://github.com/RamSailopal/yotta-dashboard/blob/main/README.md
- Add the extract found at https://raw.githubusercontent.com/RamSailopal/yotta-dashboard/main/prometheus.yml to the prometheus.yml config file in /etc/prometheus. Change the IP address and port to the address/port of the server where the “exporter” is running accordingly.
- Start Prometheus
- Start Grafana and log into the web interface (default port is 3000, default username and password is admin/admin)
- Click on the cog icon on the left hand side representing configuration, then Data Sources and Add Data Source. Select the Prometheus data source. Name it and then enter the URL. Click Save and Test to ensure it is working.
- Click on the four square boxes icon on the left hand side representing Dashboards. Click Manage and then Import. Paste the JSON found here - https://raw.githubusercontent.com/RamSailopal/yotta-dashboard/main/examples/Yottadb-grafana.json to the json panel. Click Load.
- A dashboard will then be created showing Orders, Sets and Gets metrics. To add further metrics, click on the add panel icon, then click the Metrics “drop down” option in the Query section, ensuring that Prometheus is selected as the data source. All the metrics exported from YottaDB should now appear for selection to chart in a panel.
- Attain the latest copy of Loki - e.g. curl -O -L "https://github.com/grafana/loki/releases/download/v2.2.1/loki-linux-amd64.zip
- Unzip the file to attain the executable - unzip "loki-linux-amd64.zip"
- Give the executable file executable permissions - chmod a+x "loki-linux-amd64"
- Move the executable file to an executable system path and rename to loki - mv "loki-linux-amd64" "/usr/local/bin/loki"
- Create a configuration directory for Loki - mkdir "/etc/Loki"
- Copy the configuration yaml file cp "loki.yaml" "/etc/loki"
- Amend the configuration file with the correct IP address accordingly
- Create a systemd service file - cp "systemd/loki.service" "/usr/lib/systemd/system/loki.service"
- Attain the latest copy of Promtail - e.g. curl -O -L "https://github.com/grafana/loki/releases/download/v2.2.1/promtail-linux-arm64.zip"
- Unzip the file to attain the executable - unzip "promtail-linux-amd64.zip"
- Give the executable file executable permissions - chmod a+x "promtail-linux-amd64"
- Move the executable file to an executable system path and rename to loki - mv "promtail-linux-amd64" "/usr/local/bin/promtail"
- Create a configuration directory for Loki - mkdir "/etc/promtail"
- Copy the configuration yaml file cp "promtail.yaml" "/etc/promtail"
- Create a systemd service file - cp "systemd/promtail.service" "/usr/lib/systemd/system/promtail.service"
- Reload the systemd daemon - systemctl daemon-reload
- Start the Loki service - systemctl start loki
- Start the Promtail service - systemctl start promtail
- Add the JSON from https://raw.githubusercontent.com/RamSailopal/yotta-dashboard/main/examples/Yottadb-graf-loki.json to create a new dashboard (as instructed earlier)