Dell servera aparatūras brīdinājumu e-pasta paziņojumu iestatīšana

Satura rādītājs:

Dell servera aparatūras brīdinājumu e-pasta paziņojumu iestatīšana
Dell servera aparatūras brīdinājumu e-pasta paziņojumu iestatīšana

Video: Dell servera aparatūras brīdinājumu e-pasta paziņojumu iestatīšana

Video: Dell servera aparatūras brīdinājumu e-pasta paziņojumu iestatīšana
Video: Windows 7 Taskbar Customization Tips & Tricks - YouTube 2024, Aprīlis
Anonim

Visiem Dell serveriem ir Dell OpenManage Server Administrator programmatūra, kas spēj pārraudzīt un parādīt sistēmas līmeņa rādītājus. Turklāt, izmantojot cilni Alert Management, jūs varat konfigurēt darbības, kas jāveic ikreiz, kad brīdinājums tiek aktivizēts. Diemžēl nav vienotu paziņojumu izmantošanas visiem notikumiem, tāpēc mēs piedāvājam skriptu, kas konfigurē visas brīdināšanas darbības, lai nosūtītu e-pastu, kurā jūs informētu par attiecīgo notikumu. Kamēr jūs to varētu iestatīt manuāli, skripts ir ideāls, jo to var viegli izmantot vairākos serveros.

Kā tas strādā

Skripts ir ļoti vienkāršs. Ir iestatīšanas komanda, kas katram brīdinājumam iestata "Izpildīt lietojumprogrammu", kad lietojumprogramma ir pati skripts. Kad skripts darbojas, tas vienkārši ģenerē e-pastu (izmantojot rīku Blat), datora nosaukumu, datumu, laiku un brīdinājumu iedarbina.

Pirms skripta palaišanas:

Pēc skripta palaišanas:
Pēc skripta palaišanas:
Visi brīdinājumi izmanto e-pasta paziņojumu skriptu:
Visi brīdinājumi izmanto e-pasta paziņojumu skriptu:
Image
Image

Prasības

Protams, jums būs nepieciešams instalēt Dell OpenManage servera palīgu. Šī programmatūra, ja tā netiek piegādāta jūsu sistēmā, ir lejupielādējama, izmantojot Dell atbalsta vietni.

Turklāt jums būs jābūt Blat, komandrindas e-pastu, kas ir konfigurēts jūsu sistēmā. Lai konfigurētu Blat, vienkārši lejupielādējiet bināros failus un ekstrahējiet tos (3 kopā: blat.exe, blat.dll, blat.lib) uz atrašanās vietu jūsu sistēmas PATH mainīgajā, piemēram, mapē Windowssystem32. Tad no komandrindas palaidiet:

blat -install my.mailserver.com [email protected]

Pareizi aizvietojiet pasta serveri un no e-pasta adreses. Lielākoties šī komanda ir viss, kas jums jāstrādā, bet, ja jūsu serverim ir īpaša konfigurācija (rezerves ports uc), jūs varat redzēt pilnas instalēšanas opcijas Blat vietnē.

E-pasta brīdinājuma paziņojuma iestatīšana

Kad jums ir šīs prasības, jūs esat gatavs izmantot skriptu. Rediģējiet skriptu, lai iekļautu e-pasta adresi (-es) paziņošanai (mainīgais "ToEmail"). Ja jūsu serverim ir nepieciešama autentificēšana, lai to pārraidītu, jums jāpievieno šie parametri Blat komandai, kā dokumentēts skriptā.

Lai uzstādītu brīdinājumus par servera palīgu, lai izmantotu skriptu, vienkārši palaidiet iestatīšanu:

DellAlert /setup

Apstipriniet, ka vēlaties izmantot šo skriptu kā brīdinājuma darbību, un jūs visi esat iestatījis. Iestatīšanas laikā tiek aktivizēts brīdinājuma paraugs, lai jūs varētu pārliecināties, vai e-pasta ziņojumi tiek sasniegti paredzētajiem adresātiem.

Scenārijs

@ECHO OFF TITLE Dell Hardware Email Alert ECHO Dell Hardware Email Alert ECHO Written by: Jason Faulkner ECHO SysadminGeek.com ECHO. ECHO. REM Sends email alerts when Dell hardware warnings are triggered. REM This script should _not_ be in a path which contains spaces. REM REM Usage: REM DellAlert {/SETUP | Alert message} REM /SETUP Configure Dell Server Assistant to use this script for alerts. REM Alert Message REM Message to send. REM REM Requires: REM Blat: (command line emailer) is configured and working on the current system. REM If your email server requires authentication to relay, see comments below. REM Email address(es) to send alerts to (comma separated) SET [email protected] SETLOCAL EnableExtensions IF /I {%1}=={/SETUP} GOTO Setup IF NOT {%1}=={} GOTO Alert GOTO End:Alert SET Log='%TEMP%DellAlert.txt' DATE /T > %Log% TIME /T >> %Log% ECHO Dell Alert Tripped! >> %Log% ECHO %* >> %Log% REM If your email server requires autentication to relay, REM add the following to the end of the line below: REM -u UserName -pw Password BLAT %Log% -to %ToEmail% -subject '%ComputerName% Hardware Alert' IF EXIST %Log% DEL /F /Q %Log% GOTO End:Setup ECHO This will replace all the current Dell Server Assistant alerts with a call ECHO to this script. To confirm you want to continue, enter YES (case sensitive). SET /P Confirm= IF NOT {%Confirm%}=={YES} GOTO End SET ScriptPath=%~dpnx0 ECHO Configuring alerts to use: %ScriptPath% omconfig system alertaction event=powersupply execappath='%ScriptPath% power supply failure' omconfig system alertaction event=powersupplywarn execappath='%ScriptPath% power supply warning' omconfig system alertaction event=tempwarn execappath='%ScriptPath% temperature warning' omconfig system alertaction event=tempfail execappath='%ScriptPath% temperature failure' omconfig system alertaction event=fanwarn execappath='%ScriptPath% fan speed warning' omconfig system alertaction event=fanfail execappath='%ScriptPath% fan speed failure' omconfig system alertaction event=voltwarn execappath='%ScriptPath% voltage warning' omconfig system alertaction event=voltfail execappath='%ScriptPath% voltage failure' omconfig system alertaction event=intrusion execappath='%ScriptPath% chassis intrusion' omconfig system alertaction event=redundegrad execappath='%ScriptPath% redundancy degraded' omconfig system alertaction event=redunlost execappath='%ScriptPath% redundancy lost' omconfig system alertaction event=memprefail execappath='%ScriptPath% memory pre-failure' omconfig system alertaction event=memfail execappath='%ScriptPath% memory failure' omconfig system alertaction event=hardwarelogwarn execappath='%ScriptPath% hardware log warning' omconfig system alertaction event=hardwarelogfull execappath='%ScriptPath% hardware log full' omconfig system alertaction event=processorwarn execappath='%ScriptPath% processor warning' omconfig system alertaction event=processorfail execappath='%ScriptPath% processor failure' omconfig system alertaction event=watchdogasr execappath='%ScriptPath% watchdog asr' omconfig system alertaction event=batterywarn execappath='%ScriptPath% battery warning' omconfig system alertaction event=batteryfail execappath='%ScriptPath% battery failure' omconfig system alertaction event=systempowerwarn execappath='%ScriptPath% system power warning' omconfig system alertaction event=systempowerfail execappath='%ScriptPath% system power failure' omconfig system alertaction event=storagesyswarn execappath='%ScriptPath% storage system warning' omconfig system alertaction event=storagesysfail execappath='%ScriptPath% storage system failure' omconfig system alertaction event=storagectrlwarn execappath='%ScriptPath% storage controller warning' omconfig system alertaction event=storagectrlfail execappath='%ScriptPath% storage controller failure' omconfig system alertaction event=pdiskwarn execappath='%ScriptPath% physical disk warning' omconfig system alertaction event=pdiskfail execappath='%ScriptPath% physical disk failure' omconfig system alertaction event=vdiskwarn execappath='%ScriptPath% virtual disk warning' omconfig system alertaction event=vdiskfail execappath='%ScriptPath% virtual disk failure' omconfig system alertaction event=enclosurewarn execappath='%ScriptPath% enclosure warning' omconfig system alertaction event=enclosurefail execappath='%ScriptPath% enclosure failure' omconfig system alertaction event=storagectrlbatterywarn execappath='%ScriptPath% storage controller battery warning' omconfig system alertaction event=storagectrlbatteryfail execappath='%ScriptPath% storage controller battery failure' ECHO. ECHO Sending sample alert to: ECHO %ToEmail% CALL:Alert Testing Dell hardware alert warnings… ECHO. PAUSE GOTO End:End ENDLOCAL

Script modifikācijas / uzturēšana

Notikuma brīdinājumi no sniegtā skripta ir no viena no mūsu Dell serveriem. Atkarībā no jūsu Dell servera aparatūras un servera palīgs versijas brīdinājumi var atšķirties. Parasti jūs varat pateikt, kad palaižat iestatīšanas skriptu, ja notikums nav derīgs jūsu serverim (piemēram, ja jums nav Dell RAID kontrolleri), jo daži uzglabāšanas notikuma izveides vienumi neizdosies.

Notikums, kas aktivizējas iepriekš minētajā skriptā, tika iegūts, palaižot komandu uzvednē šādu informāciju:

omconfig system alertaction /?

Šajā komandā tiek uzskaitīti visi notikumu atslēgvārdi ar attiecīgā brīdinājuma aprakstu. Lai pievienotu papildu brīdinājumus, palaidiet iepriekš norādīto komandu un pievienojiet trūkstošos ierakstus skripta iestatīšanas daļai un pēc tam atkārtojiet skriptu ar / Setup slēdzi.

Saites

Lejupielādējiet Dell servera e-pasta brīdinājuma skriptu no SysadminGeek.com

Lejupielādējiet Blat Command Line Emailer

Dell atbalsta vietne

Ieteicams: