Re:Show HN: pg_netstat, a Postgres extension to monitor data...
by merpkz on Tuesday September 13, 2022 @09:54AM
(#32824314)
could achieve something similar a bit different way - by using Linux nftables ( new iptables ) netfilter interface. I have setup like this for measuring used traffic by certain daemons running under specific user:
and then view it like this:
Since nft -j outputs JSON it can easily then be ingested back into Postgres and indexed. I personally use it together with zabbix to count per second differences in values. It needs some more work because netfilter can match packets by UID/GID only for output, input then has to be matched by destination port, 5432 in case of postgres.
[ Parent
| on HN ]
Re:Show HN: pg_netstat, a Postgres extension to monitor data...
by Self-Perfection on Tuesday September 13, 2022 @05:58PM
(#32830702)
Nice. I had another approach in mind but never actually implemented.
Systemd seems to report.network traffic stats for managed units. It spawns cgroups for units which among other things track network traffic.