<<< Back

Прикручиваем Grafana к Мажордому


Xor (2019-10-27 02:13:02):

Дописал про Алерты)

(0)
 
nick7zmail (2019-10-28 13:47:47):

Неплохо =)

(0)
 
Xor (2019-11-04 14:18:57):

добавил картинки настроек

(0)
 
stell_hawk (2019-12-16 18:46:59):

немного подкрутил ситуацию:
чтобы были первоначальные значения и последние на графики нужно их добавить через unuion
далее по id общаться не удобно. проще по названию: что получилось:
(SELECT
$unixEpochFrom() as time_sec,
pvalues.property_name as "metric",
(phistory.VALUE+0.0) as value
FROM phistory
JOIN pvalues ON pvalues.id = phistory.VALUE_ID
WHERE (phistory.ADDED)<$__timeFrom() and pvalues.PROPERTY_NAME in ('$tname.VALUE')
ORDER BY phistory.ADDED limit 1)
union
(SELECT
$
unixEpochFrom() as time_sec,
pvalues.property_name as "metric",
(phistory.VALUE+0.0) as value
FROM phistory
JOIN pvalues ON pvalues.id = phistory.VALUE_ID
WHERE (phistory.ADDED)<$timeFrom() and pvalues.PROPERTY_NAME in ('$tname.currentTargetValue')
ORDER BY phistory.ADDED limit 1)
union
(SELECT
$time(phistory.ADDED),
pvalues.property_name as "metric",
(phistory.VALUE+0.0) as value
FROM phistory
JOIN pvalues ON pvalues.id = phistory.VALUE_ID
WHERE $
timeFilter(phistory.ADDED) and pvalues.PROPERTY_NAME in ('$tname.currentTargetValue','$tname.VALUE')
ORDER BY phistory.ADDED)
union
(SELECT
$
unixEpochTo() as time_sec,
pvalues.property_name as "metric",
(phistory.VALUE+0.0) as value
FROM phistory
JOIN pvalues ON pvalues.id = phistory.VALUE_ID
WHERE (phistory.ADDED)<$timeTo() and pvalues.PROPERTY_NAME in ('$tname.VALUE')
ORDER BY phistory.ADDED DESC limit 1)
union
(SELECT
$__unixEpochTo() as time_sec,
pvalues.property_name as "metric",
(phistory.VALUE+0.0) as value
FROM phistory
JOIN pvalues ON pvalues.id = phistory.VALUE_ID
WHERE (phistory.ADDED)<$
timeTo() and pvalues.PROPERTY_NAME in ('$tname.currentTargetValue')
ORDER BY phistory.ADDED DESC limit 1)

(2)
 
olehs (2021-01-18 12:16:20):

Чтобы встроить как домашнюю страницу в МЖД, нужно в конфиге указать
allow_embedding = true

(1)
 

Please login to leave comments. Join us!