Skip to content
Snippets Groups Projects
Commit abb568e1 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

doc: update grafana doc

parent 2c9b522c
Branches
No related tags found
No related merge requests found
Pipeline #110065 passed
# Monitoring
All logs printed by the Proxy are read and translated into statistics on a grafana dashboard.
All logs printed by the Cozy stack can be displayed on a grafana dashboard for easier sorting.
:::info Grafana
[scaleway monitoring](https://grafana.self-data.alpha.grandlyon.com/)
To start the monitoring system, connect to the VM and type the following command:
[production address](https://oauth-logs.cozycloud.cc/d/xSRhz8fMk/cozy-oauth-proxy?orgId=1&refresh=5s)
```bash
docker compose -f /root/monitoring/logs-monitoring/docker-compose.yaml up -d
```
Then, you can access it [here](https://grafana.self-data.alpha.grandlyon.com/)
:::info Login
Ask for credentials to a team member
:::
This monitoring system allow the team to parse more easily the cozy-stack logs when something goes wrong. For instance, test konnector or check from the proxy if an issue was coming from Enedis or Grdf.
......@@ -13,13 +19,20 @@ This monitoring system allow the team to parse more easily the cozy-stack logs w
Learn more about how it works [here](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/logs-monitoring).
:::warning High volume
The service parses a very high amount of logs, most of all when debugging an instance. To limit our disk usage we tend to stop the service when not needed.
Just type docker-compose down to stop it in monitoring/logs-monitoring. The docker volume will be persisted.
The service parses a very high amount of logs, most of all when debugging an instance. To limit our disk usage we tend to stop the service when not needed. To do so, type the following command:
```bash
docker compose -f /root/monitoring/logs-monitoring/docker-compose.yaml down
```
The docker volume will be persisted.
:::
To easily plug loki on a specific instance:
Some dashboards are already available, [ecolyodemo](https://grafana.self-data.alpha.grandlyon.com/d/f9685577-861d-4d44-883f-a9651dee147e/ecolyodemo?orgId=1) for example
To connect a specific instance logs to Grafana:
- Click on configuration and data sources
- Add data sources
- Find Loki and type the loki url http://loki:3100
- In the query builder select the container "easy-cozy" then add |= "domain=[specific-instance]"
- Create a new dashboard
- Select `Loki` as the data source
- In the label filters select the `container_name` to be `cozy-stack-1`
- add a `line contains` filter and type `domain=[specific-instance]`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment