Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
a972916704
|
|||
1774bb11aa
|
|||
d19ac55dea
|
|||
4db989022e
|
|||
af76406afa
|
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11-alpine3.21
|
FROM python:3.12-alpine3.21
|
||||||
|
|
||||||
ENV REDIS_URL=""
|
ENV REDIS_URL=""
|
||||||
ENV SECRET_KEY=""
|
ENV SECRET_KEY=""
|
||||||
|
@ -48,10 +48,10 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- pv-stats.hottis.de
|
- numbers.hottis.de
|
||||||
secretName: pv-stats-cert
|
secretName: numbers-cert
|
||||||
rules:
|
rules:
|
||||||
- host: pv-stats.hottis.de
|
- host: numbers.hottis.de
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
@ -199,7 +199,7 @@ def ntpserver():
|
|||||||
query = """
|
query = """
|
||||||
select time_bucket('5 minutes', time) as bucket,
|
select time_bucket('5 minutes', time) as bucket,
|
||||||
device,
|
device,
|
||||||
avg(cast(values->'lan-in-pkts'->>'value' as float)) as packets
|
avg(cast(values->'time-req-pkts'->>'value' as float)) as packets
|
||||||
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 = 'SNMP' and attributes->>'Label' = 'david'
|
application = 'SNMP' and attributes->>'Label' = 'david'
|
||||||
@ -211,14 +211,15 @@ def ntpserver():
|
|||||||
fig_2.update_layout(
|
fig_2.update_layout(
|
||||||
xaxis_title="",
|
xaxis_title="",
|
||||||
yaxis_title="",
|
yaxis_title="",
|
||||||
title=f"Packets"
|
yaxis_ticksuffix="p/s",
|
||||||
|
title=f"Time Requests"
|
||||||
)
|
)
|
||||||
graph_html_2 = fig_2.to_html(full_html=False, default_height='30%')
|
graph_html_2 = fig_2.to_html(full_html=False, default_height='30%')
|
||||||
|
|
||||||
query = """
|
query = """
|
||||||
select time_bucket('5 minutes', time) as bucket,
|
select time_bucket('5 minutes', time) as bucket,
|
||||||
device,
|
device,
|
||||||
avg(cast(values->'local'->>'value' as float)) as loadaverage1min
|
avg(cast(values->'load1'->>'value' as float)) as loadaverage1min
|
||||||
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 = 'SNMP' and attributes->>'Label' = 'david'
|
application = 'SNMP' and attributes->>'Label' = 'david'
|
||||||
|
Reference in New Issue
Block a user