mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Add a simple graph testing plugin, and use critical instead of alarm
This commit is contained in:
parent
d33f5b319f
commit
6df2ce2340
@ -10,8 +10,8 @@ stuff we do at http://hostedmunin.com/ . Use it as you feel fit :)
|
||||
Current features controlled via config file:
|
||||
|
||||
* Respond slowly or never to queries.
|
||||
* Have plugins that always are in warning or alarm.
|
||||
* Extensive number of plugins.
|
||||
* Have plugins that always are in warning or critical.
|
||||
* Extensive number of plugins runnint at once.
|
||||
* Run on multiple ports at the same time, to test huge amounts of clients.
|
||||
|
||||
|
||||
|
15
tools/munin-node-from-hell/basic.conf
Normal file
15
tools/munin-node-from-hell/basic.conf
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Initialise plugins that test the basic functions of Munin.
|
||||
#
|
||||
#
|
||||
|
||||
[instance:basic]
|
||||
pluginprofile = basic
|
||||
port = 4000
|
||||
|
||||
[pluginprofile:basic]
|
||||
plugins = always_warning, always_critical, graph_area
|
||||
|
||||
[base]
|
||||
# when building an example config with --muninconf, what hostname to output.
|
||||
hostname = localhost
|
@ -91,7 +91,7 @@ class always_warning(MuninPlugin):
|
||||
return """graph_title Always in warning
|
||||
graph_vlabel Level
|
||||
graph_scale no
|
||||
graph_info A simple graph that is always in warning or alarm
|
||||
graph_info A simple graph that is always in warning or critical
|
||||
graph_category active_notification
|
||||
generic.label Level
|
||||
generic.info Level usually above warning level
|
||||
@ -99,10 +99,36 @@ generic.warn 5
|
||||
generic.crit 10"""
|
||||
modules["always_warning"] = always_warning()
|
||||
|
||||
class always_alarm(always_warning):
|
||||
class always_critical(always_warning):
|
||||
def fetch(self, conf):
|
||||
return "generic.value 20"
|
||||
modules["always_alarm"] = always_alarm()
|
||||
modules["always_critical"] = always_critical()
|
||||
|
||||
class graph_area(MuninPlugin):
|
||||
"A plugin that uses STACK and AREA. From proc_pri. Use: testing the grapher"
|
||||
def fetch(self, conf):
|
||||
return """high.value 3
|
||||
low.value 2
|
||||
locked.value 1"""
|
||||
|
||||
def config(self, conf):
|
||||
return """graph_title AREA and STACK
|
||||
graph_order low high locked
|
||||
graph_category graphtes t
|
||||
graph_info This graph shows nuber of processes at each priority
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel Number of processes
|
||||
high.label high priority
|
||||
high.draw STACK
|
||||
high.info The number of high-priority processes (tasks)
|
||||
low.label low priority
|
||||
low.draw AREA
|
||||
low.info The number of low-priority processes (tasks)
|
||||
locked.label locked in memory
|
||||
locked.draw STACK
|
||||
locked.info The number of processes that have pages locked into memory (for real-time and custom IO)
|
||||
"""
|
||||
modules["graph_area"] = graph_area()
|
||||
|
||||
|
||||
class ArgumentTCPserver(SocketServer.ThreadingTCPServer):
|
||||
|
@ -12,7 +12,7 @@ port = 3000
|
||||
#port = 4940
|
||||
#sleepyness = 30
|
||||
[pluginprofile:notif]
|
||||
plugins = always_warning, always_alarm
|
||||
plugins = always_warning, always_critical
|
||||
|
||||
[base]
|
||||
# when building an example config with --muninconf, what hostname to output.
|
||||
|
Loading…
Reference in New Issue
Block a user