Created
October 20, 2014 10:21
-
-
Save pantaluna/6049d1c14d4776a03383 to your computer and use it in GitHub Desktop.
collectd varnish 4.0.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano /etc/cgi-collectd-varnishstat.sh | |
#!/bin/bash | |
echo "Content-Type:application/json" | |
echo "Cache-Control: no-cache, no-store, must-revalidate" | |
echo "Pragma: no-cache" | |
echo "Expires: 0" | |
echo "" | |
varnishstat -j -f MAIN.cache* | |
exit 0 | |
<Plugin curl_json> | |
# VARNISH metrics: | |
<URL "http://myserver/cgi-bin/cgi-collectd-varnishstat.sh"> | |
Instance "varnish" | |
User "xxx" | |
Password "yyy" | |
<Key "MAIN.cache_hit/value"> | |
Type "gauge" | |
Instance "cache_hit" | |
</Key> | |
<Key "MAIN.cache_hitpass/value"> | |
Type "gauge" | |
Instance "cache_hitpass" | |
</Key> | |
<Key "MAIN.cache_miss/value"> | |
Type "gauge" | |
Instance "cache_miss" | |
</Key> | |
</URL> | |
</Plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment