Add monitoring

After securing the API we want to gain some more benefit from the API gateway.

As the gateway is a central proxy each call to our API has to pass through, this is an ideal place not only to enforce different levels of security but also to monitor the usage of the API.

For monitoring Kong provides a plugin that is available for usage with the open source version. This plugin is called Prometheus and it does what it name promises. It provides a /metrics endpoint to the AdminAPI that can be scraped by a Prometheus server.

Once we have this Prometheus server we can visualize the API usage with a Grafana dashboard. There is already an official ready-to-use dashboard for Kong (ID 7424).