This document only covers the VictoriaMetrics Operator. It is designed to be compatible with PrometheusOperator, including with the PrometheusOperator CRDs
-
instrument your app and expose a metrics endpoint (docs)
-
define metric endpoints as ServiceMonitor objects
-
VictoriaMetrics will add all ServiceMonitors in cluster
-
add a
ConfigMap
containing the dashboard’s json -
add the
grafana_dashboard: "1
label -
see
system/monitoring/dashboards/grafana-dashboard-nginx-main.yaml
for an example -
in the future maybe switch to something like grafana-operator
-
add a
PrometheusRule
object -
give it an
app
label and add this to theprometheusSpec.ruleSelector.matchExpression
-
operator docs on alerting
-
alerts are sent to the #cluster-alerts channel in elifesciences slack