SLIs and SLOs with Prometheus and Grafana for your APIs managed by Tyk

Do you use Prometheus and Grafana? How do you monitor your APIs and their upstream services? Do you use SLOs, SLIs and other best practises from the SRE world?

If you are wondering how to export metrics collected by Tyk API Gateway to Prometheus and Grafana, here is a demo project that should answer all your questions:
https://github.com/TykTechnologies/demo-slo-prometheus-grafana.

Feedback and questions welcome in this thread :heart:

6 Likes

Deployed in minutes, all configured and out of the box! Thanks a lot @sonja

1 Like

facing issues while deploying Prometheus and Grafana, K6 too. please guide me to reslove the issue.
Promethus issue:
ts=2023-05-22T10:46:28.130Z caller=query_logger.go:91 level=error component=activeQueryTracker msg=“Error opening query log file” file=/data/queries.active err=“open /data/queries.active: permission denied”
panic: Unable to create mmap-ed active query log
Grafana issue:
grafana_1 | mkdir: can’t create directory ‘/var/lib/grafana/plugins’: Permission denied
grafana_1 | GF_PATHS_DATA=‘/var/lib/grafana’ is not writable.
grafana_1 | You may have issues with file permissions, more information here: Run Grafana Docker image | Grafana documentation

it looks like a filesystem permission issue:

docker compose tries to mount several local directories into the corresponding container (for example your local folder ./data/grafana/ to /var/lib/grafana inside the container.

You need to make sure that the users the container runs under have write access to these local folders