on
30 Jul 2025
12:54 PM
- edited on
07 Aug 2025
10:16 AM
by
jonghpark
This troubleshooting article will help you resolve some common issues faced while installing and setting up Prometheus-based extensions.
Specific symptoms mentioned in this article can be seen in the Extensions app / Extension page in the Dynatrace Hub and extension log files. Here is how you can find them.
SFM logs
Self-monitoring logs are available in the health tab on the Extension page in the Extensions app or on Extension page in the Dynatrace Hub.
Log files can be found in the paths:
The Prometheus extensions support two kinds of endpoint types:
The first type requires HTTP response code from 200 to 399 and meets one of the conditions:
Content-Type="text/plain"
or
Content-Type="application/openmetrics-text".
Often, these requirements are not met, and they are a cause of the issue.
Related logs:
[GENERIC_ERROR] Invalid content type (http://localhost:9090/metrics//query)
Notice: The / can be added to the URL, in the second type of endpoint.[DEVICE_CONNECTION_ERROR] Endpoint="http://localhost:9090/metrics/" Message="DEVICE_CONNECTION_ERROR Unknown error while checking HTTP Response (Query) code; Server returned response code 404 from Prometheus endpoint"
[DEVICE_CONNECTION_ERROR]:Failed to query 'http://localhost:9090/metrics/' for metrics
This can be verified by making a manual request to the scrape endpoint.
curl -v -i <scrape-endpoint-url> -o prometheus-output.txt
A manual request returns data related to metrics from the monitored extension, but it can not be viewed in the dashboard. Metric dsfm:datasource.prometheus.metric.line.count does not indicate that the data was collected.
Try to take some steps, as described below. It can help diagnose potential blockers.
Due to the simplicity of Prometheus-based extensions, missing metric data tends to be related to a metric key missing from the Prometheus response
Related logs:
Could not find the following metrics in Prometheus response: confluent_kafka_connect_dead_letter_queue_records, confluent_kafka_server_cluster_link_count, kafka_partition_earliest_offset, confluent_kafka_connect_received_bytes, confluent_kafka_ksql_query_saturation
Endpoint http://localhost:9090/metrics has collected 227 metrics.
Notice: This log means that after parsing the endpoint's answer returned 227 metrics, but not all metrics have to be matched with extension metrics.
This can be verified by making a manual request to the scrape endpoint, saving the output to a file, and checking the relevant metric key using the steps below.
curl -k <scrape-endpoint-url> -o prometheus-output.txt
Notice: The information about metrics collected by extension is often described in the "Product information" section.
Extract the extension package.
- key: bdb_avg_read_latency_max
value: metric:bdb_avg_read_latency_max
type: gauge
The extension and response of the source contain the metric, but the data is not visible.
Check if the feature set that contains the metric is enabled.
Gaps in data or complete lack of metrics.
Achieve rate limits:
Related logs:
[DEVICE_CONNECTION_ERROR] Failed to send request to Prometheus target (http://localhost:9090/metrics): Get "http://localhost:9090/metrics": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[DEVICE_CONNECTION_ERROR] Server returned response code 429 from Prometheus endpoint (http://localhost:9090/metrics)
This can be verified by some steps described below.
curl -i <scrape-endpoint-url>
During the curl request, it is worth collecting network packets. This can be helpful in investigating the issue.
tcpdump -i eth0 -w output.pcap
Notice: Retries * timeout should not be greater than min interval in the extension.
Failing to parse the Prometheus response according to the Prometheus format: https://prometheus.io/docs/instrumenting/exposition_formats/
Popular cases:
# TYPE bdb_up gauge
bdb_up{bdb="19",status="active"} 1.0 ...
# TYPE bdb_up gauge
bdb_up{bdb="19",status="active"} 1.0
Related logs:
[GENERIC_ERROR] Failed to scrape 'http://localhost:9090/metrics'. Reason: Failed to parse Prometheus metrics response (http://localhost:9090/metrics): text format parsing error in line 1224: second TYPE line for metric name "bdb_up", or TYPE reported after samples
[GENERIC_ERROR] Failed to scrape 'http://localhost:9090/metrics'. Reason: Failed to parse Prometheus metrics response (http://localhost:9090/metrics): text format parsing error in line 291: invalid escape sequence '\"'
Notice: Prometheus data source was updated with latest prometheus/common library that covers parsing of \". The fix is available in agent version 305.
[GENERIC_ERROR] Failed to scrape 'http://localhost:9090/metrics'. Reason: Failed to parse Prometheus metrics response (http://localhost:9090/metrics): text format parsing error in line 1: unknown metric type "info"
In many situations, it demands changes in the format of Prometheus's answer by the provider. This can be verified by making a manual request to the scrape endpoint.
curl -i <scrape-endpoint-url> -o prometheus-output.txt
Failing to parse the extension YAML file, assign configuration, and fastcheck.
Related logs:
[INVALID_CONFIG_ERROR] Error in extension configuration: Unmarshalling of extension config failed.
[INVALID_CONFIG_ERROR] Invalid metric type (key 'prometheus.queue'): Invalid or unsupported MINT type (counter)
Verify the correctness of the extension YAML file using the documentation https://docs.dynatrace.com/docs/ingest-from/extensions20/data-sources/prometheus-extensions/promethe....
Failed fastchecks and unassigned configuration.
Related logs:
[GENERIC_ERROR] Prometheus (url type check) response for endpoint (http://localhost:9090/metrics) is empty
Fast check status: 27. Details: There is no endpoint that could have connected.
[AUTHENTICATION_ERROR] Server returned response code 401 from Prometheus endpoint (http://localhost:9090/metrics)
Check the authentication type and the correctness of the auth parameters.
curl -i <scrape-endpoint-url>
Notice: The curl command can require authorization option for example curl -i -u <username> http://localhost:9090/metrics.
An extension can create the generic type entry in Dynatrace environment. There is default limit for such generic entities which is 100k. When one of the generic types of your Prometheus extension reach the limit, the sudden lack of fresh data might occur.
In Dynatrace HUB you can check what Generic Type entities are created by your extension :
To troubleshoot this issue you can follow the steps :
If none of the solutions above has worked for you and you are still experiencing issues with the Prometheus extension you are trying to configure, there's always a chance that there is a problem with the extension itself or the underlying data source.
In that case feel free to open a support ticket specifying:
If this article has helped you and provided you with valuable insight, please give it a thumbs-up (kudos).