You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2024. It is now read-only.
I inherited a monitoring system for our PostgreSQL DB which is an official pgwatch2 docker image (pgwatch2 + influxdb + grafana). There is an alarm in Grafana for an abnormally high number of inserts in a period of time (15m):
SELECT non_negative_derivative(mean("tup_inserted"), 1m) FROM "db_stats" WHERE ("dbname" = 'nimble') AND $timeFilter GROUP BY time(15m) fill(null)
If to slightly modify this query and run it in the influxdb-cli:
> select "time", non_negative_derivative(mean("tup_inserted"), 1m) from "db_stats" where "dbname" = 'nimble' and time >= '2021-09-28T16:31:00Z' and time <= '2021-09-28T16:36:00Z' group by time(1m) fill(null) order by time asc;
name: db_stats
time non_negative_derivative
---- -----------------------
2021-09-28T16:31:00Z 2384
2021-09-28T16:32:00Z 16294
2021-09-28T16:33:00Z 1998713
2021-09-28T16:34:00Z 924
2021-09-28T16:35:00Z 1606
And indeed, there is a huge spike in the number of inserts.
I wanted to understand what table had the most inserts, and I ran the next query:
As you can see, not a single table has a spike in the number of inserts compared to the number in the "db_stats" series. I want to understand when pgwatch adds the tup_inserted metric to the db_stats and why the number is so vastly different from the number of inserts on separate tables. Can it be some system tables or triggers? We do have triggers but they modify the same tables you can see ^^.
This discussion was converted from issue #409 on February 21, 2022 11:16.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I inherited a monitoring system for our PostgreSQL DB which is an official pgwatch2 docker image (pgwatch2 + influxdb + grafana). There is an alarm in Grafana for an abnormally high number of inserts in a period of time (15m):
If to slightly modify this query and run it in the influxdb-cli:
And indeed, there is a huge spike in the number of inserts.
I wanted to understand what table had the most inserts, and I ran the next query:
As you can see, not a single table has a spike in the number of inserts compared to the number in the "db_stats" series. I want to understand when pgwatch adds the
tup_inserted
metric to thedb_stats
and why the number is so vastly different from the number of inserts on separate tables. Can it be some system tables or triggers? We do have triggers but they modify the same tables you can see ^^.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions