-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
183 lines (125 loc) · 4.59 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
=================================
Muninwalk Readme
================================
Masahito Zembutsu (@zembutsu)
http://github.com/zembutsu/
* What is 'muninwalk'?
Muninwalk is CLI(Command-Line interface for Munin). This behavior like snmpwalk.
A difference of snmpwalk is to collect data from munin-node(TCP Port4949).
This tool written in perl will be useful for your operation.
Munin is a a networked resource monitoring tool.
http://munin-monitoring.org/
muninwalk の日本語ドキュメントは、こちらのエントリをご覧下さい。
http://pocketstudio.jp/log3/2012/04/13/muninwalk_and_muninget/
* Requirements
- OS: Linux
- Perl 5.x
-- Modules IO::Socket and Time::HiRes
- munin-node
I'm now developing on Red Hat Enteprise Linux 5.
* Usage
Most of muninwalk and muninget are the same structure,
but roles are different.
- muninwalk - to collect the several information of one host
- muninget - continue collecting one information from sevral hosts
$ muninwalk
No hostname specified.
USAGE: muninwalk <HOSTNAME[:PORT]> COMMAND [COMMAND...] [OPTION]
Version: 0.0.1
Github: http://github.com/zembutsu/
Web: http://pocketstudio.jp/
Email: [email protected]
COMMAND:
list display node enable plugins
nodes dispaly nodes
<plugins names> fetch data
version display munin-node's version
walk walkmode (fetch all plugins data)
OPTION:
-c[char] change delimiter
-d debug mode
-h display this help message
-v version
-z zabbix integrate mode
You must spcified target host, then you can see plugins name.
$ muninwalk localhost
acpi apache_accesses apache_processes .... yum
This is as same as 'LIST' over munin protocol.
Please, type 'walk'. It's typically working.
This is original mode for munin that get LIST and Fetching all data.
$ muninwalk localhost walk
## WALKMODE ##
localhost::acpi.* = proc
localhost::apache_accesses.accesses80 = 16023636
localhost::apache_processes.busy80 = 2
localhost::apache_processes.idle80 = 14
localhost::apache_processes.free80 = 1240
localhost::apache_volume.volume80 = 218319014912
localhost::cpu.user = 102389306
localhost::cpu.nice = 40457009
localhost::cpu.system = 22013272
(snip)
If you want to get a value of Load Average,
$ muninwalk localhost load
localhost::load.load = 0.28
If you want to get a value of Load Average and cpu status,
$ muninwalk localhost load cpu
localhost::load.load = 0.28
localhost::cpu.user = 102390872
localhost::cpu.nice = 40457009
localhost::cpu.system = 22013642
localhost::cpu.idle = 1975949071
localhost::cpu.iowait = 49672118
localhost::cpu.irq = 262710
localhost::cpu.softirq = 1496958
localhost::cpu.steal = 0
The case, you want to check only 'cpu.iowait':
$ muninwalk localhost cpu.iowait
localhost::cpu.iowait = 49672379
Note: 'watch' comannd might be helpls you.
$ muninget
No hostname specified.
USAGE: muninget <HOSTNAME[:PORT]> COMMAND [COMMAND...] [OPTION]
Version: 0.0.1
Github: http://github.com/zembutsu/
Web: http://pocketstudio.jp/
Email: [email protected]
COMMAND:
list display enable plugins
nodes dispaly nodes
<plugins names> fetch data
version display version
OPTION:
-c[char] change delimiter
-d debug mode
-h display this help message
-v version
If you want to continue collecting data (ex, load),
$ muninget localhost load
12/04/11 21:41:06.084646::localhost::load.load = 0.16
12/04/11 21:41:07.136572::localhost::load.load = 0.16
'Ctrl+C' can stop this script.
Do you need several hosts data? (ex, hostname node1 and node2 )
$ muninget node1,node2 load
12/04/11 21:42:51.895727::node1::load.load = 0.67
12/04/11 21:42:51.946590::node2::load.load = 0.13
12/04/11 21:42:53.000443::node1::load.load = 0.66
12/04/11 21:42:53.051397::node2::load.load = 0.13
If you want to change loop interval, you should use '-s' option.
$ munin node1,node2 load -s0.5 (-s<sec>)
12/04/11 21:44:55.674071::node1::load.load = 0.57
12/04/11 21:44:55.724940::node2::load.load = 0.12
12/04/11 21:44:56.280103::node1::load.load = 0.57
12/04/11 21:44:56.331063::node2::load.load = 0.12
* Use case
- network and server operation
- debugging munin plugins
* Known bug's
- not support hierarchization munin plugins
* Tasks/Plans
- support hierachization munin plugins
- formatting output ( for human readable )
* Feedback
- welcome!
* History
Apr 11, 2011 1st release.