#support

Validating Prometheus Configuration and Grafana JSON Support

TLDR zane.chen asked how to validate Prometheus config and sought help with a Grafana JSON template. Srikanth advised on validation, discussing Grafana version compatibility.

Powered by Struct AI
49
7mo
Solved
Join the chat
Feb 23, 2023 (7 months ago)
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
10:31 AM
I have setup prometheus receiver in metrics of config file, how to validate this config is effective?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
12:14 PM
You can go to dashboards panel and search for the metric name you would expect after successful scape.
Feb 24, 2023 (7 months ago)
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
01:14 AM
Image 1 for
01:15
zane.chen
01:15 AM
please help confirm the config that weather it‘s ok
01:16
zane.chen
01:16 AM
Image 1 for
01:16
zane.chen
01:16 AM
is it effective?
01:29
zane.chen
01:29 AM
do you have common json file? can display metrics data like grafana
01:29
zane.chen
01:29 AM
Image 1 for
01:30
zane.chen
01:30 AM
Image 1 for
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
01:58 AM
What metrics do you expect to be seen?
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:09 AM
prometheus metrics,now I have added prometheus, but i need json template to display metrics data
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:10 AM
I am not sure I know what json template to display metrics data mean
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:12 AM
Image 1 for
02:12
zane.chen
02:12 AM
just like the grafana json file import panel
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:12 AM
There is a import grafana json option in SigNoz dashboards
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:15 AM
yes, do you have this grafana json file in signoz?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:15 AM
Yes, there is a feature to import grafana json
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:23 AM
Image 1 for
02:24
zane.chen
02:24 AM
but i load my prepared grafana json file, appears above error
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:25 AM
You need to make sure the imported dashboard doesn’t have an invalid expression.
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:26 AM
my imported json file is standard grafana dashboard json file, no special expression
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:27 AM
Can you open the panel in edit mode and share the query
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:27 AM
02:29
zane.chen
02:29 AM
Image 1 for
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:29 AM
The $interval is not supported
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:33 AM
ok, do you give me a usable grafana json file, let me try?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:41 AM
I will share
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:42 AM
thank you very much!
02:48
zane.chen
02:48 AM
I create one simple grafana dashboard from prometheus data, then import the json file in signoz, but unfortunately, it cannot expect to display, so i suppose maybe not strong support to grafana dashboard function in signoz
02:48
zane.chen
02:48 AM
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 16,
"links": [],
"liveNow": false,
"panels": [
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "X6_V2pO4z"
},
"exemplar": true,
"expr": "prometheus_engine_queries",
"interval": "",
"legendFormat": "",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "X6_V2pO4z"
},
"exemplar": true,
"expr": "prometheus_http_requests_total",
"hide": false,
"interval": "",
"legendFormat": "",
"refId": "B"
}
],
"title": "prometheus监控测试",
"type": "timeseries"
}
],
"schemaVersion": 35,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "prometheus监控测试",
"uid": "QWjgtZbVz",
"version": 1,
"weekStart": ""
}
02:48
zane.chen
02:48 AM
the above is simple grafana dashbard json file
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:49 AM
Right, no strong support but something that most helps. What does the above show in dashboards UI?
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:50 AM
Image 1 for
02:50
zane.chen
02:50 AM
empty panel
02:51
zane.chen
02:51 AM
Image 1 for
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:51 AM
The grafana JSON is very different b/w version to version so there is a chance the current logic doesn’t detect this version.
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:51 AM
this is show in grafana ui
02:53
zane.chen
02:53 AM
do you mean signoz cannot support my grafana version?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:54 AM
The Grafana JSON has a version associated with it which we may not support yet
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:56 AM
could you tell me the gafana version you have supported?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:57 AM
There is no definitive list. There is some heuristic code which we tested on some major versions.
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
02:58 AM
got it, do you give me a usable grafana json file, let me try?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:59 AM
Sure, I will get back to you on this.
zane.chen
Photo of md5-70a65c96b293c1aafa37eaaefeaefa64
zane.chen
03:00 AM
expect for your replay 😊
03:01
zane.chen
03:01 AM
I have another question about logs
03:01
zane.chen
03:01 AM
maybe signoz cannot support application inside logs?
03:03
zane.chen
03:03 AM
I can only find some http request record in signoz, just like below
03:03
zane.chen
03:03 AM
Image 1 for
03:04
zane.chen
03:04 AM
2、and can go-zero framework be supported by signoz? my go application used go-zero framework not gin