Datadog
Use Datadog as an external monitoring tool to monitor Memphis
As Datadog is one of the popular tools for centralized monitoring, Memphis provides a Prometheus exporter to enable Datadog users to monitor Memphis in K8S deployment only.
If you haven't installed Memphis with the
exporter.enabled
yet helm install memphis memphis/memphis \
--create-namespace --namespace memphis --wait \
--set \
global.cluster.enabled="true",\
exporter.enabled="true"
If Memphis is already installed -
export PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata -o jsonpath="{.data.password}" | base64 -d)
export REPMGR_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata -o jsonpath="{.data.repmgr-password}" | base64 -d)
export ADMIN_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata-coordinator -o jsonpath="{.data.admin-password}" | base64 -d)
helm upgrade memphis memphis/memphis -n memphis --set exporter.enabled=true,metadata.postgresql.password=$PASSWORD,metadata.postgresql.repmgrPassword=$REPMGR_PASSWORD,metadata.pgpool.adminPassword=$ADMIN_PASSWORD
Add Datadog annotation to the
memphis-broker
statefulset to expose Prometheus metrics to datadog agent:kubectl edit sts memphis-broker -n memphis
# (...)
spec:
# (...)
template:
metadata:
annotations:
# (...)
# Add the following section
ad.datadoghq.com/metrics.checks: |
{
"openmetrics": {
"instances": [
{
"openmetrics_endpoint": "http://%%host%%:%%port%%/metrics",
"namespace": "memphis",
"metrics": [".*"]
}
]
}
}
# (...)
spec:
name: metrics
Or, in a one-liner command -
cat <<EOF | kubectl -n memphis patch sts memphis-broker --patch '
spec:
template:
metadata:
annotations:
ad.datadoghq.com/metrics.checks: |
{
"openmetrics": {
"instances": [
{
"openmetrics_endpoint": "http://%%host%%:%%port%%/metrics",
"namespace": "memphis",
"metrics": [".*"]
}
]
}
}'
EOF
Reach your Datadog account -> Metrics -> Summary, and check if "memphis" metrics arrives.

Memphis dashboard .json file to download -
Last modified 1mo ago