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/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):

Formats disponibles : Unified diff