진현리
08/14/2024, 8:12 AM{
"start": 1723526536000,
"end": 1723528336000,
"step": 60,
"variables": {},
"compositeQuery": {
"queryType": "builder",
"panelType": "graph",
"builderQueries": {
"A": {
"dataSource": "metrics",
"queryName": "A",
"aggregateOperator": "increase",
"aggregateAttribute": {
"dataType": "float64",
"id": "jvm_class_unloaded--float64--Sum--true",
"isColumn": true,
"isJSON": false,
"key": "jvm_class_unloaded",
"type": "Sum"
},
"timeAggregation": "increase",
"spaceAggregation": "sum",
"functions": [],
"filters": {
"items": [
{
"id": "df3b6963",
"key": {
"dataType": "string",
"id": "service_name--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service_name",
"type": "tag"
},
"op": "=",
"value": "test"
}
],
"op": "AND"
},
"expression": "A",
"disabled": false,
"having": [],
"stepInterval": 60,
"limit": null,
"orderBy": [],
"groupBy": [],
"legend": "",
"reduceTo": "avg"
}
}
}
}
However, I converted it to
sum(increase(jvm_class_unloaded{service_name="test"}[1m]))
using PromQL, but no data is displayed. Is my PromQL syntax wrong?
Isn't the time range 1m? If I enter 1m in PromQL, there is no data, and after 2m, a value appears, but it is even different from the Query Builder value.
---
I have additional questions.
Why is the result value displayed randomly when querying metrics from Signoz to PromQL? It is constant when querying with Query Builder.
sum by(device, mountpoint, state, type, mode) (avg_over_time(system_filesystem_usage{operator_tag="test"}[1m]))
Srikanth Chekuri
08/14/2024, 5:08 PMIsn't the time range 1m?For PromQL to work, the interval should be at least twice as much as scape interval.
but it is even different from the Query Builder value.What is the difference?
Why is the result value displayed randomly when querying metrics from Signoz to PromQL? It is constant when querying with Query Builder.
``````
Your question is not clear
진현리
08/19/2024, 2:11 AM- Duration: 30m
- Datasource: Metric
- aggregateAttribute key: jvm_class_loaded
- spaceAggregation: sum
- timeAggregation: increase
JSON Payload
{
"start": 1724031583000,
"end": 1724033383000,
"step": 60,
"variables": {},
"compositeQuery": {
"queryType": "builder",
"panelType": "graph",
"builderQueries": {
"A": {
"dataSource": "metrics",
"queryName": "A",
"aggregateOperator": "increase",
"aggregateAttribute": {
"key": "jvm_class_loaded",
"dataType": "float64",
"type": "Sum",
"isColumn": true,
"isJSON": false,
"id": "jvm_class_loaded--float64--Sum--true"
},
"timeAggregation": "increase",
"spaceAggregation": "sum",
"functions": [],
"filters": {
"items": [
{
"id": "0ecf344d",
"key": {
"dataType": "string",
"id": "service_name--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service_name",
"type": "tag"
},
"op": "=",
"value": "XXXXXX"
}
],
"op": "AND"
},
"expression": "A",
"disabled": false,
"having": [],
"stepInterval": 60,
"limit": null,
"orderBy": [],
"groupBy": [
{
"key": "service_name",
"dataType": "string",
"type": "tag",
"isColumn": false,
"isJSON": false,
"id": "service_name--string--tag--false"
}
],
"legend": "Loaded",
"reduceTo": "avg"
}
}
}
}
# PromQL (graph result: third photo)
avg(sum by(service_name) (increase(jvm_class_loaded{service_name="XXXXXX"}[30m])))
If you compare the second and third photos, the graph values are different.
Is the promql I wrote wrong?Srikanth Chekuri
08/19/2024, 3:03 AM[30m]Why are you doing this? What it means is an increase in the value from 30 minutes back.
Srikanth Chekuri
08/19/2024, 3:04 AM진현리
08/19/2024, 3:25 AMSrikanth Chekuri
08/19/2024, 3:26 AM진현리
08/19/2024, 3:29 AMSrikanth Chekuri
08/19/2024, 3:35 AM진현리
08/19/2024, 3:48 AMSrikanth Chekuri
08/19/2024, 4:37 AM진현리
08/19/2024, 4:38 AMSrikanth Chekuri
08/19/2024, 4:50 AMjvm_class_loaded
진현리
08/19/2024, 5:10 AM- Metrics / jvm_class_loaded / increase
- WHERE: service_name = test
- Sum By: service_name
- Legend Format: Loaded
- interval: 1m
• PromQL
- PromQL Query: sum by(service_name) (increase(jvm_class_loaded{service_name="test"}[2m]))
- Legend Format: Loaded
Srikanth Chekuri
08/19/2024, 11:04 AM진현리
08/20/2024, 12:06 AM{
"status": "success",
"data": {
"resultType": "",
"result": [
{
"queryName": "A",
"series": [
{
"labels": {
"service_name": "Galaxy_store_prd"
},
"labelsArray": [
{
"service_name": "Galaxy_store_prd"
}
],
"values": [
{
"timestamp": 1724049180000,
"value": "0"
},
{
"timestamp": 1724049240000,
"value": "0"
},
{
"timestamp": 1724049300000,
"value": "0"
},
{
"timestamp": 1724049360000,
"value": "0"
},
{
"timestamp": 1724049420000,
"value": "0"
},
{
"timestamp": 1724049480000,
"value": "0"
},
{
"timestamp": 1724049540000,
"value": "2"
},
{
"timestamp": 1724049600000,
"value": "2"
},
{
"timestamp": 1724049660000,
"value": "0"
},
{
"timestamp": 1724049720000,
"value": "2"
},
{
"timestamp": 1724049780000,
"value": "0"
},
{
"timestamp": 1724049840000,
"value": "2"
},
{
"timestamp": 1724049900000,
"value": "0"
},
{
"timestamp": 1724049960000,
"value": "2"
},
{
"timestamp": 1724050020000,
"value": "2"
},
{
"timestamp": 1724050080000,
"value": "0"
},
{
"timestamp": 1724050140000,
"value": "0"
},
{
"timestamp": 1724050200000,
"value": "0"
},
{
"timestamp": 1724050260000,
"value": "0"
},
{
"timestamp": 1724050320000,
"value": "0"
},
{
"timestamp": 1724050380000,
"value": "0"
},
{
"timestamp": 1724050440000,
"value": "0"
},
{
"timestamp": 1724050500000,
"value": "0"
},
{
"timestamp": 1724050560000,
"value": "0"
},
{
"timestamp": 1724050620000,
"value": "0"
},
{
"timestamp": 1724050680000,
"value": "0"
},
{
"timestamp": 1724050740000,
"value": "0"
},
{
"timestamp": 1724050800000,
"value": "6"
},
{
"timestamp": 1724050860000,
"value": "3"
},
{
"timestamp": 1724050980000,
"value": "3"
},
{
"timestamp": 1724051040000,
"value": "6"
},
{
"timestamp": 1724051100000,
"value": "3"
},
{
"timestamp": 1724051160000,
"value": "3"
},
{
"timestamp": 1724051220000,
"value": "6"
},
{
"timestamp": 1724051280000,
"value": "0"
},
{
"timestamp": 1724051340000,
"value": "4"
},
{
"timestamp": 1724051400000,
"value": "1"
},
{
"timestamp": 1724051460000,
"value": "4"
},
{
"timestamp": 1724051520000,
"value": "0"
},
{
"timestamp": 1724051580000,
"value": "1"
},
{
"timestamp": 1724051640000,
"value": "0"
},
{
"timestamp": 1724051700000,
"value": "4"
},
{
"timestamp": 1724051760000,
"value": "1"
},
{
"timestamp": 1724051820000,
"value": "0"
},
{
"timestamp": 1724051880000,
"value": "4"
},
{
"timestamp": 1724051940000,
"value": "0"
},
{
"timestamp": 1724052000000,
"value": "0"
},
{
"timestamp": 1724052060000,
"value": "0"
},
{
"timestamp": 1724052120000,
"value": "0"
},
{
"timestamp": 1724052180000,
"value": "0"
},
{
"timestamp": 1724052240000,
"value": "0"
},
{
"timestamp": 1724052300000,
"value": "0"
},
{
"timestamp": 1724052360000,
"value": "0"
},
{
"timestamp": 1724052420000,
"value": "0"
},
{
"timestamp": 1724052480000,
"value": "0"
},
{
"timestamp": 1724052540000,
"value": "0"
},
{
"timestamp": 1724052600000,
"value": "0"
},
{
"timestamp": 1724052660000,
"value": "0"
},
{
"timestamp": 1724052720000,
"value": "0"
},
{
"timestamp": 1724052780000,
"value": "0"
},
{
"timestamp": 1724052840000,
"value": "0"
},
{
"timestamp": 1724052900000,
"value": "0"
},
{
"timestamp": 1724052960000,
"value": "0"
},
{
"timestamp": 1724053020000,
"value": "0"
},
{
"timestamp": 1724053080000,
"value": "0"
},
{
"timestamp": 1724053140000,
"value": "0"
},
{
"timestamp": 1724053200000,
"value": "1"
},
{
"timestamp": 1724053260000,
"value": "0"
},
{
"timestamp": 1724053320000,
"value": "0"
},
{
"timestamp": 1724053380000,
"value": "0"
},
{
"timestamp": 1724053440000,
"value": "0"
},
{
"timestamp": 1724053500000,
"value": "0"
},
{
"timestamp": 1724053560000,
"value": "0"
},
{
"timestamp": 1724053620000,
"value": "0"
},
{
"timestamp": 1724053680000,
"value": "0"
},
{
"timestamp": 1724053740000,
"value": "0"
}
]
}
],
"list": null
}
]
}
}
• PromQL
1. increase time value [2m]
{
"status": "success",
"data": {
"resultType": "",
"result": [
{
"queryName": "A",
"series": [
{
"labels": {
"service_name": "Galaxy_store_prd"
},
"labelsArray": null,
"values": [
{
"timestamp": 1724049457000,
"value": "0"
},
{
"timestamp": 1724049517000,
"value": "0"
},
{
"timestamp": 1724049577000,
"value": "0"
},
{
"timestamp": 1724049757000,
"value": "0"
},
{
"timestamp": 1724050357000,
"value": "0"
},
{
"timestamp": 1724050417000,
"value": "0"
},
{
"timestamp": 1724050477000,
"value": "0"
},
{
"timestamp": 1724050597000,
"value": "0"
},
{
"timestamp": 1724050717000,
"value": "0"
},
{
"timestamp": 1724050777000,
"value": "0"
},
{
"timestamp": 1724050837000,
"value": "0"
},
{
"timestamp": 1724050957000,
"value": "0"
},
{
"timestamp": 1724051017000,
"value": "0"
},
{
"timestamp": 1724051197000,
"value": "0"
},
{
"timestamp": 1724051497000,
"value": "0"
},
{
"timestamp": 1724051917000,
"value": "0"
},
{
"timestamp": 1724052157000,
"value": "0"
},
{
"timestamp": 1724052457000,
"value": "0"
},
{
"timestamp": 1724052517000,
"value": "0"
},
{
"timestamp": 1724052577000,
"value": "0"
},
{
"timestamp": 1724052937000,
"value": "0"
},
{
"timestamp": 1724053237000,
"value": "0"
},
{
"timestamp": 1724053297000,
"value": "0"
},
{
"timestamp": 1724053357000,
"value": "0"
},
{
"timestamp": 1724053717000,
"value": "0"
},
{
"timestamp": 1724053837000,
"value": "0"
},
{
"timestamp": 1724053837001,
"value": "0"
}
]
}
],
"list": null
}
]
}
}
2. increase time value [5m]
{
"status": "success",
"data": {
"resultType": "",
"result": [
{
"queryName": "A",
"series": [
{
"labels": {
"service_name": "Galaxy_store_prd"
},
"labelsArray": null,
"values": [
{
"timestamp": 1724049037000,
"value": "0"
},
{
"timestamp": 1724049097000,
"value": "0"
},
{
"timestamp": 1724049157000,
"value": "0"
},
{
"timestamp": 1724049217000,
"value": "0"
},
{
"timestamp": 1724049277000,
"value": "0"
},
{
"timestamp": 1724049337000,
"value": "0"
},
{
"timestamp": 1724049397000,
"value": "0"
},
{
"timestamp": 1724049457000,
"value": "0"
},
{
"timestamp": 1724049517000,
"value": "0"
},
{
"timestamp": 1724049577000,
"value": "0"
},
{
"timestamp": 1724049637000,
"value": "5"
},
{
"timestamp": 1724049697000,
"value": "7.5"
},
{
"timestamp": 1724049757000,
"value": "3.1376333333333335"
},
{
"timestamp": 1724049817000,
"value": "2.5"
},
{
"timestamp": 1724049877000,
"value": "0"
},
{
"timestamp": 1724049937000,
"value": "0"
},
{
"timestamp": 1724049997000,
"value": "0"
},
{
"timestamp": 1724050057000,
"value": "0"
},
{
"timestamp": 1724050117000,
"value": "0"
},
{
"timestamp": 1724050177000,
"value": "0"
},
{
"timestamp": 1724050237000,
"value": "0"
},
{
"timestamp": 1724050297000,
"value": "0"
},
{
"timestamp": 1724050357000,
"value": "0"
},
{
"timestamp": 1724050417000,
"value": "0"
},
{
"timestamp": 1724050477000,
"value": "0"
},
{
"timestamp": 1724050537000,
"value": "0"
},
{
"timestamp": 1724050597000,
"value": "0"
},
{
"timestamp": 1724050657000,
"value": "0"
},
{
"timestamp": 1724050717000,
"value": "0"
},
{
"timestamp": 1724050777000,
"value": "0"
},
{
"timestamp": 1724050837000,
"value": "0"
},
{
"timestamp": 1724050897000,
"value": "0"
},
{
"timestamp": 1724050957000,
"value": "0"
},
{
"timestamp": 1724051017000,
"value": "0"
},
{
"timestamp": 1724051077000,
"value": "3.749984375065104"
},
{
"timestamp": 1724051137000,
"value": "0"
},
{
"timestamp": 1724051197000,
"value": "0"
},
{
"timestamp": 1724051257000,
"value": "0"
},
{
"timestamp": 1724051317000,
"value": "0"
},
{
"timestamp": 1724051377000,
"value": "0"
},
{
"timestamp": 1724051437000,
"value": "1.25"
},
{
"timestamp": 1724051497000,
"value": "0"
},
{
"timestamp": 1724051557000,
"value": "0"
},
{
"timestamp": 1724051617000,
"value": "0"
},
{
"timestamp": 1724051677000,
"value": "0"
},
{
"timestamp": 1724051737000,
"value": "0"
},
{
"timestamp": 1724051797000,
"value": "0"
},
{
"timestamp": 1724051857000,
"value": "0"
},
{
"timestamp": 1724051917000,
"value": "0"
},
{
"timestamp": 1724051977000,
"value": "0"
},
{
"timestamp": 1724052037000,
"value": "0"
},
{
"timestamp": 1724052097000,
"value": "0"
},
{
"timestamp": 1724052157000,
"value": "0"
},
{
"timestamp": 1724052217000,
"value": "0"
},
{
"timestamp": 1724052277000,
"value": "0"
},
{
"timestamp": 1724052337000,
"value": "0"
},
{
"timestamp": 1724052397000,
"value": "0"
},
{
"timestamp": 1724052457000,
"value": "0"
},
{
"timestamp": 1724052517000,
"value": "0"
},
{
"timestamp": 1724052577000,
"value": "0"
},
{
"timestamp": 1724052637000,
"value": "0"
},
{
"timestamp": 1724052697000,
"value": "0"
},
{
"timestamp": 1724052757000,
"value": "0"
},
{
"timestamp": 1724052817000,
"value": "0"
},
{
"timestamp": 1724052877000,
"value": "0"
},
{
"timestamp": 1724052937000,
"value": "0"
},
{
"timestamp": 1724052997000,
"value": "0"
},
{
"timestamp": 1724053057000,
"value": "0"
},
{
"timestamp": 1724053117000,
"value": "0"
},
{
"timestamp": 1724053177000,
"value": "0"
},
{
"timestamp": 1724053237000,
"value": "0"
},
{
"timestamp": 1724053297000,
"value": "0"
},
{
"timestamp": 1724053357000,
"value": "0"
},
{
"timestamp": 1724053417000,
"value": "0"
},
{
"timestamp": 1724053477000,
"value": "0"
},
{
"timestamp": 1724053537000,
"value": "0"
},
{
"timestamp": 1724053597000,
"value": "0"
},
{
"timestamp": 1724053657000,
"value": "0"
},
{
"timestamp": 1724053717000,
"value": "0"
},
{
"timestamp": 1724053777000,
"value": "0"
},
{
"timestamp": 1724053837000,
"value": "0"
}
]
}
],
"list": null
}
]
}
}
진현리
08/20/2024, 12:08 AMSigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc.
Powered by