Hi all! This is my first time posting here xD
I need some help with the singlestat using the postgres datasource. Here at my job, I’m used to use the singlestat on some of my monitoring dashboards, and until now it’s working perfectly, but when I tried to execute a query that returns 0 or 1 and try do the value mappings it only identify the 0 value.
The query is returning 1, I put 1 = UP and 0 = DOWN on value mapping, but it only identifies the 0 = DOWN, when I removed the value mapping, it’s showing 1 on the result.
I’ve already try integer, decimal, many others types to return on this query, but it doesn’t work
I tried to debug with the web console and I think the result it’s OK.
Can you guys help me? (Sorry about my english)
Is your query returning numbers or strings with number inside?
Hi! it’s returning a number:
If the image won’t load:
xhrStatus:“complete”
request:Object
method:“POST”
url:“api/tsdb/query”
data:Object
from:“1510059662119”
to:“1510059962119”
queries:Array[1]
0:Object
refId:“A”
intervalMs:200
maxDataPoints:“900”
datasourceId:8
rawSql:“SELECT * FROM monitoring.check_status();”
format:“table”
response:Object
results:Object
A:Object
refId:“A”
meta:Object
rowCount:1
sql:“SELECT * FROM monitoring.check_status();”
series:null
tables:Array[1]
0:Object
columns:Array[1]
0:Object
text:“check_status”
rows:Array[1]
0:Array[1]
0:“1”