Projet

Général

Profil

Révision 6df2ce23

ID6df2ce234039b907d12459d75436d31bb803d127
Parent d33f5b31
Enfant 071b1cac

Ajouté par Lasse Karstensen il y a presque 14 ans

Add a simple graph testing plugin, and use critical instead of alarm

Voir les différences:

tools/munin-node-from-hell/README.rst
10 10
Current features controlled via config file:
11 11

  
12 12
* Respond slowly or never to queries.
13
* Have plugins that always are in warning or alarm.
14
* Extensive number of plugins.
13
* Have plugins that always are in warning or critical.
14
* Extensive number of plugins runnint at once.
15 15
* Run on multiple ports at the same time, to test huge amounts of clients.
16 16

  
17 17

  
tools/munin-node-from-hell/basic.conf
1
# 
2
# Initialise plugins that test the basic functions of Munin.
3
#
4
# 
5

  
6
[instance:basic]
7
pluginprofile = basic
8
port = 4000
9

  
10
[pluginprofile:basic]
11
plugins = always_warning, always_critical, graph_area
12

  
13
[base]
14
# when building an example config with --muninconf, what hostname to output.
15
hostname = localhost
tools/munin-node-from-hell/muninnode-from-hell
91 91
        return """graph_title Always in warning
92 92
graph_vlabel Level
93 93
graph_scale no
94
graph_info A simple graph that is always in warning or alarm
94
graph_info A simple graph that is always in warning or critical
95 95
graph_category active_notification
96 96
generic.label Level
97 97
generic.info Level usually above warning level
......
99 99
generic.crit 10"""
100 100
modules["always_warning"] = always_warning()
101 101

  
102
class always_alarm(always_warning):
102
class always_critical(always_warning):
103 103
    def fetch(self, conf):
104 104
        return "generic.value 20"
105
modules["always_alarm"] = always_alarm()
105
modules["always_critical"] = always_critical()
106

  
107
class graph_area(MuninPlugin):
108
    "A plugin that uses STACK and AREA. From proc_pri. Use: testing the grapher"
109
    def fetch(self, conf):
110
        return """high.value 3
111
        low.value 2
112
        locked.value 1"""
113

  
114
    def config(self, conf):
115
        return """graph_title AREA and STACK
116
graph_order low high locked
117
graph_category graphtes t
118
graph_info This graph shows nuber of processes at each priority
119
graph_args --base 1000 -l 0
120
graph_vlabel Number of processes
121
high.label high priority
122
high.draw STACK
123
high.info The number of high-priority processes (tasks)
124
low.label low priority
125
low.draw AREA
126
low.info The number of low-priority processes (tasks)
127
locked.label locked in memory
128
locked.draw STACK
129
locked.info The number of processes that have pages locked into memory (for real-time and custom IO)
130
"""
131
modules["graph_area"] = graph_area()
106 132

  
107 133

  
108 134
class ArgumentTCPserver(SocketServer.ThreadingTCPServer):
tools/munin-node-from-hell/notifications.conf
12 12
#port = 4940
13 13
#sleepyness = 30
14 14
[pluginprofile:notif]
15
plugins = always_warning, always_alarm
15
plugins = always_warning, always_critical
16 16

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

Formats disponibles : Unified diff