5,908 questions
Best practices
0
votes
0
replies
15
views
Build histogram from pre-existing data
I have a question regarding histograms, not built from data collected in real time.
Our codebase deals with processes, all of which have a duration. I want to expose these durations as a metric. We ...
0
votes
1
answer
52
views
Get accurate numbers for counter increases
Assume that I have this counter, with the server scraping these metrics every 15 seconds:
vector_component_sent_events_total{component_id=~"sink.*"}
If the counter increases by 30. As shown ...
0
votes
0
answers
45
views
Is it possible to use the trace status as a field in visualisations based on a Grafana Tempo data source?
I have traces going into Grafana Tempo. The traces are not collected by one of the standard collectors; I'm using the OpenTelemetry SDK to generate custom spans, but I don't think that matters.
I'm ...
0
votes
0
answers
24
views
Promtail Configuration replace expressions in the pipeline stages are not working
My Promtail configuration where the replace expressions in the pipeline stages are not working as expected.
I’m trying to replace certain keywords in logs from the testing namespace:
elevenlabs to ...
1
vote
0
answers
49
views
How to solve "invalid format of evaluation results for the alert definition" error?
I have this promQL query:
label_replace(
histogram_quantile(
0.99,
sum(
rate(
http_request_duration_seconds_bucket{
env="dev&...
-1
votes
1
answer
60
views
Grafana graph plot data only once instead of again and again metric java
I have implementation on java and Grafana/prometheus
From our java service we are ingesting payload to grafana and it plots
I have defined a Metric using java
public class MyPayloadService {
...
0
votes
0
answers
65
views
Alloy sourcemap integration not resolving minified Angular stacktrace
I’m trying to configure Grafana Alloy to resolve my Angular application’s stack traces using source maps, but the mapping isn’t working as expected. Even though I have the sourcemaps downloaded ...
0
votes
0
answers
40
views
PromQL query to Count and group in Grafana
I'm using the openstack_exporter and I'm trying to show the number of routers per network node but having trouble working out how in promQL I can work this. In the openstack_neutron_l3_agent_of_router ...
0
votes
0
answers
55
views
Cloudhub 2.0 Ingress Timeout when forwarding Logs
We have a mule application and we are trying to load test the application with 8K records. It's a simple application that gets the request, sends its to GCP to fetch a value and then provide that ...
0
votes
0
answers
120
views
Grafana DatasourceNoData issue
Grafana Alert - Daily Auto-Resolving Issue
I'm experiencing a recurring issue with a Grafana alert that triggers daily and then auto-resolves a few minutes later.
Details:
Trigger Time: 12:21 AM
...
0
votes
0
answers
42
views
How to query grafana panels data?
I have a large grafana dashboard with a lot of panels.
I want to export the panel's data into a database. Before inserting the data into the database, I need to transform it from json.
What API should ...
1
vote
1
answer
52
views
Remove entries from results based on multiple criteria
When i have a search like
{env="PROD"}
| logging_level =~ `ERROR|WARN`
And have the label "logger"
How can i say the following:
Lines with the logger FirstLogger should be ...
1
vote
0
answers
97
views
How filter logs from windows by filename in Grafana Loki?
I'm trying to list logs from Loki in Grafana, and filter them by filename.
Logs are coming into Loki from Promtail agent on Windows.
Here is my scrape_config part:
scrape_configs:
- job_name: '...
1
vote
0
answers
53
views
DynamoDB to Athena - dynamic schema detection for evolving "map" field
In AWS, I have a DynamoDB table with one of the fields as a map (my_map). This table is exposed to Athena, so data can be queried there (and eventually in Grafana).
The Athena table shows a schema ...
0
votes
1
answer
62
views
Decode label value in Grafana panel [closed]
I have a Grafana panel that display server states:
I need to give the servers human recognizable names like: "London", "Paris", "Milan", "Berlin", "...
0
votes
1
answer
188
views
Promql warning: metric might not be a counter doesn't make sense
I have this promql query:
avg by (instance)(rate(fusion:node_cpu_seconds_total:foo{mode="steal"}[5m])) * 100
and I get lots of data, but then I get this at the end:
{
"infos": [
...
0
votes
1
answer
51
views
Field missing on "Select Field" on Grafana
I have the same problem as the in this question (Grafana - Show metric by field value). I want to display a field instead of the count (default).
I use the Elastic Search data source.
I followed the ...
4
votes
0
answers
236
views
How to configure Grafana Alloy to set Loki tenant dynamically from log labels?
I’m running a multi-tenant Loki setup and sending logs through Grafana Alloy.
I need Alloy to set the X-Scope-OrgID header dynamically so that each log stream is stored under the correct tenant. ...
0
votes
0
answers
53
views
How to get log entries with the date mentioned as 3months+
I wrote a loki query to get certificate expiry. currently it mentioned which date its going to expire.so use some date functions to convert into millis.
min by(serviceReplace)(min_over_time(
{job=&...
1
vote
1
answer
68
views
How to handle Grafana "All" option with QuestDB without expanding all variable values?
I'm using Grafana with QuestDB and have a multi-value variable element with "All" option enabled. When "All" is selected, Grafana expands all values in the WHERE clause:
-- Current ...
0
votes
0
answers
141
views
using pydantic.logfire sending data to grafana-otel-container
I am using lofgire to send traces, logs and metrics to grafana-otel container. However, in the grafana UI (reachable unter http://localhost:3000 and login is pw: admin & user: admin), only traces ...
3
votes
1
answer
120
views
Prometheus/Grafana: increase() spikes during Kubernetes deploys with multi-pod counters (dynamic labels)
Context
Java service in Kubernetes, multiple pods.
Metrics exposed via Micrometer + Prometheus.
Grafana dashboards use increase(...) and sum by (...) to count events in a time range.
Counters are ...
1
vote
0
answers
240
views
How do I show a cumulative sum of each series in a Grafana multi series?
In Grafana, I have a JSON data source that takes the following format:
{"data" : [
{
"timestamp": 189237320,
"category": "cat-A",
"value1&...
0
votes
0
answers
68
views
How to filter out the timestamp from cri-o logs?
I'm trying to setup multiline log parser in fluentbit. But I'm currently encountered a problem with parsing. Can anyone help me?
I'm deploying Fluent Bit in Kubernetes and pipe the logs to Loki and ...
1
vote
1
answer
247
views
In Grafana, how to remove time in my date time values [closed]
I have standard options > unit, but under it there's not date only date & time, and selecting one doesn't seem to do anything. For example in grafana the date time is shown as 2025-07-27, 01:00:...
0
votes
1
answer
130
views
What regex flavor does Grafana use?
This source from the Grafana forum said that Grafana uses the golang regex flavor.
I'm trying to extract a key value pair from the format:
(Foobar -- 48)
After following the Grafana doc on Extracting ...
0
votes
1
answer
178
views
Grafana Alloy no Prefect Pod Logs on Bottlerocket
In the Explore or Drilldown of Grafana, I can see Loki logs for different services, but when I tried to see prefect logs (the labels are preset in the filter), nothing is returned. I also tried to ...
0
votes
0
answers
42
views
Telegraf Error in plugin: connect failed: error validating input: server does not support an endpoint with security:None
I try to create an docker compose stack involving InfluxDB, Telegraf and Grafana. To gather some test data i have used this basic test server: https://github.com/gabrielmbmb/opcua-test-server
However, ...
1
vote
1
answer
92
views
String as x-axis in Grafana xy plot
My goal is to plot a xy scatter plot in Grafana. X-axis is 'setting', and the potential values are 'off', 'idle', 'standby', and 'on'. On the y-axis I have 'performance' and the data type is real. My ...
0
votes
1
answer
62
views
How to convert string "false" and "true" to numeric 0 and 1
How do I convert string "false" and "true" to numeric 0 and 1 within Grafana?
I need to do this to then summarize a row or a column and get a count of trues.
I tried using "...
1
vote
0
answers
259
views
Grafana Tempo not receiving OpenTelemetry traces from .NET services - only /health and /metrics traces visible
I have a multi-service .NET application running in Docker Compose with Grafana Tempo for distributed tracing. While Tempo is running and accessible, I'm only seeing traces for /health and /metrics ...
0
votes
0
answers
55
views
Loki Alerting – Inconsistent Data in Alert Notifications
Setup:
I have configured an alert to send data if error requests are above 2%, using Loki as the datasource. My log ingestion flow is:
ALB > S3 > Python script downloads logs and sends them to ...
0
votes
1
answer
71
views
How to implement OR logic for Grafana variables?
I have 2 variables in my Grafana: namespace and service.
namespace is defined as: foo: app1|app2|app3
service is defined as: list of app4, app5, app6
I've got a metric named http_request_count with ...
0
votes
0
answers
99
views
Count unique users in the last 30 days - Promtail, Loki, and Grafana
I have a Kubernetes cluster with Promtail, Loki, Grafana, and Prometheus installed. I have an nginx-ingress that generates logs in JSON. Promtail extract the fields, creates a label for http_host, and ...
-1
votes
1
answer
246
views
How to escape a special char when using grafana line_format
I am currently trying to format a grafana query that extract a specific field from the json. I currently have this
... | json | line_format "{{.request_User-Agent}}"
The parsing fails ...
1
vote
0
answers
54
views
Most appropriate PromQL function and corresponding panel type on grafana for methods with @Timed
I am using @Timed from micrometer-core on a few methods to capture the response time of methods in a very simple way like this - @Timed(percentiles = {0.50, 0.95, 0.99, 0.999})
It is a spring-boot ...
0
votes
0
answers
45
views
Grafana 404 Error After Re-Importing EKS Cluster — URL Points to Old Cluster ID
Rancher version: v2.11.1
Installation option: v1.27.11+k3s1 on docker
Kubernetes version: EKS 1.32
Cluster Type (Local/Downstream): Import AWS EKS 1.32
I upgraded Rancher from v2.9.2 to v2.11.1. After ...
0
votes
0
answers
68
views
Alert rule that fires when the count value/output of a query changes
I have a widget that shows with the number of gateways that haven't been seen (not been online) for >= 2 days (The output is basically the most recent refreshed date and the value, aka the count of ...
0
votes
0
answers
23
views
How to create grafana stat panel?
I have two Prometheus metrics: first one is requests - number of successful requests, second is errors - metrics for errors with error_code label for error codes.I also have service label for services ...
1
vote
0
answers
43
views
Grafana settings
I am creating a Grafana dashboard to display some prometheus metrics. I was able to create a Variables in Settings, which is a list of endpoint. So in the dashboard, each graph could display specific ...
0
votes
0
answers
24
views
Oracle Enterprise Manager Plugin for Grafana limiting rows
I want to visualize versions of a specic subset of database hosts. The query returns ~350 target_names and a target_property and is working just fine.
When using "Oracle Enterprise Manager App&...
0
votes
0
answers
49
views
topk 10 function in PromQL query
I was able to use the below query to list the top 10 CPU utilization in grafana, which works fine. However, in an alerting system, there is no alert generated.
topk(10, 100 - (rate(...
1
vote
1
answer
469
views
Grafana/Loki - Show log volume based on level in dashboard [closed]
Working with Grafana 12 Loki, I would like to show the "log volume" graph in a dashboard. That graph is shown in the Explorer view for Loki.
How can I make a barchart to show stacks with ...
0
votes
0
answers
40
views
Grafana Stat Visual String as Value an a Boolean Variable as Color
I try to click a Grafana Dashboard together with a Stat Visual showing a Field "platyp" String and a boolean Field "still" to color the background red by false and Green by true.
I ...
0
votes
0
answers
23
views
How to handle FLUX JOIN border case where one table is empty?
warnLogs = from(bucket: "mybucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "Logs")
|> filter(fn: (...
-4
votes
2
answers
205
views
How do I get a weekly time series on Grafana? [closed]
I am using MariaDB and Grafana to keep track of weekly consumption totals, but Grafana does not recognize this date format "DATE_FORMAT(`Timestamp`, '%Y-%u') AS Week" as a time field.
The ...
0
votes
1
answer
276
views
How to create Grafana dashboard with variable of type map
I have got grafana dashboard with panel , outputting the following metric:
rate(http_requests_total{service=~"${$service}"}[5m])
where $service is a variable. One can select service from ...
0
votes
1
answer
336
views
Grafana Prometheus legend add custom column field from a label
Is it possible to put a value of a label on a Legend?
I used Legend option in my query to format Name to {{__name__}} - {{env}} but I would rather have a separate column for {{env}} instead. Is it ...
0
votes
0
answers
58
views
In Grafana business forms How do you reset 'select with custom options' to the default "Choose"
I have a grafana server and I am using business forms to make interfaces for others to use to add data to databases.
I have a form with a combination of text, radio buttons, and select (dropdown).
...
2
votes
1
answer
141
views
Displaying multiple OpenShift clusters version within grafana
I want to make a pie chart where I display the current versions of available OpenShift clusters. The clusters uses remote_write to a central Thanos instance, from where we can use promql to query ...