/debug/vars
endpoint in JSON format and the
/debug/prometheus_metrics
endpoint in Prometheus’ text-based format. Dgraph
doesn’t store the metrics and only exposes the value of the metrics at that
instant. You can either poll this endpoint to get the data in your monitoring
systems or install
Prometheus. Replace targets
in the configuration file below with the IP address of your Dgraph instances and
run prometheus using the command prometheus --config.file my_config.yaml
.
/debug/prometheus_metrics
endpoint on Dgraph alphas.grafana_dashboard.json
by following these
instructions.
/health
endpoints of Alpha and Zero.
Considering that the endpoints to monitor are publicly accessible and you have
the AWS credentials and awscli setup, we’ll go
through an example of setting up a simple CloudWatch alarm configured to alert
via email for the Alpha endpoint alpha.acme.org:8080/health
. Dgraph Zero’s
/health
endpoint can also be monitored in a similar way.
/tmp/create-healthcheck.json
would need to have the values for the
parameters required to create the health check as such:
us-east-1
.--alarm-actions
set to
the ARN of the SNS topic and the --dimensions
of the alarm set to the health
check ID.
/health
path and creates CloudWatch metrics which could then be used to create
the required CloudWatch alarms. The architecture and the CloudFormation template
to achieve the same can be found
here.