|
|
@ -8,6 +8,8 @@ import json
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import plotly.express as px
|
|
|
|
import plotly.express as px
|
|
|
|
import plotly.graph_objects as po
|
|
|
|
import plotly.graph_objects as po
|
|
|
|
|
|
|
|
import plotly.io as pio
|
|
|
|
|
|
|
|
import io
|
|
|
|
import pandas as pd
|
|
|
|
import pandas as pd
|
|
|
|
import psycopg
|
|
|
|
import psycopg
|
|
|
|
import sqlalchemy
|
|
|
|
import sqlalchemy
|
|
|
@ -159,7 +161,7 @@ def ntpserver():
|
|
|
|
select time_bucket('5 minutes', time) as bucket,
|
|
|
|
select time_bucket('5 minutes', time) as bucket,
|
|
|
|
device,
|
|
|
|
device,
|
|
|
|
avg(cast(values->'rootdisp'->>'value' as float)) as rootdisp,
|
|
|
|
avg(cast(values->'rootdisp'->>'value' as float)) as rootdisp,
|
|
|
|
avg(cast(values->'stratum'->>'value' as int)) as stratum
|
|
|
|
max(cast(values->'stratum'->>'value' as int)) as stratum
|
|
|
|
from measurements
|
|
|
|
from measurements
|
|
|
|
where time >= date_trunc('day', now()) AND time < date_trunc('day', now()) + '1 day'::interval and
|
|
|
|
where time >= date_trunc('day', now()) AND time < date_trunc('day', now()) + '1 day'::interval and
|
|
|
|
application = 'TSM' and attributes->>'Label' = 'david'
|
|
|
|
application = 'TSM' and attributes->>'Label' = 'david'
|
|
|
@ -206,7 +208,7 @@ def ntpserver():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|
app.run(port=8080)
|
|
|
|
app.run(host="0.0.0.0", port=8080)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
exposed_app = ProxyFix(app, x_for=1, x_host=1)
|
|
|
|
exposed_app = ProxyFix(app, x_for=1, x_host=1)
|
|
|
|
|
|
|
|
|
|
|
|