As of wicked 1.0.0, Kong is by default configured to create Prometheus style metrics on the :8001/metrics
end point. When using the Helm chart to deploy wicked, the corresponding prometheus.io
annotations will automatically be applied to the Kong deployment.
The wicked components will over time also receive metrics endpoints.
Over time, we will try to create matching dashboards for use with Grafana.
Over time, we will try to create alerting rules which make sense for most wicked installations.
BELOW OUTDATED DOCUMENTATION: The below documentation actually still works, but it's not considered best practice.
An deployment such as an API Portal should always be monitored in some way, both regarding the underlying APIs, and the API Portal itself. Let us look at the two categories of monitoring which are of immediate importance.
To make sure the API Gateway works like it should, it is recommended to have certain "ping" endpoints on your backend APIs which can be used from a monitoring application to check whether access is possible via the API gateway to the backend API.
These endpoints do usually not need to be very elaborate (return OK
or similar); they should just enable your monitoring application to rule out the API Gateway if something is not reachable from the outside.
Likewise, the API Portal itself also should be monitored. The API Portal provides a "Health API" to make this task easier.
Setting up monitoring is fairly straightforward, using the mechanisms of the API Portal itself. You only need to log in to the API Portal as an user which is part of the admin
group; this will give you access to the "Health API", which is a built-in API of the API Portal. Perform the following steps (logged in as an Admin user):
- Register an application which corresponds to your monitoring application, such as "Nagios" or similar
- Subscribe to the "Health API" (API ID
portal-health
) for this application - Optionally also subscribe to all other APIs which are to be monitored by this application
- Use the API Keys or Client Credentials to set up monitoring
The description of the Health API also contains more information on this topic.