On Wed, Jan 04, 2017 at 10:49:21AM +0100, Ralf Hildebrandt wrote:
> Given that I'm currently blind regarding usage numbers, I'd like to
> know how you're monitoring usage of your pool servers.

I'm using iptables+collectd+rrdtool. A like collectd because it can
collect data every second while not loading the CPU too much.

In iptables there are rules for NTP packets with comments:

iptables -A INPUT -p udp -m udp --dport 123 -m comment --comment ntp_ipv4_in -j 
ACCEPT
iptables -A OUTPUT -p udp -m udp --sport 123 -m comment --comment ntp_ipv4_out 
-j ACCEPT
ip6tables -A INPUT -p udp -m udp --dport 123 -m comment --comment ntp_ipv6_in 
-j ACCEPT
ip6tables -A OUTPUT -p udp -m udp --sport 123 -m comment --comment ntp_ipv6_out 
-j ACCEPT

In collectd.conf there is:

Interval     1
LoadPlugin iptables
LoadPlugin rrdtool
LoadPlugin chrony
<Plugin iptables>
        Chain "filter" "INPUT" "ntp_ipv4_in"
        Chain "filter" "OUTPUT" "ntp_ipv4_out"
        Chain6 "filter" "INPUT" "ntp_ipv6_in"
        Chain6 "filter" "OUTPUT" "ntp_ipv6_out"
</Plugin>
<Plugin rrdtool>
        DataDir "/var/lib/collect/rrd"
        CacheTimeout 60
        RRARows 1200
        RRATimespan 86400
        RRATimespan 604800
        RRATimespan 2678400
        RRATimespan 31622400
</Plugin>

The graphs are generated by rrdtool in a script that's started
periodically from cron. The graphs I posted were created like this:

rrdtool graph traffic-ipv4-day.png -o -t 'server traffic IPv4' \
        -w 900 -h 300 -s now-86400 -e now \
        
DEF:inmin=/var/lib/collectd/rrd/ntp2/iptables-filter-INPUT/ipt_packets-ntp_ipv4_in.rrd:value:MIN
 \
        
DEF:inavg=/var/lib/collectd/rrd/ntp2/iptables-filter-INPUT/ipt_packets-ntp_ipv4_in.rrd:value:AVERAGE
 \
        
DEF:inmax=/var/lib/collectd/rrd/ntp2/iptables-filter-INPUT/ipt_packets-ntp_ipv4_in.rrd:value:MAX
 \
        AREA:inmax#7070aa AREA:inmin#ffffff \
        'LINE2:inavg#0000bb:Received    ' \
        'GPRINT:inmin:MIN:Min\:%7.1lf pkt/s' \
        'GPRINT:inavg:AVERAGE:Avg\:%7.1lf pkt/s' \
        'GPRINT:inmax:MAX:Max\:%7.1lf pkt/s\l'

I have other graphs showing dropped packets (substracting the "out"
numbers from "in") and various data collected by the chrony plugin.

-- 
Miroslav Lichvar
_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to