prometheus_wireguard_exporter icon indicating copy to clipboard operation
prometheus_wireguard_exporter copied to clipboard

Always reset counter metrics when automation restart wireguard interface

Open rahmadsandy opened this issue 4 years ago • 5 comments

Hello @MindFlavor , honesty this amazing project

could this exporter save all metrics from the beginning with ignoring how often we restarted wireguard interface? or could be store stats into file or some databases

i used this wireguard framework to manage https://github.com/vx3r/wg-gen-web everytime do CUD (Create, Update and Delete) automatically restart wireguard interface image

i think its could be good if this exporter could save from beginning depends from exporter systemd file status image

image

rahmadsandy avatar Dec 08 '21 03:12 rahmadsandy

Hello @rahmadsandy, please correct me if I misunderstood. You are suggesting to persist the output of wg show all dump to use in case wireguard is restarting?

MindFlavor avatar Dec 09 '21 16:12 MindFlavor

sorry replying lately, yes correct @MindFlavor

but i have tried after restarting wireguard service wg show all dump also resetting all data

rahmadsandy avatar Dec 17 '21 20:12 rahmadsandy

We can cache the last wg show all dump output but I am not sure it would help: the counters will get reset anyway at the next poll. I'll try and think about an alternative. If anyone in the community can chip in, it would be most welcome!

MindFlavor avatar Jan 18 '22 07:01 MindFlavor

thank you @MindFlavor still waiting your progress 🚀

rahmadsandy avatar Jan 18 '22 08:01 rahmadsandy