|
Re: munin node proxy?: msg#00013db.rddtool.munin.general
Nicolai Langfeldt wrote: > S. Banerian wrote: >> I have used munin for a while now, and find it useful. I have found a >> need for a way to avoid use of snmp to monitor some devices on a >> protected subnet, and am wondering if there is some way to 'proxy' >> requests from a munin server out in the world, to munin-nodes that are >> in a private subnet. >> >> The topology would be analogous to what is done with snmp plugins. >> >> Public "gateway" private >> >> munin-server --> munin-proxy ---> munin-node #1 >> |-----------> munin-node #2 >> |-----------> munin-node #3 > > I've thought of this (http://munin.projects.linpro.no/ticket/424), but > I'm far from implementing it myself. When I think of it now I think it > should be sort of easy. > > Envision a wildcard plugin called proxy_ which could be symlinked as > proxy_foo.example.com_df to get df from foo.example.com. It will have > to supply a hostname header for "config" requests and otherwise re-play, > more or less, what the munin node at foo.example.com says. It might > even be doable with shell-script and the help of netcat. Very very roughly: > > # Do whatever to pick out the wildcard arguments. > > replay() { > (echo "$3"; echo quit) | nc $1 $2 > } > > case $1 in > config) echo hostname $hostname > replay $hostname 4949 "config $plugin";; > '') replay $hostname 4949 "fetch $plugin";; > esac > > > You might need to apply some sed or some such to remove stuff from nc > that is not wanted. > > I would be very happy indeed if someone took the trouble to get this > working. > > Nicolai something like this does work, in terms of grabbing the data and passing off to the server (no wordwrap intended in replay() ): #!/bin/sh replay() { (echo "$3"; echo quit) | nc $1 $2 | grep -v "munin node at $1" | grep -v "^\." } nameplug=`basename $0 | sed 's/^proxy_//'` hostname=` echo $nameplug | sed 's/\_.*//g'` plugin=` echo $nameplug | sed 's/.*\_//g'` case $1 in config) echo host_name $hostname replay $hostname 4949 "config $plugin";; '') replay $hostname 4949 "fetch $plugin";; esac eg. ln -s /usr/share/munin/plugins/proxy__ ./proxy_my.domain.com_df however, I've not determined how to set up a separate (set of) 'nodes' on the munin server, as I've been able to with the snmp__if_ plugins. using [my.domain.com] address 123.456.789.123 use_node_name no does not do, as for the snmp plugins. -- S. Banerian 206-598-0302 UWMC Radiation Oncology ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: patch to allow extra perl args on #! lines: 00013, Lupe Christoph |
|---|---|
| Next by Date: | Re: munin node proxy?: 00013, Nicolai Langfeldt |
| Previous by Thread: | Re: munin node proxy?i: 00013, Nicolai Langfeldt |
| Next by Thread: | Re: munin node proxy?: 00013, Nicolai Langfeldt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |