Troubleshoot Monitoring Integrations

Review the common troubleshooting scenarios you might encounter while getting a Monitor integration working and see what you can do if an integration does not report metics after installation.

Check Prerequisites

Some integrations require secrets and other resources available in the correct namespace in order for it to work. Integrations such as database exporters might require you to create a user and provide with special permissions in the database to be able to connect with the endpoint and generate metrics.

Ensure that the prerequisites of the integration are met before proceeding with installation.

Verify Exporter Is Running

If the integration is an exporter, ensure that the pods corresponding to the exporter are running correctly. You can check this after installing the integration. If the exporter is installed as a sidecar of the application (such as Nginx), verify that the exporter container is added to the pod.

You can check the status of the pods with the Kubernetes dashboard Pods Status and Performance or with the following command:

kubectl get pods --namespace=<namespace>

Additionally, if the container has problems and cannot start, check the description of the pod for error messages:

kubectl describe pod <pod-name> --namespace=<namespace>

Verify Metrics Are Generated

Check whether a running exporter is generating metrics by accessing the metrics endpoint:

kubectl port-forward <pod-name> <pod-port> <local-port> --namespace=<namespace>
curl http://localhost:<local-port>/metrics

This is also valid for applications that don’t need an exporter to generate their own metrics.

If the exporter is not generating metics, there could be problems accessing or authenticating with the application. Check the logs associated with the pods:

kubectl logs <pod-name> --namespace=<namespace>

If the application is instrumented and is not generating metrics, check if the Prometheus metrics option or the module is activated.

Verify Sysdig Agent Is Scraping Metrics

If an application doesn’t need an exporter to generate metrics, check if it has the default Prometheus annotations.

Additionally, you can check if the Sysdig agent can access the metrics endpoint. To do so, use the following command:

kubectl exec <sysdig-agent-pod-name> --namespace=sysdig-agent -- /bin/sh -c "curl http://<exporer-pod-ip>:<pod-port>/metrics"

Select the Sysdig Agent pod in the same node than the pod used to scrape.