munin-tor icon indicating copy to clipboard operation
munin-tor copied to clipboard

Support for multiple tor instances on a single host (aggregate graphs)

Open nusenu opened this issue 9 years ago • 5 comments

Hi,

I'd like to use your munin plugin on relays which run multiple tor instances to better integrate with my ansible role [1]. The idea would be to provide the plugin with a list of socket files via env.socket. The plugin then connects to every tor instance and generates a "stacked" graph. For tor_connections and tor_traffic that would simply have as many lines as tor instances, where one line is the 0 level for the next tor instance on top of it. The final line would effectively represent the sum of all instances.

What do you think about that? thanks, Nusenu

Also, do you have plans to submit your plugin for upstream inclusion? https://github.com/munin-monitoring/contrib/

[1] https://github.com/nusenu/ansible-relayor

nusenu avatar Apr 06 '15 11:04 nusenu

Agreed, that would be useful.

I still have a refactoring of the codebase outstanding, will talk this through with a friend within the next two weeks I guess. Implementing multiple-socket support will be pretty straight forward then.

I guess upstream inclusion would be great, I've never looked into it, but I definately will.

mweinelt avatar Apr 06 '15 11:04 mweinelt

thanks for considering this

nusenu avatar Apr 07 '15 16:04 nusenu

This will probably result in multiple graphs being rendered, instead of aggregated graphs for some of the data.

Multiple nodes in a single graph:

  • Bandwidth
  • Dormant

Multiple graphs for each node:

  • Connections (five connection states)
  • Traffic (RX+TX)
  • Countries (quite a few countries
  • Flags (~15 possible flags for each node)

Current idea is to pass multiple instances in the environment variables for port and socket, separated by colons, like:

env.connectmethod port
env.port 9051:9052:9053:9054
env.connectmethod socket
env.socket /run/tor0/control:/run/tor1/control:/run/tor2/control:/run/tor3/control

Multigraph feature of munin looks interesting http://munin-monitoring.org/wiki/MultigraphSampleOutput

mweinelt avatar Apr 08 '15 22:04 mweinelt

Would be great if one could turn on a switch that says sum up all instances (appears as a single tor instance in the graphs). Since some might not even care single tor instance graphs - just "how well does server X perform?"

nusenu avatar Apr 29 '15 20:04 nusenu

I'm afraid to say this, but this won't happen. I'm not finding the time to further develop munin-tor as it is right now. I hope someone goes forward and forks this project.

Also: Starting from Debian Jessie my munin instance did not properly upgrade and it constantly throws errors in the journal and I haven't even had time to figure that out.

systemd[1]: munin-node.service start operation timed out. Terminating.
systemd[1]: Failed to start Munin Node.
systemd[1]: Unit munin-node.service entered failed state.
systemd[1]: munin-node.service holdoff time over, scheduling restart.
systemd[1]: Stopping Munin Node...
systemd[1]: Starting Munin Node...
munin-node[3976]: Pid_file "/var/run/munin/node_linuxlounge.net.pid" already exists.  Overwriting!
systemd[1]: PID file /run/munin/munin-node.pid not readable (yet?) after start.

I'm sorry for getting your hopes up.

mweinelt avatar May 31 '15 20:05 mweinelt