root / plugins / emc / emc_vnx_block_lun_perfdata @ fe330bab
Historique | Voir | Annoter | Télécharger (16,9 ko)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
: <<=cut |
| 4 |
|
| 5 |
=head1 NAME |
| 6 |
|
| 7 |
emc_vnx_block_lun_perfdata - Plugin to monitor Block statistics of EMC VNX 5300 |
| 8 |
Unified Storage Processors |
| 9 |
|
| 10 |
=head1 AUTHOR |
| 11 |
|
| 12 |
Evgeny Beysembaev <megabotva@gmail.com> |
| 13 |
|
| 14 |
=head1 LICENSE |
| 15 |
|
| 16 |
GPLv2 |
| 17 |
|
| 18 |
=head1 MAGIC MARKERS |
| 19 |
|
| 20 |
#%# family=auto |
| 21 |
#%# capabilities=autoconf |
| 22 |
|
| 23 |
=head1 DESCRIPTION |
| 24 |
|
| 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 |
| 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 |
| 33 |
and /nasmcd/sbin/t2slot. |
| 34 |
|
| 35 |
I left some parts of this plugin as rudimental to make easy to reconfigure it |
| 36 |
to draw more (or less) data. |
| 37 |
|
| 38 |
The plugin has been tested in the following Operating Environment (OE): |
| 39 |
File Version T7.1.76.4 |
| 40 |
Block Revision 05.32.000.5.215 |
| 41 |
|
| 42 |
=head1 COMPATIBILITY |
| 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 |
| 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 |
|
| 53 |
=head1 LIST OF GRAPHS |
| 54 |
|
| 55 |
Graph category Disk: |
| 56 |
EMC VNX 5300 LUN Blocks |
| 57 |
EMC VNX 5300 LUN Requests |
| 58 |
EMC VNX 5300 Counted Load per LUN |
| 59 |
EMC VNX 5300 Sum of Outstanding Requests |
| 60 |
EMC VNX 5300 Non-Zero Request Count Arrivals |
| 61 |
EMC VNX 5300 Trespasses |
| 62 |
EMC VNX 5300 Counted Block Queue Length |
| 63 |
EMC VNX 5300 Counted Load per SP |
| 64 |
|
| 65 |
|
| 66 |
=head1 CONFIGURATION |
| 67 |
|
| 68 |
=head2 Prerequisites |
| 69 |
|
| 70 |
First of all, be sure that statistics collection is turned on. You can do this |
| 71 |
by typing: |
| 72 |
navicli -h spa setstats -on |
| 73 |
on your Control Station or locally through /opt/Navisphere |
| 74 |
|
| 75 |
Also, the plugin actively uses buggy "cdef" feature of Munin 2.0, and here we |
| 76 |
can be hit by the following bugs: |
| 77 |
http://munin-monitoring.org/ticket/1017 - Here I have some workarounds in the |
| 78 |
plugin, be sure that they are working. |
| 79 |
http://munin-monitoring.org/ticket/1352 - Metrics in my plugin can be much |
| 80 |
longer than 15 characters. |
| 81 |
Without these workarounds "Load" and "Queue Length" would not work. |
| 82 |
|
| 83 |
=head2 Installation |
| 84 |
|
| 85 |
The plugin uses SSH to connect to Control Stations. It's possible to use |
| 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 |
| 90 |
careful. After that, copy .bash_profile from /home/nasadmin to a newly created |
| 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 |
| 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 |
| 101 |
answer as "host_name" field. |
| 102 |
|
| 103 |
For example, assume your storage system is called "VNX5300". |
| 104 |
Make a configuration file at |
| 105 |
/etc/munin/plugin-conf.d/emc_vnx_block_lun_perfdata_VNX5300. For example: |
| 106 |
|
| 107 |
[emc_vnx_block_lun_perfdata_VNX5300] |
| 108 |
user munin |
| 109 |
env.username operator1 |
| 110 |
env.cs_addr 192.168.1.1 192.168.1.2 |
| 111 |
|
| 112 |
or: |
| 113 |
|
| 114 |
[emc_vnx_block_lun_perfdata_VNX5300] |
| 115 |
user munin |
| 116 |
env.username operator1 |
| 117 |
env.localcli /opt/Navisphere/bin/naviseccli |
| 118 |
env.sp_addr 192.168.0.3 192.168.0.4 |
| 119 |
env.blockpw foobar |
| 120 |
|
| 121 |
Where: |
| 122 |
user - SSH Client local user |
| 123 |
env.username - Remote user with Operator role for Block or File part |
| 124 |
env.cs_addr - Control Stations addresses for remote (indirect) access. |
| 125 |
env.localcli - Optional. Path of localhost 'Naviseccli' binary. If this |
| 126 |
variable is set, env.cs_addr is ignored, and local 'navicli' is used. |
| 127 |
Requires env.blockpw variable. |
| 128 |
env.sp_addr - Default is "SPA SPB". In case of "direct" connection to |
| 129 |
Storage Processors, their addresses/hostnames are written here. |
| 130 |
env.blockpw - Password for connecting to Storage Processors |
| 131 |
|
| 132 |
=head1 ERRATA |
| 133 |
|
| 134 |
It counts Queue Length in not fully correct way. We take parameters totally |
| 135 |
from both SP's, but after we divide them independently by load of SPA and SPB. |
| 136 |
Anyway, in most AAA / ALUA cases the formula is correct. |
| 137 |
|
| 138 |
=head1 HISTORY |
| 139 |
|
| 140 |
09.11.2016 - First Release |
| 141 |
26.12.2016 - Compatibility with Munin coding style |
| 142 |
|
| 143 |
=cut |
| 144 |
|
| 145 |
export LANG=C |
| 146 |
|
| 147 |
. "$MUNIN_LIBDIR/plugins/plugin.sh" |
| 148 |
|
| 149 |
cs_addr="${cs_addr:=""}"
|
| 150 |
username="${username:=""}"
|
| 151 |
blockpw="${blockpw:=""}"
|
| 152 |
|
| 153 |
TARGET=$(echo "${0##*/}" | cut -d _ -f 6)
|
| 154 |
|
| 155 |
# "All Storage Processors we have" |
| 156 |
if [[ -v "sp_addr" ]]; then |
| 157 |
SPALL=$sp_addr |
| 158 |
else |
| 159 |
SPALL="SPA SPB" |
| 160 |
fi |
| 161 |
# "navicli" command. Can be local or remote, through Control Stations |
| 162 |
if [[ -v "localcli" ]]; then |
| 163 |
NAVICLI=$localcli |
| 164 |
else |
| 165 |
NAVICLI="/nas/sbin/navicli" |
| 166 |
fi |
| 167 |
|
| 168 |
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station. |
| 169 |
ssh_check_cmd() {
|
| 170 |
ssh -q "$username@$1" '/nasmcd/sbin/getreason | grep -w "slot_$(/nasmcd/sbin/t2slot)" | cut -d- -f1' |
| 171 |
} |
| 172 |
|
| 173 |
|
| 174 |
check_conf_and_set_vars () {
|
| 175 |
if [ -z "$username" ]; then |
| 176 |
echo "No username ('username' environment variable)!"
|
| 177 |
return 1 |
| 178 |
fi |
| 179 |
|
| 180 |
if [ -z "$localcli" ]; then |
| 181 |
if [ -z "$cs_addr" ]; then |
| 182 |
echo "No control station addresses ('cs_addr' environment variable)!"
|
| 183 |
return 1 |
| 184 |
fi |
| 185 |
#Choosing Cotrol Station. Code have to be "10" |
| 186 |
for CS in $cs_addr; do |
| 187 |
if [[ "10" -eq "$(ssh_check_cmd $CS)" ]]; then |
| 188 |
PRIMARY_CS=$CS |
| 189 |
SSH="ssh -q $username@$PRIMARY_CS " |
| 190 |
break |
| 191 |
fi |
| 192 |
done |
| 193 |
|
| 194 |
if [ -z "$PRIMARY_CS" ]; then |
| 195 |
echo "No alive primary Control Station from list \"$cs_addr\""; |
| 196 |
return 1 |
| 197 |
fi |
| 198 |
else |
| 199 |
if [ ! -f "$localcli" ]; then |
| 200 |
echo "Local CLI is set, but no binary found at $localcli!" |
| 201 |
return 1 |
| 202 |
fi |
| 203 |
if [ -z "$blockpw" ]; then |
| 204 |
echo "No Password for Block Access ('blockpw' environment variable)!"
|
| 205 |
return 1 |
| 206 |
fi |
| 207 |
SSH="" |
| 208 |
NAVICLI="$localcli -User $username -Password $blockpw -Scope 0 " |
| 209 |
fi |
| 210 |
local probe_sp |
| 211 |
for probe_sp in $SPALL; do |
| 212 |
if $SSH $NAVICLI -h "$probe_sp" >/dev/null 2>&1; then |
| 213 |
StorageProcessor="$probe_sp" |
| 214 |
break |
| 215 |
fi |
| 216 |
done |
| 217 |
[ -z "$StorageProcessor" ] && echo "No active Storage Processor found!" && return 1 |
| 218 |
NAVICLI_NOSP="$NAVICLI -h" |
| 219 |
NAVICLI="$NAVICLI -h $StorageProcessor" |
| 220 |
return 0 |
| 221 |
} |
| 222 |
|
| 223 |
if [ "$1" = "autoconf" ]; then |
| 224 |
check_conf_ans=$(check_conf_and_set_vars) |
| 225 |
if [ $? -eq 0 ]; then |
| 226 |
echo "yes" |
| 227 |
else |
| 228 |
echo "no ($check_conf_ans)" |
| 229 |
fi |
| 230 |
exit 0 |
| 231 |
fi |
| 232 |
|
| 233 |
check_conf_and_set_vars 1>&2 || exit 1 |
| 234 |
|
| 235 |
run_remote() {
|
| 236 |
if [ -z "$SSH" ]; then |
| 237 |
eval "$@" |
| 238 |
else |
| 239 |
eval "$SSH" "\"$@\"" |
| 240 |
fi |
| 241 |
} |
| 242 |
|
| 243 |
run_navicli() {
|
| 244 |
|
| 245 |
run_remote "$NAVICLI" "$@" |
| 246 |
} |
| 247 |
|
| 248 |
run_navicli_both_sp() {
|
| 249 |
for SP in $SPALL; do |
| 250 |
run_remote "$NAVICLI_NOSP $SP" "$@" |
| 251 |
# echo "$NAVICLI_NOSP $SP" "$@" |
| 252 |
# echo "$NAVICLI_NOSP $SP" $@ |
| 253 |
|
| 254 |
done |
| 255 |
} |
| 256 |
|
| 257 |
# Get Lun List |
| 258 |
LUNLIST=$(run_navicli lun -list -drivetype | sed -ne 's/^Name:\ *//p' | sort) |
| 259 |
|
| 260 |
echo "host_name ${TARGET}"
|
| 261 |
echo |
| 262 |
|
| 263 |
if [ "$1" = "config" ] ; then |
| 264 |
cat <<-EOF |
| 265 |
multigraph emc_vnx_block_blocks |
| 266 |
graph_category disk |
| 267 |
graph_title EMC VNX 5300 LUN Blocks |
| 268 |
graph_vlabel Blocks Read (-) / Written (+) |
| 269 |
graph_args --base 1000 |
| 270 |
EOF |
| 271 |
|
| 272 |
while read -r LUN ; do |
| 273 |
LUN="$(clean_fieldname "$LUN")" |
| 274 |
cat <<-EOF |
| 275 |
${LUN}_read.label none
|
| 276 |
${LUN}_read.graph no
|
| 277 |
${LUN}_read.min 0
|
| 278 |
${LUN}_read.draw AREA
|
| 279 |
${LUN}_read.type COUNTER
|
| 280 |
${LUN}_write.label $LUN Blocks
|
| 281 |
${LUN}_write.negative ${LUN}_read
|
| 282 |
${LUN}_write.type COUNTER
|
| 283 |
${LUN}_write.min 0
|
| 284 |
${LUN}_write.draw STACK
|
| 285 |
EOF |
| 286 |
done <<< "$LUNLIST" |
| 287 |
|
| 288 |
cat <<-EOF |
| 289 |
|
| 290 |
multigraph emc_vnx_block_req |
| 291 |
graph_category disk |
| 292 |
graph_title EMC VNX 5300 LUN Requests |
| 293 |
graph_vlabel Requests: Read (-) / Write (+) |
| 294 |
graph_args --base 1000 |
| 295 |
EOF |
| 296 |
while read -r LUN ; do |
| 297 |
LUN="$(clean_fieldname "$LUN")" |
| 298 |
cat <<-EOF |
| 299 |
${LUN}_readreq.label none
|
| 300 |
${LUN}_readreq.graph no
|
| 301 |
${LUN}_readreq.min 0
|
| 302 |
${LUN}_readreq.type COUNTER
|
| 303 |
${LUN}_writereq.label $LUN Requests
|
| 304 |
${LUN}_writereq.negative ${LUN}_readreq
|
| 305 |
${LUN}_writereq.type COUNTER
|
| 306 |
${LUN}_writereq.min 0
|
| 307 |
EOF |
| 308 |
done <<< "$LUNLIST" |
| 309 |
|
| 310 |
cat <<-EOF |
| 311 |
|
| 312 |
multigraph emc_vnx_block_ticks |
| 313 |
graph_category disk |
| 314 |
graph_title EMC VNX 5300 Counted Load per LUN |
| 315 |
graph_vlabel Load, % * Number of LUNs |
| 316 |
graph_args --base 1000 -l 0 -r |
| 317 |
EOF |
| 318 |
echo -n "graph_order " |
| 319 |
while read -r LUN ; do |
| 320 |
LUN="$(clean_fieldname "$LUN")" |
| 321 |
echo -n "${LUN}_busyticks ${LUN}_idleticks ${LUN}_bta=${LUN}_busyticks_spa ${LUN}_idleticks_spa ${LUN}_btb=${LUN}_busyticks_spb ${LUN}_idleticks_spb "
|
| 322 |
done <<< "$LUNLIST" |
| 323 |
echo "" |
| 324 |
while read -r LUN ; do |
| 325 |
LUN="$(clean_fieldname "$LUN")" |
| 326 |
cat <<-EOF |
| 327 |
${LUN}_busyticks_spa.label $LUN Busy Ticks SPA
|
| 328 |
${LUN}_busyticks_spa.type COUNTER
|
| 329 |
${LUN}_busyticks_spa.graph no
|
| 330 |
${LUN}_bta.label $LUN Busy Ticks SPA
|
| 331 |
${LUN}_bta.graph no
|
| 332 |
${LUN}_idleticks_spa.label $LUN Idle Ticks SPA
|
| 333 |
${LUN}_idleticks_spa.type COUNTER
|
| 334 |
${LUN}_idleticks_spa.graph no
|
| 335 |
${LUN}_busyticks_spb.label $LUN Busy Ticks SPB
|
| 336 |
${LUN}_busyticks_spb.type COUNTER
|
| 337 |
${LUN}_busyticks_spb.graph no
|
| 338 |
${LUN}_btb.label $LUN Busy Ticks SPB
|
| 339 |
${LUN}_btb.graph no
|
| 340 |
${LUN}_idleticks_spb.label $LUN Idle Ticks SPB
|
| 341 |
${LUN}_idleticks_spb.type COUNTER
|
| 342 |
${LUN}_idleticks_spb.graph no
|
| 343 |
${LUN}_load_spa.label $LUN load SPA
|
| 344 |
${LUN}_load_spa.draw AREASTACK
|
| 345 |
${LUN}_load_spb.label $LUN load SPB
|
| 346 |
${LUN}_load_spb.draw AREASTACK
|
| 347 |
${LUN}_load_spa.cdef 100,${LUN}_bta,${LUN}_busyticks_spa,${LUN}_idleticks_spa,+,/,*
|
| 348 |
${LUN}_load_spb.cdef 100,${LUN}_btb,${LUN}_busyticks_spa,${LUN}_idleticks_spa,+,/,*
|
| 349 |
EOF |
| 350 |
done <<< "$LUNLIST" |
| 351 |
|
| 352 |
cat <<-EOF |
| 353 |
|
| 354 |
multigraph emc_vnx_block_outstanding |
| 355 |
graph_category disk |
| 356 |
graph_title EMC VNX 5300 Sum of Outstanding Requests |
| 357 |
graph_vlabel Requests |
| 358 |
graph_args --base 1000 |
| 359 |
EOF |
| 360 |
while read -r LUN ; do |
| 361 |
LUN="$(clean_fieldname "$LUN")" |
| 362 |
cat <<-EOF |
| 363 |
${LUN}_outstandsum.label $LUN
|
| 364 |
${LUN}_outstandsum.type COUNTER
|
| 365 |
EOF |
| 366 |
done <<< "$LUNLIST" |
| 367 |
|
| 368 |
cat <<-EOF |
| 369 |
|
| 370 |
multigraph emc_vnx_block_nonzeroreq |
| 371 |
graph_category disk |
| 372 |
graph_title EMC VNX 5300 Non-Zero Request Count Arrivals |
| 373 |
graph_vlabel Count Arrivals |
| 374 |
graph_args --base 1000 |
| 375 |
EOF |
| 376 |
while read -r LUN ; do |
| 377 |
LUN="$(clean_fieldname "$LUN")" |
| 378 |
cat <<-EOF |
| 379 |
${LUN}_nonzeroreq.label $LUN
|
| 380 |
${LUN}_nonzeroreq.type COUNTER
|
| 381 |
EOF |
| 382 |
done <<< "$LUNLIST" |
| 383 |
|
| 384 |
cat <<-EOF |
| 385 |
|
| 386 |
multigraph emc_vnx_block_trespasses |
| 387 |
graph_category disk |
| 388 |
graph_title EMC VNX 5300 Trespasses |
| 389 |
graph_vlabel Trespasses |
| 390 |
EOF |
| 391 |
while read -r LUN ; do |
| 392 |
LUN="$(clean_fieldname "$LUN")" |
| 393 |
cat <<-EOF |
| 394 |
${LUN}_implic_tr.label ${LUN} Implicit Trespasses
|
| 395 |
${LUN}_explic_tr.label ${LUN} Explicit Trespasses
|
| 396 |
EOF |
| 397 |
done <<< "$LUNLIST" |
| 398 |
|
| 399 |
cat <<-EOF |
| 400 |
|
| 401 |
multigraph emc_vnx_block_queue |
| 402 |
graph_category disk |
| 403 |
graph_title EMC VNX 5300 Counted Block Queue Length |
| 404 |
graph_vlabel Length |
| 405 |
EOF |
| 406 |
while read -r LUN ; do |
| 407 |
LUN="$(clean_fieldname "$LUN")" |
| 408 |
cat <<-EOF |
| 409 |
${LUN}_busyticks_spa.label ${LUN}
|
| 410 |
${LUN}_busyticks_spa.graph no
|
| 411 |
${LUN}_busyticks_spa.type COUNTER
|
| 412 |
${LUN}_idleticks_spa.label ${LUN}
|
| 413 |
${LUN}_idleticks_spa.graph no
|
| 414 |
${LUN}_idleticks_spa.type COUNTER
|
| 415 |
${LUN}_busyticks_spb.label ${LUN}
|
| 416 |
${LUN}_busyticks_spb.graph no
|
| 417 |
${LUN}_busyticks_spb.type COUNTER
|
| 418 |
${LUN}_idleticks_spb.label ${LUN}
|
| 419 |
${LUN}_idleticks_spb.graph no
|
| 420 |
${LUN}_idleticks_spb.type COUNTER
|
| 421 |
${LUN}_outstandsum.label ${LUN}
|
| 422 |
${LUN}_outstandsum.graph no
|
| 423 |
${LUN}_outstandsum.type COUNTER
|
| 424 |
${LUN}_nonzeroreq.label ${LUN}
|
| 425 |
${LUN}_nonzeroreq.graph no
|
| 426 |
${LUN}_nonzeroreq.type COUNTER
|
| 427 |
${LUN}_readreq.label ${LUN}
|
| 428 |
${LUN}_readreq.graph no
|
| 429 |
${LUN}_readreq.type COUNTER
|
| 430 |
${LUN}_writereq.label ${LUN}
|
| 431 |
${LUN}_writereq.graph no
|
| 432 |
${LUN}_writereq.type COUNTER
|
| 433 |
EOF |
| 434 |
# Queue Length SPA = ((Sum of Outstanding Requests SPA - NonZero Request Count Arrivals SPA / 2)/(Host Read Requests SPA + Host Write Requests SPA))* |
| 435 |
# (Busy Ticks SPA/(Busy Ticks SPA + Idle Ticks SPA) |
| 436 |
# We count together SPA and SPB, although it is not fully corrext |
| 437 |
cat <<-EOF |
| 438 |
${LUN}_ql_l_a.label ${LUN} Queue Length SPA
|
| 439 |
${LUN}_ql_l_a.cdef ${LUN}_outstandsum,${LUN}_nonzeroreq,2,/,-,${LUN}_readreq,${LUN}_writereq,+,/,${LUN}_busyticks_spa,*,${LUN}_busyticks_spa,${LUN}_idleticks_spa,+,/
|
| 440 |
${LUN}_ql_l_b.label ${LUN} Queue Length SPB
|
| 441 |
${LUN}_ql_l_b.cdef ${LUN}_outstandsum,${LUN}_nonzeroreq,2,/,-,${LUN}_readreq,${LUN}_writereq,+,/,${LUN}_busyticks_spb,*,${LUN}_busyticks_spb,${LUN}_idleticks_spb,+,/
|
| 442 |
EOF |
| 443 |
done <<< "$LUNLIST" |
| 444 |
cat <<-EOF |
| 445 |
|
| 446 |
multigraph emc_vnx_block_ticks_total |
| 447 |
graph_category disk |
| 448 |
graph_title EMC VNX 5300 Counted Load per SP |
| 449 |
graph_vlabel Load, % |
| 450 |
EOF |
| 451 |
echo -n "graph_order " |
| 452 |
for SP in $SPALL; do |
| 453 |
SPclean="$(clean_fieldname "$SP")" |
| 454 |
echo -n "${SPclean}_total_bt=${SPclean}_total_busyticks "
|
| 455 |
done |
| 456 |
echo "" |
| 457 |
for SP in $SPALL; do |
| 458 |
SPclean="$(clean_fieldname "$SP")" |
| 459 |
cat <<-EOF |
| 460 |
${SPclean}_total_busyticks.label ${SP}
|
| 461 |
${SPclean}_total_busyticks.graph no
|
| 462 |
${SPclean}_total_busyticks.type COUNTER
|
| 463 |
${SPclean}_total_bt.label ${SP}
|
| 464 |
${SPclean}_total_bt.graph no
|
| 465 |
${SPclean}_total_bt.type COUNTER
|
| 466 |
${SPclean}_total_idleticks.label ${SP}
|
| 467 |
${SPclean}_total_idleticks.graph no
|
| 468 |
${SPclean}_total_idleticks.type COUNTER
|
| 469 |
${SPclean}_total_load.label ${SP} Total Load
|
| 470 |
${SPclean}_total_load.cdef ${SPclean}_total_bt,${SPclean}_total_busyticks,${SPclean}_total_idleticks,+,/,100,*
|
| 471 |
EOF |
| 472 |
done |
| 473 |
exit 0 |
| 474 |
fi |
| 475 |
|
| 476 |
#Preparing big complex command to SP's to have most work done remotely. |
| 477 |
#BIGCMD="$SSH" |
| 478 |
while read -r LUN ; do |
| 479 |
FILTERLUN="$(clean_fieldname "$LUN")" |
| 480 |
BIGCMD+="$NAVICLI lun -list -name $LUN -perfData | |
| 481 |
sed -ne 's/^Blocks Read\:\ */${FILTERLUN}_read.value /p;
|
| 482 |
s/^Blocks Written\:\ */${FILTERLUN}_write.value /p;
|
| 483 |
s/Read Requests\:\ */${FILTERLUN}_readreq.value /p;
|
| 484 |
s/Write Requests\:\ */${FILTERLUN}_writereq.value /p;
|
| 485 |
s/Busy Ticks SP A\:\ */${FILTERLUN}_busyticks_spa.value /p;
|
| 486 |
s/Idle Ticks SP A\:\ */${FILTERLUN}_idleticks_spa.value /p;
|
| 487 |
s/Busy Ticks SP B\:\ */${FILTERLUN}_busyticks_spb.value /p;
|
| 488 |
s/Idle Ticks SP B\:\ */${FILTERLUN}_idleticks_spb.value /p;
|
| 489 |
s/Sum of Outstanding Requests\:\ */${FILTERLUN}_outstandsum.value /p;
|
| 490 |
s/Non-Zero Request Count Arrivals\:\ */${FILTERLUN}_nonzeroreq.value /p;
|
| 491 |
s/Implicit Trespasses\:\ */${FILTERLUN}_implic_tr.value /p;
|
| 492 |
s/Explicit Trespasses\:\ */${FILTERLUN}_explic_tr.value /p;
|
| 493 |
' ; " |
| 494 |
done <<< "$LUNLIST" |
| 495 |
ANSWER=$(run_remote "$BIGCMD") |
| 496 |
# BIGCMD="getcontrol -cbt | sed -ne ' |
| 497 |
# s/Controller busy ticks\:\ */ spa_busyticks.value /p; |
| 498 |
# s/Controller idle ticks\:\ */ spa_idleticks.value /p;' |
| 499 |
|
| 500 |
|
| 501 |
BIGCMD="getcontrol -cbt | sed -ne ' |
| 502 |
s/Controller busy ticks\:\ */\${SP}_total_busyticks.value /p;
|
| 503 |
s/Controller idle ticks\:\ */\${SP}_total_idleticks.value /p;
|
| 504 |
' |
| 505 |
" |
| 506 |
ANSWER+=$'\n'$(run_navicli_both_sp "$BIGCMD") |
| 507 |
run_navicli_both_sp "$BIGCMD" |
| 508 |
|
| 509 |
get_precise_answer_field() {
|
| 510 |
echo "$ANSWER" | grep -F "_${1}."
|
| 511 |
} |
| 512 |
|
| 513 |
# get_similar_answer_field() {
|
| 514 |
# echo "$ANSWER" | grep -F "_${1}"
|
| 515 |
# } |
| 516 |
#ANSWER=$BIGSSHCMD |
| 517 |
echo "multigraph emc_vnx_block_blocks" |
| 518 |
get_precise_answer_field "read" |
| 519 |
get_precise_answer_field "write" |
| 520 |
echo -e "\nmultigraph emc_vnx_block_req" |
| 521 |
get_precise_answer_field "readreq" |
| 522 |
get_precise_answer_field "writereq" |
| 523 |
|
| 524 |
echo -e "\nmultigraph emc_vnx_block_ticks" |
| 525 |
while read -r LUN ; do |
| 526 |
LUN="$(clean_fieldname "$LUN")" |
| 527 |
#Will count these values later, using cdef |
| 528 |
echo "${LUN}_load_spa.value 0"
|
| 529 |
echo "${LUN}_load_spb.value 0"
|
| 530 |
done <<< "$LUNLIST" |
| 531 |
get_precise_answer_field "busyticks_spa" |
| 532 |
get_precise_answer_field "idleticks_spa" |
| 533 |
get_precise_answer_field "busyticks_spb" |
| 534 |
get_precise_answer_field "idleticks_spb" |
| 535 |
|
| 536 |
echo -e "\nmultigraph emc_vnx_block_outstanding" |
| 537 |
get_precise_answer_field "outstandsum" |
| 538 |
|
| 539 |
echo -e "\nmultigraph emc_vnx_block_nonzeroreq" |
| 540 |
get_precise_answer_field "nonzeroreq" |
| 541 |
|
| 542 |
echo -e "\nmultigraph emc_vnx_block_trespasses" |
| 543 |
get_precise_answer_field "implic_tr" |
| 544 |
get_precise_answer_field "explic_tr" |
| 545 |
|
| 546 |
echo -e "\nmultigraph emc_vnx_block_queue" |
| 547 |
# Queue Length |
| 548 |
get_precise_answer_field "busyticks_spa" |
| 549 |
get_precise_answer_field "idleticks_spa" |
| 550 |
get_precise_answer_field "busyticks_spb" |
| 551 |
get_precise_answer_field "idleticks_spb" |
| 552 |
get_precise_answer_field "outstandsum" |
| 553 |
get_precise_answer_field "nonzeroreq" |
| 554 |
get_precise_answer_field "readreq" |
| 555 |
get_precise_answer_field "writereq" |
| 556 |
while read -r LUN ; do |
| 557 |
LUN="$(clean_fieldname "$LUN")" |
| 558 |
#Will count these values later, using cdef |
| 559 |
echo "${LUN}_ql_l_a.value 0 "
|
| 560 |
echo "${LUN}_ql_l_b.value 0 "
|
| 561 |
done <<< "$LUNLIST" |
| 562 |
|
| 563 |
echo -e "\nmultigraph emc_vnx_block_ticks_total" |
| 564 |
get_precise_answer_field "total_busyticks" |
| 565 |
get_precise_answer_field "total_idleticks" |
| 566 |
#Will count them later |
| 567 |
for SP in $SPALL; do |
| 568 |
SP="$(clean_fieldname "$SP")" |
| 569 |
echo "${SP}_total_load.value 0"
|
| 570 |
done |
| 571 |
|
| 572 |
exit 0 |
