Hi all,
with VirtualCenter 1.x we received a mail when a virtual machine exceeded a threshold. In the subject line of the mail we could see wich virtual machine caused the alarm.
With VC 2.x we get a mail with a subject line that does not contain any indication towards the machine causing the alarm.
Examples:
VC 1.x[/b] : \[VMware VirtualCenter] alarm - CSDC44 caused alarm CPU Usage to change from yellow to red[/i]
VC 2.x : \[VMware VirtualCenter] Alarm - Virtual Machine CPU Usage[/i]
Any ideas on how to change the subject line for the SMTP mails from VirtualCenter to get the virtual machine names back in it?
cheers,
Harold
I've never seen any way to do this, what is does is use your alarm name in the email subject. I suppose you could create individual alarms for each VM that was named the same as the server, so instead of Virtual Machine CPU Usage as the name of the alarm at the Hosts & Clusters level, create a ServerA CPU Usage alarm at the VM level.
Thanks for your suggestion.
That would we a nice workaround,
but in an environment with 200+ servers and 200+ VDI workstations not very manageable...
Looks like i have to drop this one in the suggestion box...
cheers,
Harold
Yeah it's not very practical, hopefully they add it to a future release so you can customize the messages with variables.
That would be nice for instance.
Too bad they changed the subject line in VC 2.x...
Solved this my own way:
What i have done is created a script and using bmail.exe , a freeware smtp mailer. (http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm)
In the VC alarm setting, i let VC run my script with a parameter: \{eventDescription}
i parse this parameter to the bmail tool as subject / body and my SMTP mail subject becomes something like:
Alarm Virtual Machine CPU Usage on LAB-ACDA10 changed from Green to Red
Alarm Host CPU Usage on cse01.nsm.kadaster.nl changed from Yellow to Green[/b]
My Run Script line in VC:
""E:\Apps\VMware\VMware VirtualCenter 2.0\Mail\mail.cmd" "\{eventDescription}""[/i]
(All quotes are mandatory for the script to work)
My script:
SET TEXT=%1 %2 %3 %4 %5 %6 %7 %8 %9
bmail -s smtp-server-adress[/i] -t recipients-address[/i] -f from-address[/i] -a %TEXT% -b %TEXT%
ECHO %TEXT% >> mail.log
GOTO :EOF[/i]
Hope this can help anyone.
cheers,
Harold
Harold,
I tried the solution, and it works succesfully, but I had to remove some of the quotes.
With the following commandline it works as a charm on VC2.5
"c:\mail\alarms.cmd" " "