"Dell" serverio aparatinės įrangos įspėjimų el. Pašto pranešimų nustatymas

Turinys:

"Dell" serverio aparatinės įrangos įspėjimų el. Pašto pranešimų nustatymas
"Dell" serverio aparatinės įrangos įspėjimų el. Pašto pranešimų nustatymas

Video: "Dell" serverio aparatinės įrangos įspėjimų el. Pašto pranešimų nustatymas

Video:
Video: Add Visual Line Motion Graphics in After Effects With 1 Effect! - YouTube 2024, Balandis
Anonim

Visi "Dell" serveriai turi "Dell OpenManage" serverio administratoriaus programinę įrangą, kuri turi galimybę stebėti ir rodyti sistemos lygio rodiklius. Be to, per skirtuką "Įspėjimų valdymo" galite konfigūruoti veiksmus, kurių reikia atlikti kiekvieną kartą, kai perspėjimas yra suaktyvinamas. Deja, nėra vienodų pranešimų visiems įvykiams taikymo priemonės, todėl mes ketiname pateikti scenarijų, kuris konfigūruos visus įspėjimo veiksmus, kad išsiųstų el. Laišką, kuriame pranešama apie atitinkamą įvykį. Nors galite rankiniu būdu nustatyti, scenarijus yra idealus, nes galite lengvai jį naudoti keliuose serveriuose.

Kaip tai veikia

Skriptas yra labai paprastas. Yra setup komanda, kuri kiekvieną įspėjimą nustato "Execute application", kai programa yra pats scenarijus. Kai scenarijus veikia, jis tiesiog sukuria el. Laišką (naudojant "Blat" įrankį) su kompiuterio pavadinimu, data, laikas ir perspėjimas.

Prieš paleidžiant scenarijų:

Po scenarijaus paleisti:
Po scenarijaus paleisti:
Visi įspėjimai naudoja el. Pašto pranešimų scenarijų:
Visi įspėjimai naudoja el. Pašto pranešimų scenarijų:
Image
Image

Reikalavimai

Žinoma, jums reikės įdiegti "Dell OpenManage" serverio pagalbininką. Ši programinė įranga, jei ji nėra pateikta jūsų sistemoje, gali būti atsisiųsta per "Dell" palaikymo svetainę.

Be to, jums reikės turėti Blat, komandų eilutės el. Laišką, sukonfigūruotą jūsų sistemoje. Norėdami konfigūruoti Blat, tiesiog atsisiųskite dvejetainius failus ir išskleiskite juos (3 iš viso: blat.exe, blat.dll, blat.lib) į jūsų sistemos PATH kintamojo vietą, pvz., Jūsų "Windowssystem32" aplanką. Tada iš komandinės eilutės paleiskite:

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

Pakeiskite pašto serverį ir el. Pašto adresą tinkamai. Iš esmės ši komanda yra visa, ko reikia paleisti, tačiau jei jūsų serveryje yra speciali konfigūracija (alternatyvus prievadas ir pan.), Galite pamatyti visas "Blat" svetainės diegimo parinktis.

El. Pašto įspėjamųjų pranešimų sąranka

Kai turėsite šiuos reikalavimus, esate pasiruošę naudoti scenarijų. Redaguokite scenarijų, įtraukdami el. Pašto adresus, kuriuos norite pranešti ("ToEmail" kintamąjį). Jei jūsų serveris reikalauja autentifikavimo per relę, šiuos parametrus turėsite įtraukti į komandą Blat, kaip nurodyta scenarijuje.

Norėdami nustatyti serverio padėjėjo įspėjimus naudoti scenarijų, paleiskite nustatymą:

DellAlert /setup

Patvirtinkite, kad norite naudoti šį scenarijų kaip įspėjamąjį veiksmą ir jūs visi esate nustatę. Kaip konfigūracijos dalis, paleidžiamas įspėjamasis mėginys, todėl galite įsitikinti, ar el. Laiškai pasiekia numatytus gavėjus.

Scenarijus

@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 Modifications / Maintenance

Įvykio įspėjimai iš pateikto scenarijaus yra iš vieno iš mūsų "Dell" serverių. Priklausomai nuo jūsų Dell serverio aparatūros ir "Server Assistant" versijos, perspėjimai gali skirtis. Apskritai, jūs galite pasakyti, kai paleidžiate sąrankos scenarijų, jei įvykis netinka jūsų serveriui (pavyzdžiui, jei neturite "Dell" RAID valdiklių), nes kai kurie elementai kurti saugojimo įvykio nepavyks.

Renginys, suaktyvinantis viršuje esantį scenarijų, buvo gautas paleidus komandų eilutę:

omconfig system alertaction /?

Ši komanda nurodo visus įvykių raktinius žodžius su atitinkamo įspėjimo aprašymu. Norėdami pridėti papildomų įspėjimų, paleiskite anksčiau pateiktą komandą ir pridėkite trūkstamus įrašus į scenarijaus sąrankos dalį, o tada perjunkite scenarijų naudodami / Setup jungiklį.

Nuorodos

Atsisiųskite "Dell" serverio el. Pašto įspėjamąjį scenarijų iš "SysadminGeek.com"

Atsisiųskite "Blat Command Line Emailer"

"Dell" palaikymo svetainė

Rekomenduojamas: