Mercurial > code > home > repos > infra
diff templates/dnsmasq/run_mtail.sh @ 119:51a471fa4d29
metrics on dnsmasq log errors and DHCP commands
author | drewp@bigasterisk.com |
---|---|
date | Wed, 07 Dec 2022 23:03:57 -0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/dnsmasq/run_mtail.sh Wed Dec 07 23:03:57 2022 -0800 @@ -0,0 +1,11 @@ +#!/bin/zsh +STATS_PERIOD=2m +while (true) { pkill --signal USR1 --oldest --full /usr/sbin/dnsmasq; sleep ${STATS_PERIOD} } & + +rm -f /tmp/dnsmasq_log_pipe +mkfifo /tmp/dnsmasq_log_pipe + +{ journalctl -fu dnsmasq_10.2.service > /tmp/dnsmasq_log_pipe } & + +mtail -port 9991 -logtostderr -logs /tmp/dnsmasq_log_pipe -progs /opt/dnsmasq/10.2 +#-disable_fsnotify -poll_interval ${STATS_PERIOD} \ No newline at end of file