mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Add InfluxDB memory usage chart
This commit is contained in:
parent
f51b0f1cda
commit
08f066637e
5 changed files with 58 additions and 19 deletions
|
|
@ -1087,6 +1087,19 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function driver:getMemoryUsage()
|
||||
local query = 'select LAST(HeapInUse) FROM "_internal".."runtime"'
|
||||
local data = influx_query(self.url .. "/query?db=_internal", query, self.username, self.password)
|
||||
|
||||
if data and data.series and data.series[1] and data.series[1].values[1] then
|
||||
return data.series[1].values[1][2]
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function driver.getShardGroupDuration(days_retention)
|
||||
-- https://docs.influxdata.com/influxdb/v1.7/query_language/database_management/#description-of-syntax-1
|
||||
if days_retention < 2 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue