X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/fa63c845987967418edaff22b75958916b19f19a..5b2560e7d50f01a674b8da3d8f30100c92877958:/cookbooks/munin/files/default/plugins/squid_times diff --git a/cookbooks/munin/files/default/plugins/squid_times b/cookbooks/munin/files/default/plugins/squid_times deleted file mode 100755 index c16612eee..000000000 --- a/cookbooks/munin/files/default/plugins/squid_times +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2008 Olivier DELHOMME. All rights reserved. -# License GPL V2 or higher -# -# Abstract -# munin plugin that logs the cache mean services times -# -# Authors -# . Olivier Delhomme -# . Grant Slater -# -#%# family=auto -#%# capabilities=autoconf - -if [ "$1" = "autoconf" ]; then - SQUID_STATS=$(squidclient -h 127.0.0.1 cache_object://localhost/info) - if [ -n "${SQUID_STATS}" ]; then - echo yes - exit 0 - else - echo "no (HTTP GET failed)" - exit 1 - fi -fi - -if [ "$1" = "config" ]; then - echo 'graph_title Squid Median Services Times' - echo 'graph_info This graph shows the proxy median services response times.' - echo 'graph_category squid' - echo 'graph_args --lower-limit 0' - echo 'graph_vlabel median reponse times (s)' - - echo 'mean_http.label Http' - echo 'mean_cmis.label Cache misses' - echo 'mean_chits.label Cache hits' - echo 'mean_nhits.label Near hits' - echo 'mean_nmr.label Not-modified replies' - echo 'mean_dnsl.label Dns lookups' - echo 'mean_icpq.label Icp queries' - - exit 0 -fi - -SQUID_TIME=$(squidclient -h 127.0.0.1 cache_object://localhost/info) - -SQUID_TIME_HTTP=$(echo "$SQUID_TIME" | grep "HTTP Requests (All)" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) -SQUID_TIME_CACHE_MISSES=$(echo "$SQUID_TIME" | grep "Cache Misses" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) -SQUID_TIME_CACHE_HITS=$(echo "$SQUID_TIME" | grep "Cache Hits" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) -SQUID_TIME_NEAR_HITS=$(echo "$SQUID_TIME" | grep "Near Hits" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) -SQUID_TIME_NM_REPLIES=$(echo "$SQUID_TIME" | grep "Not-Modified Replies" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) -SQUID_TIME_DNS_LOOKUPS=$(echo "$SQUID_TIME" | grep "DNS Lookups" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) -SQUID_TIME_ICP_QUERIES=$(echo "$SQUID_TIME" | grep "ICP Queries" | cut -d':' -f2 | sed -e "s/^\ *//" | cut -d' ' -f1) - -echo "mean_http.value $SQUID_TIME_HTTP" -echo "mean_cmis.value $SQUID_TIME_CACHE_MISSES" -echo "mean_chits.value $SQUID_TIME_CACHE_HITS" -echo "mean_nhits.value $SQUID_TIME_NEAR_HITS" -echo "mean_nmr.value $SQUID_TIME_NM_REPLIES" -echo "mean_dnsl.value $SQUID_TIME_DNS_LOOKUPS" -echo "mean_icpq.value $SQUID_TIME_ICP_QUERIES"