VMware VMUG Community
SeaCros20111014
Contributor
Contributor

Alarms in Virtual Center

I would like to figure out a way to set up an alarm to send an email via VC. I have the defualts alarms but I am looking for something more specific. I would like when a host goes down or falls out of VC for the list of guest on that host to also send out an alert. We have seen it at times where the host is unreacheable via VC but the guest are still up and running.

Thanks

S

0 Kudos
9 Replies
ddecker
Contributor
Contributor

1. For mail to work go to Administration

2. Vendor Server Settings

3. add a SMTP Server and Sender account

4. Create an Alarm with Alarm Type Hosts

5. Triggers make host connection state -warning = to disconnected and alert = not responding

6. Go to actions and Add - put in your email address and set your frequency of emails.

If you want VMS -

7. I only use the host one and have other non Vcenter monitors on my VMS for availability but you get setup a alarm for a VM use VM State set to none  - if you want to know if Vcenter is not seeing the VM or if you have HA on and want to know if the VM's are powering on then you could do powered off - this is where you may have to look placing the alarm on different object levels to reduce  emails  on things that are down on purpose.

SeaCros20111014
Contributor
Contributor

Thanks for the help. I will try some of your suggestions. I have the email portion setup and get the alerts when the host goes down or out of VC. What confuses me is that times a host will go down (as VC sees it) but the guest are still up (RDP works to the guest). I would like the alert for the host to tell me what guest are on it so I know how to react and so that I may be able to migrate them before the go down also.

Thanks

S

0 Kudos
ddecker
Contributor
Contributor

A couple of things may help you here:

1. In Virtual Center you are going to see the VM's not responding - I know you do not get that in a context of a data-file or email

2.  I have not done it for this situation but you could spawn to an action and have a powershell script do what you want - you would have to get the variables of server name and datacenter from the alarm but the script would run a command like this:

get-vmhost -location "Your Datacenter"  -name "Your vmhost" | get-vm

0 Kudos
SeaCros20111014
Contributor
Contributor

Still nothing on this one. Let me provide an example. Last night we had a host disconnect and reboot. I got the alarm from virtual center that the host:

Previous Status: Green

New Status: Red

Alarm Definition:

([Yellow state Is equal to disconnected; Red state Is equal to notResponding] OR [Red state Is equal to poweredOff])

Current values for metric/state:

State = Not responding OR State = Unknown

Description:

Alarm 'Host connection and power state' on esx1022.jaxpsr.net changed from Green to Red

I never got any alert from the guest that were on this host as they also went down.

What I am looking for is a way that when the host  has issues that I can get some type of alert from the guest on that host. Is this possible?

Thanks

SeaCros

0 Kudos
ddecker
Contributor
Contributor

This may help:

SeaCros20111014
Contributor
Contributor

@ddecker- i assume the script is copied to the vc server and then the custom alarm is then added?

Also what kind of customization will need to be done to the files for my enviroment?

Thanks

SeaCros

0 Kudos
ddecker
Contributor
Contributor

Correct - that the beauty - you can customize however you like it is a script - have it email you, have it cut help deskt ticket - you even can have other actions done.

0 Kudos
SeaCros20111014
Contributor
Contributor

I am not a real VB guy so i dont know much to edit. I have taken your info out and put my info in the file but it doesnt seem to be working. Can I send you my file to take a look to see if i have made the right modifications?

Thanks

0 Kudos
ddecker
Contributor
Contributor

sure

0 Kudos