PluginOutdatedCatalog: pastmon

File pastmon, 812 bytes (added by frankg@…, at 2006-03-13T21:14:39+01:00)

pastmon.sourceforge.net output grapher. Simple log grepper. use pastmon -r300 >/var/log/pastmon to collect data.

Line 
1#!/bin/sh
2#
3# Plugin to measure transactoin response time.
4#
5# measures average estimated delivery time from first request to final response
6#
7# Magic markers - optional - used by installation scripts and
8# munin-config:
9#
10#%# family=manual
11#%# capabilities=autoconf
12
13if [ "$1" = "autoconf" ]; then
14        echo yes
15        exit 0
16fi
17
18if [ "$1" = "config" ]; then
19
20        echo 'graph_title Delivery time'
21        echo 'graph_args --base 1000 -l 0 '
22        echo 'graph_vlabel Average Transaction Delivery Time'
23        echo 'adt.label Average Seconds'
24        echo 'adt.draw LINE1'
25        echo 'mdt.label Max Delivery Time
26        echo 'mdt.draw LINE2   
27        exit 0
28fi
29
30strings /var/log/pastmon | grep ip2co | awk 'BEGIN{mdt=0}{if ($46 > mdt){mdt=$46}c+=$12;t+=$46}END{if (t != 0){print "adt.value", t/c;print "mdt.value", mdt}}'
31cat /dev/null >/var/log/pastmon