Обязательно предварительно проверяем на хост системе, чтобы был установлен пакет smartmontools, для CentOS
1 |
yum install smartmontools |
В smartmontools включен мониторинг S.M.A.R.T.
1 2 3 4 5 6 7 8 9 10 |
nano /etc/default/smartmontools start_smartd=yes /etc/init.d/smartmontools restart service smartd restart (centos7) smartctl -i /dev/sda | grep SMART SMART support is: Available - device has SMART capability. SMART support is: Enabled sudo smartctl -H /dev/sda |grep "test"| cut -f2 -d: |tr -d " " PASSED |
положить скрипт smartctl-disks-discovery.pl в /usr/local/bin/
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 |
#!/usr/bin/perl #must be run as root $first = 1; #add path if needed into $smartctl_cmd $smartctl_cmd = "smartctl"; my @disks; if ($^O eq 'darwin') { # if MAC OSX while (glob( '/dev/disk*' )) { if ($_ =~ /\/(disk+[0-9])$/) {push @disks,$1;} } } else { for (`$smartctl_cmd --scan`) { #splitting lines like "/dev/sda -d scsi # /dev/sda, SCSI device" if ($_ =~ /^(\/dev\/)(.+?) -d.+/) { $disk = $2; push @disks,$disk; } } } #print "Disks are @disks"; print "{\n"; print "\t\"data\":[\n\n"; @serials; DISKLOOP:foreach my $disk (@disks) { #DISK LOOP $smart_enabled = 0; chomp($disk); #SMART STATUS LOOP foreach $line (`$smartctl_cmd -i /dev/$disk`) { if ($line =~ /^Serial Number: +(.+)$/) { #print "Serial number is".$1."\n"; if (grep /$1/,@serials) { #print "disk already exist skipping\n"; next DISKLOOP; } else { push @serials,$1; } } elsif ($line =~ /^SMART.+?: +(.+)$/) { #print "$1\n"; if ( $1 =~ /Enabled/ ) { $smart_enabled = 1; } #if SMART is disabled then try to enable it (also offline tests etc) elsif ( $1 =~ /Disabled/ ) { foreach (`smartctl -s on -o on -S on /dev/$disk`) { if (/SMART Enabled/) { $smart_enabled = 1; } } } } } print ",\n" if not $first; $first = 0; print "\t\t{\n"; print "\t\t\t\"{#DISKNAME}\":\"$disk\",\n"; print "\t\t\t\"{#SMART_ENABLED}\":\"$smart_enabled\"\n"; print "\t\t}"; } print "\n\t]\n"; print "}\n"; |
Запустить данный перловый скрипт и проверить, что вывод имеет следующий вид (ошибки и предупреждения в консоле любого вида не допустимы):
1 2 3 4 5 6 7 8 9 10 11 12 13 |
{ "data":[ { "{#DISKNAME}":"sda", "{#SMART_ENABLED}":"0" }, { "{#DISKNAME}":"sdb", "{#SMART_ENABLED}":"0" } ] } |
Добавить в /etc/sudoers
1 |
zabbix ALL= (ALL) NOPASSWD: /usr/sbin/smartctl,/usr/local/bin/smartctl-disks-discovery.pl |
в zabbix_agentd.conf добавить слудеющие правила:
1 2 3 4 5 6 7 |
#S.M.A.R.T. MON UserParameter=uHDD[*], sudo smartctl -A /dev/$1| grep "$2"| tail -1| cut -c 88-|cut -f1 -d' ' UserParameter=uHDD.model.[*],sudo smartctl -i /dev/$1 |grep "Device Model"| cut -f2 -d: |tr -d " " UserParameter=uHDD.sn.[*],sudo smartctl -i /dev/$1 |grep "Serial Number"| cut -f2 -d: |tr -d " " UserParameter=uHDD.health.[*],sudo smartctl -H /dev/$1 |grep "test"| cut -f2 -d: |tr -d " " UserParameter=uHDD.errorlog.[*],sudo smartctl -l error /dev/$1 |grep "ATA Error Count"| cut -f2 -d: |tr -d " " UserParameter=uHDD.discovery,sudo /usr/local/bin/smartctl-disks-discovery.pl |
Перезагружаем zabbix-agent: service zabbix-agent restart
Проверяем вывод на хосте агента:
1 2 3 |
# zabbix_agentd -t uHDD[sdb,Temperature_Celsius] uHDD[sdb,Temperature_Celsius] [t|28] |
Файл шаблона .xml который необходимо добавить в zabbix
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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
<?xml version="1.0" encoding="UTF-8"?> <zabbix_export> <version>3.0</version> <date>2015-12-30T14:41:30Z</date> <groups> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>Template_HDD_SMARTMONTOOLS_2_WITH_LLD</template> <name>Template_HDD_SMARTMONTOOLS_2_WITH_LLD</name> <description/> <groups> <group> <name>Templates</name> </group> </groups> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <items/> <discovery_rules> <discovery_rule> <name>smartctl-disks-discovery</name> <type>0</type> <snmp_community/> <snmp_oid/> <key>uHDD.discovery</key> <delay>1800</delay> <status>0</status> <allowed_hosts/> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <delay_flex/> <params/> <ipmi_sensor/> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <filter> <evaltype>0</evaltype> <formula/> <conditions> <condition> <macro>{#SMART_ENABLED}</macro> <value>1</value> <operator>8</operator> <formulaid>A</formulaid> </condition> </conditions> </filter> <lifetime>30</lifetime> <description/> <item_prototypes> <item_prototype> <name>{#DISKNAME}: ID 5 Reallocated Sectors Count</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},5 Reallocated]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 9 Power On Hours</name> <type>0</type> <snmp_community/> <multiplier>1</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Power_On]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>s</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>3600</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 10 Spin_Retry_Count</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Spin_Retry_Count]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 194 Temperature</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Temperature_Celsius]</key> <delay>600</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>C</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 197 Current_Pending_Sector</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Current_Pending_Sector]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 198 Offline_Uncorrectable</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Offline_Uncorrectable]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 199 UDMA_CRC_Error</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},UDMA_CRC_Error]</key> <delay>7200</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: SMART critical errors total</name> <type>15</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.critical[{#DISKNAME}]</key> <delay>900</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params>last("uHDD[{#DISKNAME},5 Reallocated]")+last("uHDD[{#DISKNAME},Spin_Retry_Count]")+last("uHDD[{#DISKNAME},Current_Pending_Sector]")+last("uHDD[{#DISKNAME},Offline_Uncorrectable]")</params> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME} Device model</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.model.[{#DISKNAME}]</key> <delay>86400</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME} Serial Number</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.sn.[{#DISKNAME}]</key> <delay>86400</delay> <history>3</history> <trends>0</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME} Test Result</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.health.[{#DISKNAME}]</key> <delay>7200</delay> <history>3</history> <trends>0</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> </item_prototypes> <trigger_prototypes> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.sn.[{#DISKNAME}].diff(0)}=1</expression> <name>[HDD.{#DISKNAME}] disk has been changed</name> <url/> <status>0</status> <priority>1</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},5 Reallocated].last(0)}>0</expression> <name>[HDD.{#DISKNAME}] SMART, Reallocated Sectors Count has been registered 3</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.critical[{#DISKNAME}].last()}>0 and ({Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.critical[{#DISKNAME}].last(0,604800)}-{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.critical[{#DISKNAME}].last()})<>0</expression> <name>[HDD.{#DISKNAME}] SMART critical errors total: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>3</priority> <description>Trigger will be ON for two weeks. If counter is not increasing - Trigger will back to OK</description> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.critical[{#DISKNAME}].last()}>0</expression> <name>[HDD.{#DISKNAME}] SMART Critical error total: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>1</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},Current_Pending_Sector].last(0)}>0</expression> <name>[HDD.{#DISKNAME}] SMART Current_Pending_Sector has been registered</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},Spin_Retry_Count].last()}>0</expression> <name>[HDD.{#DISKNAME}] SMART Spin Retry Count has been registered</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health.[{#DISKNAME}].str("FAILED!")}=1</expression> <name>[HDD.{#DISKNAME}] SMART status: FAILED!</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},UDMA_CRC_Error].last()}>99 and ({Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},UDMA_CRC_Error].last(,604800)}-{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},UDMA_CRC_Error].last()})<>0</expression> <name>[HDD.{#DISKNAME}] SMART UltraDMA CRC Error Count too high: {ITEM.LASTVALUE}. Check cable!</name> <url>http://www.z-a-recovery.com/man-smart.htm</url> <status>0</status> <priority>3</priority> <description>Low value of this attribute typically indicates that something is wrong with the connectors and/or cables. Disk-to-host transfers are protected by CRC error detection code when Ultra-DMA 66 or 100 is used. So if the data gets garbled between the disk and the host machine, the receiving controller senses this and the retransmission is initiated. Such a situation is called "UDMA CRC error". Once the problem is rectified (typically by replacing a cable), the attribute value returns to the normal levels pretty quick.</description> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.critical[{#DISKNAME}].change(0)}>0 and {Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.critical[{#DISKNAME}].prev(0)}>0</expression> <name>[HDD.{#DISKNAME}] SMART new error!</name> <url/> <status>0</status> <priority>4</priority> <description>New error in SMART.</description> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},Temperature_Celsius].avg(1800)}>50 and {Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},Temperature_Celsius].nodata(1800)}=0</expression> <name>[HDD.{#DISKNAME}] Disk temperature: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},Temperature_Celsius].last(0)}>65 and {Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD[{#DISKNAME},Temperature_Celsius].last(0)}<100</expression> <name>[HDD.{#DISKNAME}] Disk temperature: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> </trigger_prototypes> <graph_prototypes/> <host_prototypes/> </discovery_rule> </discovery_rules> <macros/> <templates/> <screens/> </template> </templates> </zabbix_export> |
Несколько модифицированный .xml шаблон, для SSD дисков добавлены тригеры обнаружения:
- 177 Wear_Leveling_Count (500 предупреждение, 1000 критичное)
- 190 Airflow_Temperature_Cel (50°C предупреждение, 60°C критичное)
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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
<?xml version="1.0" encoding="UTF-8"?> <zabbix_export> <version>3.0</version> <date>2017-01-17T09:00:30Z</date> <groups> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>Template HDD SMART</template> <name>Template HDD SMART</name> <description/> <groups> <group> <name>Templates</name> </group> </groups> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <items/> <discovery_rules> <discovery_rule> <name>smartctl-disks-discovery</name> <type>0</type> <snmp_community/> <snmp_oid/> <key>uHDD.discovery</key> <delay>60</delay> <status>0</status> <allowed_hosts/> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <delay_flex/> <params/> <ipmi_sensor/> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <filter> <evaltype>0</evaltype> <formula/> <conditions> <condition> <macro>{#SMART_ENABLED}</macro> <value>1</value> <operator>8</operator> <formulaid>A</formulaid> </condition> </conditions> </filter> <lifetime>30</lifetime> <description/> <item_prototypes> <item_prototype> <name>{#DISKNAME}: SMART critical errors total</name> <type>15</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.critical[{#DISKNAME}]</key> <delay>900</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params>last("uHDD[{#DISKNAME},5 Reallocated]")+last("uHDD[{#DISKNAME},Spin_Retry_Count]")+last("uHDD[{#DISKNAME},Current_Pending_Sector]")+last("uHDD[{#DISKNAME},Offline_Uncorrectable]")</params> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME} Test Result</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.health.[{#DISKNAME}]</key> <delay>7200</delay> <history>3</history> <trends>0</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME} Device model</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.model.[{#DISKNAME}]</key> <delay>86400</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME} Serial Number</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD.sn.[{#DISKNAME}]</key> <delay>86400</delay> <history>3</history> <trends>0</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 5 Reallocated Sectors Count</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},5 Reallocated]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 190 Airflow_Temperature_Cel</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Airflow_Temperature_Cel]</key> <delay>600</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>C</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 197 Current_Pending_Sector</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Current_Pending_Sector]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 198 Offline_Uncorrectable</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Offline_Uncorrectable]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 9 Power On Hours</name> <type>0</type> <snmp_community/> <multiplier>1</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Power_On]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>s</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>3600</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 10 Spin_Retry_Count</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Spin_Retry_Count]</key> <delay>7200</delay> <history>7</history> <trends>0</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 194 Temperature</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Temperature_Celsius]</key> <delay>600</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>C</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 199 UDMA_CRC_Error</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},UDMA_CRC_Error]</key> <delay>7200</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> <item_prototype> <name>{#DISKNAME}: ID 177 Wear Leveling</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>uHDD[{#DISKNAME},Wear_Leveling_Count]</key> <delay>600</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>SMART monitoring (smartctl)</name> </application> </applications> <valuemap/> <logtimefmt/> <application_prototypes/> </item_prototype> </item_prototypes> <trigger_prototypes> <trigger_prototype> <expression>{Template HDD SMART:uHDD.sn.[{#DISKNAME}].diff(0)}=1</expression> <name>[HDD.{#DISKNAME}] disk has been changed</name> <url/> <status>0</status> <priority>1</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Airflow_Temperature_Cel].avg(1800)}>50 and {Template HDD SMART:uHDD[{#DISKNAME},Airflow_Temperature_Cel].nodata(1800)}=0</expression> <name>[HDD.{#DISKNAME}] Disk temperature: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Airflow_Temperature_Cel].last(0)}>65 and {Template HDD SMART:uHDD[{#DISKNAME},Airflow_Temperature_Cel].last(0)}<100</expression> <name>[HDD.{#DISKNAME}] Disk temperature: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Temperature_Celsius].avg(1800)}>50 and {Template HDD SMART:uHDD[{#DISKNAME},Temperature_Celsius].nodata(1800)}=0</expression> <name>[HDD.{#DISKNAME}] Disk temperature: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Temperature_Celsius].last(0)}>65 and {Template HDD SMART:uHDD[{#DISKNAME},Temperature_Celsius].last(0)}<100</expression> <name>[HDD.{#DISKNAME}] Disk temperature: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},5 Reallocated].last(0)}>0</expression> <name>[HDD.{#DISKNAME}] SMART, Reallocated Sectors Count has been registered 3</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD.critical[{#DISKNAME}].last()}>0 and ({Template HDD SMART:uHDD.critical[{#DISKNAME}].last(0,604800)}-{Template HDD SMART:uHDD.critical[{#DISKNAME}].last()})<>0</expression> <name>[HDD.{#DISKNAME}] SMART critical errors total: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>3</priority> <description>Trigger will be ON for two weeks. If counter is not increasing - Trigger will back to OK</description> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD.critical[{#DISKNAME}].last()}>0</expression> <name>[HDD.{#DISKNAME}] SMART Critical error total: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>1</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Current_Pending_Sector].last(0)}>0</expression> <name>[HDD.{#DISKNAME}] SMART Current_Pending_Sector has been registered</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD.critical[{#DISKNAME}].change(0)}>0 and {Template HDD SMART:uHDD.critical[{#DISKNAME}].prev(0)}>0</expression> <name>[HDD.{#DISKNAME}] SMART new error!</name> <url/> <status>0</status> <priority>4</priority> <description>New error in SMART.</description> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Spin_Retry_Count].last()}>0</expression> <name>[HDD.{#DISKNAME}] SMART Spin Retry Count has been registered</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD.health.[{#DISKNAME}].str("FAILED!")}=1</expression> <name>[HDD.{#DISKNAME}] SMART status: FAILED!</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},UDMA_CRC_Error].last()}>99 and ({Template HDD SMART:uHDD[{#DISKNAME},UDMA_CRC_Error].last(,604800)}-{Template HDD SMART:uHDD[{#DISKNAME},UDMA_CRC_Error].last()})<>0</expression> <name>[HDD.{#DISKNAME}] SMART UltraDMA CRC Error Count too high: {ITEM.LASTVALUE}. Check cable!</name> <url>http://www.z-a-recovery.com/man-smart.htm</url> <status>0</status> <priority>3</priority> <description>Low value of this attribute typically indicates that something is wrong with the connectors and/or cables. Disk-to-host transfers are protected by CRC error detection code when Ultra-DMA 66 or 100 is used. So if the data gets garbled between the disk and the host machine, the receiving controller senses this and the retransmission is initiated. Such a situation is called "UDMA CRC error". Once the problem is rectified (typically by replacing a cable), the attribute value returns to the normal levels pretty quick.</description> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Wear_Leveling_Count].avg(1800)}>500 and {Template HDD SMART:uHDD[{#DISKNAME},Wear_Leveling_Count].nodata(1800)}=0</expression> <name>[HDD.{#DISKNAME}] Wear Leveling: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> <trigger_prototype> <expression>{Template HDD SMART:uHDD[{#DISKNAME},Wear_Leveling_Count].last(0)}>1000 and {Template HDD SMART:uHDD[{#DISKNAME},Wear_Leveling_Count].last(0)}<100</expression> <name>[HDD.{#DISKNAME}] Wear Leveling: {ITEM.LASTVALUE}</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger_prototype> </trigger_prototypes> <graph_prototypes/> <host_prototypes/> </discovery_rule> </discovery_rules> <macros/> <templates/> <screens/> </template> </templates> </zabbix_export> |