Skip to content

Commit

Permalink
Merge pull request #68 from lkarsten/master
Browse files Browse the repository at this point in the history
Minor changes to munin-node-from-hell
  • Loading branch information
kenyon committed Mar 17, 2012
2 parents c398f85 + 164f6c8 commit 7287e9d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tools/munin-node-from-hell/basic.conf
Expand Up @@ -5,10 +5,10 @@

[instance:basic]
pluginprofile = basic
port = 4000
port = 4001

[pluginprofile:basic]
plugins = always_warning, always_critical, graph_area
plugins = graph_area

[base]
# when building an example config with --muninconf, what hostname to output.
Expand Down
14 changes: 14 additions & 0 deletions tools/munin-node-from-hell/huge.conf
@@ -0,0 +1,14 @@
#
# Quick estimate says 30 plugins is a good estimate for a common client.
#

[instance:huge]
pluginprofile = huge
portrange = 4000-4100

[pluginprofile:huge]
plugins = load, locks, load, locks, load, locks, load, locks, load, locks, load, locks, load, locks, load, locks ,load, locks, load, locks, load, locks, load, locks ,load, locks, load, locks, load, locks, load, locks

[base]
# when building an example config with --muninconf, what hostname to output.
hostname = localhost
13 changes: 9 additions & 4 deletions tools/munin-node-from-hell/muninnode-from-hell
Expand Up @@ -264,7 +264,7 @@ def start_servers(instances):


def usage():
print "Usage: %s [--run] [--verbose] [--muninconf] <configfile>" % sys.argv[0]
print "Usage: %s [--run] [--verbose] [--muninconf] <configfile> <configfileN>" % sys.argv[0]

def main():
if len(sys.argv) <= 2:
Expand All @@ -276,7 +276,12 @@ def main():
verbose = True

config = ConfigParser.RawConfigParser()
config.read(sys.argv[-1])
for configfile in sys.argv[1:]:
if not configfile.endswith(".conf"):
continue
if verbose:
print "Reading config file %s" % configfile
config.read(configfile)

instancekeys = [ key for key in config.sections() if key.startswith("instance:") ]
servers = {}
Expand Down Expand Up @@ -330,14 +335,14 @@ def main():
instanceconfig[k] = v

instanceconfig["plugins"] = plugins
if "--verbose" in sys.argv:
instanceconfig["verbose"] = True
instanceconfig["verbose"] = verbose

instanceconfig["name"] = "%s-%s" % (instancename, portinstance)
instanceconfig["expanded_port"] = portinstance

instances.append(instanceconfig)
# XXX: need to store what handlers we should have.
print instances

# output sample munin config for the poller
if "--muninconf" in sys.argv:
Expand Down
2 changes: 1 addition & 1 deletion tools/munin-node-from-hell/notifications.conf
Expand Up @@ -5,7 +5,7 @@

[instance:notifications]
pluginprofile = notif
port = 3000
port = 4010

#
#[instance:baz]
Expand Down
5 changes: 1 addition & 4 deletions tools/munin-node-from-hell/tarpit.conf
Expand Up @@ -3,14 +3,11 @@

[instance:tarpit]
pluginprofile = tarpit
port = 3000
port = 4005

[pluginprofile:tarpit]
plugins = load, locks, tarpit, load, locks

[pluginprofile:base]
plugins = load, locks, locks, load, load, locks, locks, load, load, load

[base]
# when building an example config with --muninconf, what hostname to output.
hostname = localhost

0 comments on commit 7287e9d

Please sign in to comment.