Page MenuHomePhabricator
Paste P9834

kludge up a "number of seconds we saw the NIC close to saturation" exporter
ActivePublic

Authored by CDanis on Dec 6 2019, 8:04 PM.
Tags
None
Referenced Files
F31460942: raw.txt
Dec 6 2019, 8:04 PM
Subscribers
None
stdbuf -i0 -o0 -e0 ifstat -n -t -b | stdbuf -i0 -o0 -e0 tail -n+3 |
(outsatsecs=0; insatsecs=0; while read ts kbpsin kbpsout ; do
if [[ $kbpsout -ge 900000 ]] ; then ((outsatsecs++)); fi
if [[ $kbpsin -ge 900000 ]] ; then ((insatsecs++)) ; fi;
echo 'nic_saturated_seconds{dir="out"}' ${outsatsecs}'\nnic_saturated_seconds{dir="in"}' $insatsecs | tee >(sponge /var/lib/prometheus/node.d/saturated.prom) ;
done)

Event Timeline

CDanis changed the title of this paste from untitled to kludge up a "number of seconds we saw the NIC close to saturation" exporter.Dec 6 2019, 8:10 PM