Monitoring and Alerts
Describes the process of configuring your Grafana, Prometheus and Alertmanager instances to monitor your Replex deployments.
Quick Note
Dependencies
Setting up your monitoring stack requires you to have Grafana, Prometheus and Alertmanager installed on your desired cluster. Ensure Grafana version 5.3.4+ is installed as the charts JSON specification is only compatible from there.
Setting up Prometheus
Prometheus is used for our metrics as we expose them from our core applications using this metrics provider. We already configure our deployment spec with the required annotation (as shown below) so your Prometheus instance would scrape the metrics automatically.
# k8s-file.yaml
...
annotations:
prometheus.io/scrape: "true"
To access the metrics please add the following scrape config named kubernetes-pods from here to your prometheus.yml file to complete the configuration.
You may ignore this step if the configuration above is in line with what is provided on your Prometheus installation.
Configuring AlertManager (Optional)
Alerts can also be configured based on certain metrics exposed to your Prometheus instance.
This step is only necessary if you are installing AlertManager for the first time, there's a very nice guide on getting it set up and configuring your receivers here. Despite the earlier focus on installing AlertManager, the scope of the doc is outside the installation process. The first step to setting up alerts is to confirm that your Prometheus instance has already been configured to point to AlertManager correctly.
We use the following configuration for our instance
You can check out this article about alerting rules and pointing Prometheus to Alert Manager.
Setting up Alerts
Once Alert Manager is properly configured with Prometheus, you may then add the following rules specified here to your Prometheus rules configuration. You can copy and modify the current template below to fit your use cases or preferred alerting messages:
After copying the template above and modifying (if necessary) into the Prometheus rules file, you can check your Prometheus dashboard to verify the alerts are registered on the alert page

Finishing with Grafana
Once Prometheus is configured, you can then proceed to install the Grafana charts.
The charts are hosted and maintained publicly on Grafana
Name
URL
Request Metrics
Database Metrics
Provided the metrics from the Replex components are exposed properly, you should access dashboards similar to this:


Last updated