This file contains 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
#!/bin/bash | |
# A port of ZFS stats for FreeBSD plugin to Linux, adapted to send metrics to statsd. | |
# | |
# Author: Daniele Valeriani <[email protected]> | |
# Author of the original munin plugin: David Bjornsson <[email protected]> | |
# Author of the Linux port: Alex Chistyakov <[email protected]> | |
PREFIX="servers.`hostname`.zfs" | |
STATSD_ADDR="YOUR STATSD SERVER" |
This file contains 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
func HttpConnect(proxy, url_ string) (io.ReadWriteCloser, error) { | |
p, err := net.Dial("tcp", proxy) | |
if err != nil { | |
return nil, err | |
} | |
turl, err := url.Parse(url_) | |
if err != nil { | |
return nil, err | |
} |