![]() ![]() Thanks for the blog, it is a good starting point for this badly documented feature.Īlso with a little help from this discussion: Yep I don’t have a clue how they link but it produced a list that seems to work and I it. Testing two additional events confirmed I was on the correct track. It produced the following built in Alarm names:Īlarm.HostVendorProviderRegistrationAlarmĪlarm.VmNoCompatibleHostForSecondaryAlarm The following is a SQL command I used to produce the Alarms names: A few more minutes did not produce any primary keys to link to the Alarm tables. Inside this I was able to locate names that seemed to fit. ![]() It seems to be a table of all events in the system. Some finely crafted searches produced a number of tables with the alarm.xxx information. ![]() This lead me to my last stop the vCenter database. Using the following MOB I was able to learn everything about the alarm except the name for SNMP: My next stop was the MOB (Managed Object Browse) also known as my least favorite place. I tried lots of ways to work on this object like get-view etc… without any luck. It did produce a Alarm-145 (unique to my vCenter). This fine powershell did not produce the alarm.HostConnectionStateAlarm name. My first stop was PowerCLI using the command: $bob = Get-AlarmDefinition -Name "Host connection and power state" $bob | fl So I went on a quest to locate these names. Making my mappings for any VMware generated events very hard. The Host connection and power state (easiest one for me to generate) is named alarm.HostConnectionStateAlarm. Sounds simple right? Well… no because the VMware built in alarms don’t following this naming convention. For example if I create a Alarm called JoeTest then it’s called JoeTest. The name for any custom created event is the name of the event. The details of the event contains information an internal name. The essential issue is that all SNMP events generated by vSphere come in as the same type of event vpxaAlarmInfo. I ran into a number of issues that generated this community post . The following will add SNMP to the alarms: Get-AlarmDefinition -Name "Alarm1" | New-AlarmAction -Snmp Get-AdvancedSetting – Entity $srv – Name snmp.receiver.2.name | Set-AdvancedSetting – Value 192.168.1.10 Get-AdvancedSetting – Entity $srv – Name snmp.receiver.2.enabled | Set-AdvancedSetting – Value $true VCenter must be configured to use SNMP with the following lines: $srv = vcenterservername Get-AdvancedSetting – Entity $srv – Name snmp.receiver.2.community | Set-AdvancedSetting – Value public You can get a list of current alarms with powercli as follows: Get-AlarmDefinition
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |