All Questions
99 questions
1
vote
1
answer
42
views
How to query DynamoDB with multiple filters (platform, type, and rate_id) to return only monthly/weekly data
I'm trying to query a DynamoDB table to retrieve data for the current month or current week, depending on the filter applied (data_type = monthly or weekly). However, I'm encountering an issue where ...
0
votes
0
answers
39
views
Sending histogram data to grafana from statsd library of python
We are using statsd library in python to send some metrics to grafana. I am struggling to send histograms to grafana.
We use statsd-exporter and victoria metrics data store for the metrics in grafana.
...
0
votes
0
answers
49
views
Grafana: Accessing Time Range from API?
I'm attempting to import the currently selected time range in a dashboard (in the upper right) into Python through the API.
From my understanding, the API can only retrieve the JSON of a dashboard, ...
0
votes
0
answers
79
views
How to Implement POST Method for Unifi Controller API in Grafana Using Infinity Data Source?
Question:
I've successfully implemented the GET method of the Unifi Controller API in Grafana using the Infinity data source. However, I'm facing difficulties with using the POST method.
Here is my ...
0
votes
0
answers
81
views
Post API alert rule not appeared in grafana UI
naaaa
4d
Hello Team,
Good Day.
Need your help!
With postman tried GET and POST API calls for grafana. When we ran GET call from DEV cluster the response code is 200 and for PUT/POST call to UAT ...
2
votes
0
answers
171
views
Templating Grafana HTTP request to query a data source via Python
I want to query a data source in Grafana via Python.
Following is the code I have come up with.
headers = {"Accept": "application/json",
"Content-Type": "...
0
votes
1
answer
124
views
How to display YOLO predictions on Grafana?
I am trying to display my YOLO predictions directly on my grafana dashboard/graph. My model takes a picture of the grafana graph as input and detects the various graph patterns that correspond to ...
0
votes
0
answers
45
views
Setup custom Prometheus metric with Kubernetes labels for TorchServe
I'm trying to setup http_request_duration_seconds metric the same as provides prometheus-net
.NET implementation somehow adds dimensions like namespace, service, pod, and code that could be used in ...
0
votes
0
answers
291
views
How to use grafana variable values to calculate other results
I have created the below variable in Grafana and would like to use them to calculate other results. I am working on calculating weather prediction from pressure to show if it going to rain or have ...
0
votes
0
answers
54
views
Plotting static mock data in Grafana with grafanalib
I have been playing with grafanalib for a while and it is easy to display data from well known sources. In this case the following example tries to Draw a timeseries graph including a dictionary with ...
0
votes
0
answers
220
views
problem with otel metrics for my python application
I am trying to output some metrics for my python application. I am only seeing a few metrics. Using fast api. Logs work fine.
metrics i see in the output when outputting to console
http.server....
1
vote
2
answers
3k
views
Set prometheus metric to return datetime instead of a float
self.add_metric(
prom.Gauge,
"date_to_catch",
"The timestamp when the event happened",
)
@property
def date_to_catch(self):
...
1
vote
0
answers
483
views
How to send data to WebSocket API in Grafana?
I read the doc from Grafana (https://grafana.com/grafana/plugins/golioth-websocket-datasource/?tab=overview) but when I try to replicate it by myself using my locally established WebSockets, it fails ...
0
votes
0
answers
418
views
Show a single value in grafana from prometheus gauge
I have a multiprocess python service which I am exposing metrics from it.
Here is the class:
import logging
from prometheus_client import multiprocess, CollectorRegistry, Counter, Histogram, Gauge, ...
0
votes
1
answer
123
views
Docker with Selenium hub, Nodes, Loki and Grafana
So I want to create docker-compose file which contains connected:
Selenium hub + his nodes + grafana + loki. The idea is to have the execution logs in grafana.
the docker-compose.yml:
version: "3&...
0
votes
1
answer
879
views
Prometheus- total time of function
I am using Prometheus and Grafana on my Django project.
I decorated with Prometheus a few functions that eventually did API calls.
PROMETHEUS_TIME = Histogram(
name="method_latency_seconds",
...
0
votes
1
answer
711
views
Exporting alerts json data using Grafana API in Grafana v10
I am using Grafana cloud v10.0.3 and could not find any way to exports alerts json data. I tried to write a python script to access alerts json data but it is not showing any output. Below is the ...
1
vote
1
answer
180
views
Can we add grafana custom panels via API?
The new set of requirments to add custom dashboard panels using python. Like I want to add once the new organization is onboarding, and automatically the visuals of specific org will be added.
I have ...
0
votes
1
answer
159
views
KeyError when trying to export information from Grafana API
I have a grafana running in a container on a vm and I expose port 3000 on my localhost. I have a code in python that exports a dashboard information in CSV format, but when I specify the grafana API ...
0
votes
1
answer
3k
views
Adding a Postgresql datasource to Grafana. Plugin health check failed
I'm using a grafana docker container, and a Postgresql docker container.
I think I manage to add a data source to Grafana, however, the Plugin health check fails as in the picture below. Also, when I ...
1
vote
0
answers
84
views
I cannot able to see users created in grafana using python script
I have used the below python script to automate user creation in grafana , i got response successfully created , but while logged in and checked under administration -> users , i cannot able to see ...
0
votes
1
answer
3k
views
Expose Grafana from Docker behind Nginx
Background
My app stack uses several Docker containers managed by docker compose:
PostgreSQL at port 5433
FastAPI (Python) backend at port 8000
NodeJS frontend at port 8090 and exposed to 80 (via ...
1
vote
1
answer
1k
views
Prometheus: Integrate history data
I want to use grafana and prometheus to monitor some ML models in production. I already have a connector that exports metrics stored in MLFlow and makes them visible to prometheus. I can now query ...
-1
votes
1
answer
2k
views
Using Prometheus, How to use the selected period of time in a query for getting Grafana's data?
I'm using Grafana with Prometheus and I'd like to build a query that depends on the selected period of time selected in the upper right corner of the screen.
Is there any variable (or something like ...
0
votes
1
answer
2k
views
How to generate alerts on grafana dashboards using python [closed]
File "/usr/lib/python3/dist-packages/requests/adapters.py"
line 565, in send raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='none', ...
0
votes
2
answers
135
views
how to get dates sorted in ascending order from influx db query, right now its in string format
I have a query
SELECT last("date_of_maturity") FROM "maturity_date_data" GROUP BY "maturity";
Im getting this values
010423
020423
070423
140423
260523
280423
290923
...
0
votes
1
answer
268
views
Monitor Multiple Airflow instances
I currently have task a task to monitor completely independent airflow instances running across multiple customer servers. All of them have similar DAGs. I have to combine metrics from all these ...
1
vote
1
answer
2k
views
Querying loki logs using python
I am using the following script to query logs from loki which is running on some vm.I want to get the logs on multiple boxes and do some operation on them. so i am using loki as a source to get all ...
1
vote
1
answer
2k
views
error installing jsonnet in python using pip install jsonnet
I want to run libsonnet files for my Grafana dashboard. For that I want to install jsonnet as a python package to run my libsonnet files then.
FYI, I am using VScode on my windows 10 machine
pip ...
0
votes
1
answer
3k
views
How to visualize Kafka topic messages in Grafana?
Edited:
I've successfully configured the Kafka data source into Grafana, but how do I display the messages of my 'temp-sensor' topic in a dashboard? Those are temperature value output from the ds18x20 ...
0
votes
1
answer
99
views
cdktf grafana alerts python sample required
I am looking for "working"/"syntactically correct" (python) samples for provisioning unified alerts to grafana.
A have a pure terraform config file, provided by grafana, however, ...
0
votes
1
answer
287
views
How to provide encoded json data to resources in cdktf for grafana
I appear to be an early adopter of cdktf for grafana using python.
The following config is successfully transmitted and accepted by grafana
DataSource(self, "xxx",
uid = "...
0
votes
1
answer
357
views
How to delete a panel from grafana dashboard using python requests?
I am able to access dashboards using the following api call-
url2 = server + "/api/dashboards/uid/" + uid #uid of dashboard
r = requests.get(url=url2, headers=headers, verify=False)
From ...
0
votes
1
answer
474
views
How to visualize csv data export from grafana using python
When i export csv data from grafana with API latency i saw two kind of value is seconds and millisecond, how to convert it to seconds using python.
time latency
2022-09-30 06:20:00 ...
0
votes
0
answers
105
views
GPS NEO 6M V2 Raspberry pi 4 data missing
I am using gps neo 6m v2 and a raspberry pi to monitor vehicle health. I have also use obd to get the data of engine sensors, in this case I was facing problem on the gps which is data from the gps is ...
0
votes
1
answer
1k
views
How to add an extra label to 1000s of prometheus queries in grafana dashboard programmatically?
I have almost 1000 prometheus queries configured in my grafana dashboard, and I need to add one more label to all the queries to get the correct metric, since this label was added recently to ...
0
votes
0
answers
385
views
Grafana do not shows custom logs
my problem with grafana is that it does not show logs uploaded with python (requests library) or with Postman, when I use curl command everything works as expected. But with /series endpoint logs ...
8
votes
2
answers
8k
views
Error reading prometheusetheus: bad_response: readObjectStart: expect { or n, but found #
I have prometheus server running at http://localhost:8001/: which if i browse through browser shows this:
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE ...
0
votes
1
answer
3k
views
Grafana: How to use the selected range of time in a query?
I'm using Grafana with JSON API data source and I'd like to build a query that depends on the selected period of time selected in the upper right corner of the screen.
Is there any variable (or ...
0
votes
1
answer
3k
views
Calling Grafana API returns 401 unauthorized
I have written API calls according to Grafana's documentation (https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/#gets-the-home-dashboard) but I always end up with a response of ...
0
votes
2
answers
335
views
How to invoke a sagemaker endpoint from Grafana
I am trying with AWS sagemaker and created endpoint successfully. I want to visualize the data on Grafana now. Can anyone suggest an approach to this?
0
votes
2
answers
128
views
Save Python dictionary to the JSON format (adding names)
I filtered and processed some data and I got it in the following format:
{'2020-04-20': [('EUR', 34.02), ('USD', 30.18), ('AWG', 24.44), ('GPB', 20.68)],
'2020-04-25': [('EUR', 16.88), ('USD', 15.06)...
1
vote
2
answers
4k
views
how to see all log data in loki?
i'm using Loki as log management system , and i send log like this :
logger = logging.getLogger("loki")
logger.info(
"download_file",
extra={"...
0
votes
0
answers
1k
views
export data from grafana querty to the excel file by python
Need to export data from grafana dashboard - query data.My Grafana use SQLite. Say me please, can i use python script for connecting to the grafana db and take data from here? Or better to use python ...
1
vote
2
answers
12k
views
Programmatically using python, import grafana dashboard data from grafana website
I have a visual and aggregate result showin in grafana.<<my_company>>.com. I can manually go to the menu click export and export the data to my local in format option I have. This works ...
0
votes
0
answers
77
views
How to use a "Observation Service" like Grafana but with manipulated data from python
I have data that changes by the minute in regards to power plants. For instance, one of the things I have to determine is how much natural gas is going to be used over the course of the day to supply ...
0
votes
2
answers
2k
views
Grafana merge multiple counters values into one graph
I try to find a way to create an user counter with Prometheus and Grafana for my Flak app..
The Flask app run as wsgi with multiple workers and is also scaled via ngninx (docker scale). Because of ...
1
vote
0
answers
215
views
Include Path to flask_http_request_exceptions_total
I'm looking for a way to include the path as a label for flask_http_request_exceptions_total metric? I'm using the prometheus-flask-exporter for this.
I registered path label as default but it is not ...
2
votes
1
answer
696
views
How to send logs from a heroku app to grafana cloud?
Grafana-Loki is a nice logging service and I want to deploy it for an app on Heroku. I've looked around and there doesn't seem to be too much information about this. I found this twitter thread which ...
0
votes
1
answer
476
views
FastAPI Post Request with a Username and role, how to do it?
I want to make a FastAPI Post Request to an instance, with this Post Request I want to add a user to a Grafana Organisation. For that, I have to send a post request with the Attributes loginOrEmail ...