Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/emc/emc_vnx_block_lun_perfdata | ||
|---|---|---|
| 2 | 2 |
|
| 3 | 3 |
: <<=cut |
| 4 | 4 |
|
| 5 |
=head1 NAME
|
|
| 5 |
=head1 NAME |
|
| 6 | 6 |
|
| 7 | 7 |
emc_vnx_block_lun_perfdata - Plugin to monitor Block statistics of EMC VNX 5300 |
| 8 | 8 |
Unified Storage Processors |
| ... | ... | |
| 23 | 23 |
=head1 DESCRIPTION |
| 24 | 24 |
|
| 25 | 25 |
The plugin monitors LUN of EMC Unified Storage FLARE SP's. Probably it can also |
| 26 |
be compatible with other Clariion systems. It uses SSH to connect to Control
|
|
| 27 |
Stations, then remotely executes /nas/sbin/navicli and fetches and parses data
|
|
| 26 |
be compatible with other Clariion systems. It uses SSH to connect to Control |
|
| 27 |
Stations, then remotely executes /nas/sbin/navicli and fetches and parses data |
|
| 28 | 28 |
from it. Obviously, it's easy to reconfigure plugin not to use Control Stations' |
| 29 |
navicli in favor of using locally installed /opt/Navisphere's cli. There is no
|
|
| 30 |
difference which Storage Processor to use to gather data, so this plugin tries
|
|
| 31 |
both of them and uses the first active one. This plugin also automatically
|
|
| 32 |
chooses Primary Control Station from the list by calling /nasmcd/sbin/getreason
|
|
| 29 |
navicli in favor of using locally installed /opt/Navisphere's cli. There is no |
|
| 30 |
difference which Storage Processor to use to gather data, so this plugin tries |
|
| 31 |
both of them and uses the first active one. This plugin also automatically |
|
| 32 |
chooses Primary Control Station from the list by calling /nasmcd/sbin/getreason |
|
| 33 | 33 |
and /nasmcd/sbin/t2slot. |
| 34 |
|
|
| 35 |
I left some parts of this plugin as rudimental to make easy to reconfigure it
|
|
| 34 |
|
|
| 35 |
I left some parts of this plugin as rudimental to make easy to reconfigure it |
|
| 36 | 36 |
to draw more (or less) data. |
| 37 | 37 |
|
| 38 | 38 |
The plugin has been tested in the following Operating Environment (OE): |
| ... | ... | |
| 41 | 41 |
|
| 42 | 42 |
=head1 COMPATIBILITY |
| 43 | 43 |
|
| 44 |
The plugin has been written for being compatible with EMC VNX5300 Storage
|
|
| 45 |
system, as this is the only EMC storage which i have. By the way, i am pretty
|
|
| 46 |
sure it can also work with other VNX1 storages, like VNX5100 and VNX5500, and
|
|
| 44 |
The plugin has been written for being compatible with EMC VNX5300 Storage |
|
| 45 |
system, as this is the only EMC storage which i have. By the way, i am pretty |
|
| 46 |
sure it can also work with other VNX1 storages, like VNX5100 and VNX5500, and |
|
| 47 | 47 |
old-style Clariion systems. |
| 48 |
About VNX2 series, i don't know whether the plugin will be able to work with
|
|
| 49 |
them. Maybe it would need some corrections in command-line backend. The same
|
|
| 50 |
situation is with other EMC systems, so i encourage you to try and fix the
|
|
| 51 |
plugin.
|
|
| 52 |
|
|
| 48 |
About VNX2 series, i don't know whether the plugin will be able to work with |
|
| 49 |
them. Maybe it would need some corrections in command-line backend. The same |
|
| 50 |
situation is with other EMC systems, so i encourage you to try and fix the |
|
| 51 |
plugin. |
|
| 52 |
|
|
| 53 | 53 |
=head1 LIST OF GRAPHS |
| 54 | 54 |
|
| 55 | 55 |
Graph category Disk: |
| ... | ... | |
| 70 | 70 |
First of all, be sure that statistics collection is turned on. You can do this |
| 71 | 71 |
by typing: |
| 72 | 72 |
navicli -h spa setstats -on |
| 73 |
on your Control Station or locally through /opt/Navisphere
|
|
| 73 |
on your Control Station or locally through /opt/Navisphere |
|
| 74 | 74 |
|
| 75 |
Also, the plugin actively uses buggy "cdef" feature of Munin 2.0, and here we
|
|
| 75 |
Also, the plugin actively uses buggy "cdef" feature of Munin 2.0, and here we |
|
| 76 | 76 |
can be hit by the following bugs: |
| 77 |
http://munin-monitoring.org/ticket/1017 - Here I have some workarounds in the
|
|
| 77 |
http://munin-monitoring.org/ticket/1017 - Here I have some workarounds in the |
|
| 78 | 78 |
plugin, be sure that they are working. |
| 79 |
http://munin-monitoring.org/ticket/1352 - Metrics in my plugin can be much
|
|
| 79 |
http://munin-monitoring.org/ticket/1352 - Metrics in my plugin can be much |
|
| 80 | 80 |
longer than 15 characters. |
| 81 | 81 |
Without these workarounds "Load" and "Queue Length" would not work. |
| 82 | 82 |
|
| 83 | 83 |
=head2 Installation |
| 84 | 84 |
|
| 85 |
The plugin uses SSH to connect to Control Stations. It's possible to use
|
|
| 85 |
The plugin uses SSH to connect to Control Stations. It's possible to use |
|
| 86 | 86 |
'nasadmin' user, but it would be better if you create read-only global user by |
| 87 |
Unisphere Client. The user should have only Operator role.
|
|
| 88 |
I created "operator" user but due to the fact that Control Stations already
|
|
| 89 |
had one internal "operator" user, the new one was called "operator1". So be
|
|
| 87 |
Unisphere Client. The user should have only Operator role. |
|
| 88 |
I created "operator" user but due to the fact that Control Stations already |
|
| 89 |
had one internal "operator" user, the new one was called "operator1". So be |
|
| 90 | 90 |
careful. After that, copy .bash_profile from /home/nasadmin to a newly created |
| 91 | 91 |
/home/operator1. |
| 92 |
|
|
| 93 |
On munin-node side choose a user which will be used to connect through SSH.
|
|
| 94 |
Generally user "munin" is ok. Then, execute "sudo su munin -s /bin/bash",
|
|
| 95 |
"ssh-keygen" and "ssh-copy-id" to both Control Stations with newly created
|
|
| 92 |
|
|
| 93 |
On munin-node side choose a user which will be used to connect through SSH. |
|
| 94 |
Generally user "munin" is ok. Then, execute "sudo su munin -s /bin/bash", |
|
| 95 |
"ssh-keygen" and "ssh-copy-id" to both Control Stations with newly created |
|
| 96 | 96 |
user. |
| 97 |
|
|
| 98 |
Make a link from /usr/share/munin/plugins/emc_vnx_dm_basic_stats to
|
|
| 99 |
/etc/munin/plugins/emc_vnx_dm_basic_stats_<NAME>, where <NAME> is any
|
|
| 100 |
arbitrary name of your storage system. The plugin will return <NAME> in its
|
|
| 97 |
|
|
| 98 |
Make a link from /usr/share/munin/plugins/emc_vnx_dm_basic_stats to |
|
| 99 |
/etc/munin/plugins/emc_vnx_dm_basic_stats_<NAME>, where <NAME> is any |
|
| 100 |
arbitrary name of your storage system. The plugin will return <NAME> in its |
|
| 101 | 101 |
answer as "host_name" field. |
| 102 |
|
|
| 102 |
|
|
| 103 | 103 |
For example, assume your storage system is called "VNX5300". |
| 104 |
Make a configuration file at
|
|
| 104 |
Make a configuration file at |
|
| 105 | 105 |
/etc/munin/plugin-conf.d/emc_vnx_block_lun_perfdata_VNX5300. For example: |
| 106 |
|
|
| 106 |
|
|
| 107 | 107 |
[emc_vnx_block_lun_perfdata_VNX5300] |
| 108 |
user munin
|
|
| 108 |
user munin |
|
| 109 | 109 |
env.username operator1 |
| 110 |
env.cs_addr 192.168.1.1 192.168.1.2
|
|
| 110 |
env.cs_addr 192.168.1.1 192.168.1.2 |
|
| 111 | 111 |
|
| 112 | 112 |
or: |
| 113 | 113 |
|
| 114 | 114 |
[emc_vnx_block_lun_perfdata_VNX5300] |
| 115 |
user munin
|
|
| 115 |
user munin |
|
| 116 | 116 |
env.username operator1 |
| 117 | 117 |
env.localcli /opt/Navisphere/bin/naviseccli |
| 118 | 118 |
env.sp_addr 192.168.0.3 192.168.0.4 |
| 119 | 119 |
env.blockpw foobar |
| 120 | 120 |
|
| 121 |
Where:
|
|
| 121 |
Where: |
|
| 122 | 122 |
user - SSH Client local user |
| 123 | 123 |
env.username - Remote user with Operator role for Block or File part |
| 124 | 124 |
env.cs_addr - Control Stations addresses for remote (indirect) access. |
| 125 |
env.localcli - Optional. Path of localhost 'Naviseccli' binary. If this
|
|
| 125 |
env.localcli - Optional. Path of localhost 'Naviseccli' binary. If this |
|
| 126 | 126 |
variable is set, env.cs_addr is ignored, and local 'navicli' is used. |
| 127 | 127 |
Requires env.blockpw variable. |
| 128 |
env.sp_addr - Default is "SPA SPB". In case of "direct" connection to
|
|
| 128 |
env.sp_addr - Default is "SPA SPB". In case of "direct" connection to |
|
| 129 | 129 |
Storage Processors, their addresses/hostnames are written here. |
| 130 | 130 |
env.blockpw - Password for connecting to Storage Processors |
| 131 | 131 |
|
| 132 | 132 |
=head1 ERRATA |
| 133 | 133 |
|
| 134 |
It counts Queue Length in not fully correct way. We take parameters totally
|
|
| 134 |
It counts Queue Length in not fully correct way. We take parameters totally |
|
| 135 | 135 |
from both SP's, but after we divide them independently by load of SPA and SPB. |
| 136 | 136 |
Anyway, in most AAA / ALUA cases the formula is correct. |
| 137 | 137 |
|
| ... | ... | |
| 165 | 165 |
NAVICLI="/nas/sbin/navicli" |
| 166 | 166 |
fi |
| 167 | 167 |
|
| 168 |
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station.
|
|
| 168 |
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station. |
|
| 169 | 169 |
ssh_check_cmd() {
|
| 170 | 170 |
ssh -q "$username@$1" "/nasmcd/sbin/getreason | grep -w \"slot_\$(/nasmcd/sbin/t2slot)\" | cut -d- -f1 | awk '{print \$1}' "
|
| 171 | 171 |
} |
| ... | ... | |
| 253 | 253 |
echo |
| 254 | 254 |
|
| 255 | 255 |
if [ "$1" = "config" ] ; then |
| 256 |
cat <<-EOF
|
|
| 256 |
cat <<-EOF |
|
| 257 | 257 |
multigraph emc_vnx_block_blocks |
| 258 | 258 |
graph_category disk |
| 259 | 259 |
graph_title EMC VNX 5300 LUN Blocks |
| ... | ... | |
| 263 | 263 |
|
| 264 | 264 |
while read -r LUN ; do |
| 265 | 265 |
LUN="$(clean_fieldname "$LUN")" |
| 266 |
cat <<-EOF
|
|
| 266 |
cat <<-EOF |
|
| 267 | 267 |
${LUN}_read.label none
|
| 268 | 268 |
${LUN}_read.graph no
|
| 269 | 269 |
${LUN}_read.min 0
|
| ... | ... | |
| 304 | 304 |
multigraph emc_vnx_block_ticks |
| 305 | 305 |
graph_category disk |
| 306 | 306 |
graph_title EMC VNX 5300 Counted Load per LUN |
| 307 |
graph_vlabel Load, % * Number of LUNs
|
|
| 308 |
graph_args --base 1000 -l 0 -r
|
|
| 307 |
graph_vlabel Load, % * Number of LUNs |
|
| 308 |
graph_args --base 1000 -l 0 -r |
|
| 309 | 309 |
EOF |
| 310 | 310 |
echo -n "graph_order " |
| 311 | 311 |
while read -r LUN ; do |
| ... | ... | |
| 332 | 332 |
${LUN}_idleticks_spb.label $LUN Idle Ticks SPB
|
| 333 | 333 |
${LUN}_idleticks_spb.type COUNTER
|
| 334 | 334 |
${LUN}_idleticks_spb.graph no
|
| 335 |
${LUN}_load_spa.label $LUN load SPA
|
|
| 335 |
${LUN}_load_spa.label $LUN load SPA
|
|
| 336 | 336 |
${LUN}_load_spa.draw AREASTACK
|
| 337 | 337 |
${LUN}_load_spb.label $LUN load SPB
|
| 338 | 338 |
${LUN}_load_spb.draw AREASTACK
|
| ... | ... | |
| 342 | 342 |
done <<< "$LUNLIST" |
| 343 | 343 |
|
| 344 | 344 |
cat <<-EOF |
| 345 |
|
|
| 345 |
|
|
| 346 | 346 |
multigraph emc_vnx_block_outstanding |
| 347 | 347 |
graph_category disk |
| 348 | 348 |
graph_title EMC VNX 5300 Sum of Outstanding Requests |
| ... | ... | |
| 351 | 351 |
EOF |
| 352 | 352 |
while read -r LUN ; do |
| 353 | 353 |
LUN="$(clean_fieldname "$LUN")" |
| 354 |
cat <<-EOF
|
|
| 354 |
cat <<-EOF |
|
| 355 | 355 |
${LUN}_outstandsum.label $LUN
|
| 356 | 356 |
${LUN}_outstandsum.type COUNTER
|
| 357 | 357 |
EOF |
| 358 | 358 |
done <<< "$LUNLIST" |
| 359 | 359 |
|
| 360 | 360 |
cat <<-EOF |
| 361 |
|
|
| 361 |
|
|
| 362 | 362 |
multigraph emc_vnx_block_nonzeroreq |
| 363 | 363 |
graph_category disk |
| 364 | 364 |
graph_title EMC VNX 5300 Non-Zero Request Count Arrivals |
| ... | ... | |
| 392 | 392 |
|
| 393 | 393 |
multigraph emc_vnx_block_queue |
| 394 | 394 |
graph_category disk |
| 395 |
graph_title EMC VNX 5300 Counted Block Queue Length
|
|
| 395 |
graph_title EMC VNX 5300 Counted Block Queue Length |
|
| 396 | 396 |
graph_vlabel Length |
| 397 | 397 |
EOF |
| 398 | 398 |
while read -r LUN ; do |
| ... | ... | |
| 451 | 451 |
cat <<-EOF |
| 452 | 452 |
${SPclean}_total_busyticks.label ${SP}
|
| 453 | 453 |
${SPclean}_total_busyticks.graph no
|
| 454 |
${SPclean}_total_busyticks.type COUNTER
|
|
| 454 |
${SPclean}_total_busyticks.type COUNTER
|
|
| 455 | 455 |
${SPclean}_total_bt.label ${SP}
|
| 456 | 456 |
${SPclean}_total_bt.graph no
|
| 457 |
${SPclean}_total_bt.type COUNTER
|
|
| 457 |
${SPclean}_total_bt.type COUNTER
|
|
| 458 | 458 |
${SPclean}_total_idleticks.label ${SP}
|
| 459 | 459 |
${SPclean}_total_idleticks.graph no
|
| 460 | 460 |
${SPclean}_total_idleticks.type COUNTER
|
| ... | ... | |
| 469 | 469 |
#BIGCMD="$SSH" |
| 470 | 470 |
while read -r LUN ; do |
| 471 | 471 |
FILTERLUN="$(clean_fieldname "$LUN")" |
| 472 |
BIGCMD+="$NAVICLI lun -list -name $LUN -perfData |
|
|
| 473 |
sed -ne 's/^Blocks Read\:\ */${FILTERLUN}_read.value /p;
|
|
| 472 |
BIGCMD+="$NAVICLI lun -list -name $LUN -perfData | |
|
| 473 |
sed -ne 's/^Blocks Read\:\ */${FILTERLUN}_read.value /p;
|
|
| 474 | 474 |
s/^Blocks Written\:\ */${FILTERLUN}_write.value /p;
|
| 475 | 475 |
s/Read Requests\:\ */${FILTERLUN}_readreq.value /p;
|
| 476 | 476 |
s/Write Requests\:\ */${FILTERLUN}_writereq.value /p;
|
Formats disponibles : Unified diff