annotate dns/files/run_mtail.sh @ 329:2bbcf00b8d2a

hgignore and reformat
author drewp@bigasterisk.com
date Sun, 23 Feb 2025 15:08:58 -0800
parents 5b88b38f2471
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
119
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
1 #!/bin/zsh
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
2 STATS_PERIOD=2m
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
3 while (true) { pkill --signal USR1 --oldest --full /usr/sbin/dnsmasq; sleep ${STATS_PERIOD} } &
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
4
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
5 rm -f /tmp/dnsmasq_log_pipe
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
6 mkfifo /tmp/dnsmasq_log_pipe
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
7
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
8 { journalctl -fu dnsmasq_10.2.service > /tmp/dnsmasq_log_pipe } &
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
9
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
10 mtail -port 9991 -logtostderr -logs /tmp/dnsmasq_log_pipe -progs /opt/dnsmasq/10.2
51a471fa4d29 metrics on dnsmasq log errors and DHCP commands
drewp@bigasterisk.com
parents:
diff changeset
11 #-disable_fsnotify -poll_interval ${STATS_PERIOD}