Delli serveri riistvara märguannete e-posti märguannete seadistamine

Sisukord:

Delli serveri riistvara märguannete e-posti märguannete seadistamine
Delli serveri riistvara märguannete e-posti märguannete seadistamine

Video: Delli serveri riistvara märguannete e-posti märguannete seadistamine

Video: Delli serveri riistvara märguannete e-posti märguannete seadistamine
Video: My Secret Romance 1~14 RECAP | Multi-language subtitles | K-Drama | Sung Hoon, Song Ji Eun - YouTube 2024, Mai
Anonim

Kõik Delli serverid on varustatud Dell OpenManage Server Administraatori tarkvaraga, millel on võimalik jälgida ja kuvada süsteemi taseme näitajaid. Lisaks saate vahekaardi Alert Management abil seadistada toiminguid, mis käivitatakse, kui teate käivitatakse. Kahjuks ei ole ühtegi sündmust ühetaoliste teatiste rakendamiseks, seega esitame skripti, mis konfigureerib kõik hoiatused, et saata e-kiri, milles teavitatakse teid vastavast sündmusest. Kuigi võite neid käsitsi seadistada, on skripti loomine ideaalne, kuna saate seda hõlpsalt kasutada mitmel serveril.

Kuidas see töötab

Skript on väga lihtne. Seal on seadistusjuhend, mis seab iga teate rakenduse käivitamiseks, kui rakendus on skript ise. Kui skript töötab, genereerib see lihtsalt e-kirja (Blat-tööriista abil) arvuti nime, kuupäeva, kellaaja ja signaali käivitumisega.

Enne skripti käivitamist:

Pärast skripti käivitamist:
Pärast skripti käivitamist:
Kõik märguanded kasutavad e-posti teate skripti:
Kõik märguanded kasutavad e-posti teate skripti:
Image
Image

Nõuded

Loomulikult peate olema installitud Dell OpenManage Server Assistant. See tarkvara, kui seda pole teie süsteemiga varustatud, saab alla laadida Delli tugiteenuse kaudu.

Peale selle peate oma süsteemis konfigureerima Blat - käsurea e-posti aadressi. Blat seadistamiseks laadige alla binaarfailid ja ekstraheerige need (3 kokku: blat.exe, blat.dll, blat.lib) oma süsteemi PATHi muutuja asukohta, näiteks kausta oma Windowssystem32. Seejärel käivitage käsurida:

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

Asenda e-posti server ja e-posti aadress vastavalt. Suurem osa see käsk on kõik, mida vajate, aga kui teie serveril on spetsiaalne konfiguratsioon (alternatiivne port jne), näete Blat'i veebisaidil täielikke installimisvõimalusi.

E-posti märguande seadistamine

Kui need nõuded on paigas, olete te skripti kasutamiseks valmis. Redigeerige skripti, et lisada e-posti aadress (id) teatada ("ToEmail" muutuja). Kui teie server nõuab relee saamiseks autentimist, peate lisama need parameetrid Blat-käsule, nagu on skriptis dokumenteeritud.

Kui soovite skripti kasutamiseks kasutada serveri abimehe märguandeid, käivitage seadistus:

DellAlert /setup

Kinnitage, et soovite selle skripti kasutada oma hoiatusteatena ja kõik olete seadistatud. Seadistamise osana käivitatakse proovide märguanne, et saaksite kindlad olla, et e-kirjad jõuavad kavandatud adressaatideni.

Skript

@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

Stsenaariumi muudatused / hooldus

Esitatud skripti sündmuste märguanded on pärit meie Delli serveritest. Sõltuvalt teie Delli serveri riistvarast ja serveri abistaja versioonist võivad teated varieeruda. Üldiselt võite öelda, kui käivitate häälestusskripti, kui sündmus ei kehti teie serveri jaoks (näiteks kui teil pole Delli RAID-kontrollereid), kuna mõni salvestamise sündmuse loomise üksus ebaõnnestub.

Ülaltoodud stsenaarium käivitab sündmuse, kasutades käsuviibalt järgmist:

omconfig system alertaction /?

See käsk loetleb kõik sündmuste märksõnad koos vastava hoiatuste kirjeldusega. Täiendavate hoiatuste lisamiseks käivitage ülaltoodud käsk ja lisage puuduvad kirjad skripti häälestusseadmesse ja seejärel skripti uuesti / Setup-lüliga uuesti.

Lingid

Laadige alla Delli serveri e-posti märguannete skript SysadminGeek.comist

Laadige Blat Command Line Emailer alla

Delli veebisait

Soovitan: