VMware Cloud Community
keg9035
Contributor
Contributor
Jump to solution

alerts filtering for Virtual Machine in emailFilter.xml

I'm trying to filter for Virtual Machine alerts from the Custom UI in the emailFilter.xml.

Ideally I'd like to by filter by other metrics such as CPU ready % or CPU usage or some other metric but in the meantime just trying to isolate Virtual Machine.

<Conditions>

<condition type="ResourceKind">VMware Adapter:Virtual Machine</condition>

</Conditions>

I've tried a few different combinations of the above but no luck.  Can someone tell me what I'm doing wrong?

Thanks!

1 Solution

Accepted Solutions
gradinka
VMware Employee
VMware Employee
Jump to solution

not quite sure that I understand what you're trying to do

edit:

But I the resource kind should be "VirtualMachine" (without space), and there is no 'type' tag.

do look at the 'consolidated-alert-definitions.xml' as an example, formatting should be exactly as specified there.


I read twice Smiley Happy
look here - https://www.vmware.com/pdf/vcops-57-custom-ui-admin-guide.pdf page 82.

resource kind should be    VMWARE:VirtualMachine


I am not sure you'll be able to filter by attribute though (like CPU usage)

View solution in original post

0 Kudos
4 Replies
gradinka
VMware Employee
VMware Employee
Jump to solution

not quite sure that I understand what you're trying to do

edit:

But I the resource kind should be "VirtualMachine" (without space), and there is no 'type' tag.

do look at the 'consolidated-alert-definitions.xml' as an example, formatting should be exactly as specified there.


I read twice Smiley Happy
look here - https://www.vmware.com/pdf/vcops-57-custom-ui-admin-guide.pdf page 82.

resource kind should be    VMWARE:VirtualMachine


I am not sure you'll be able to filter by attribute though (like CPU usage)

0 Kudos
keg9035
Contributor
Contributor
Jump to solution

Hello Gradinka,

Thanks for the reply!

I'm try those changes and post the results.

Is there a table or chart somewhere that can tell me all the proper values for the AdapterKind:ResourceKind in the emailFilter.xml?

Also, I took your suggestion and configured the consolidated-alert-definitions.xml file.  I'm now getting those alerts in VCOPS but how do I get them via email? 

Here's the config:

<definitions>

<definition id="VM Test" count="1" percentage="" waitCycles="1" cancelCycles="5" resourceKinds="HostSystem" resourceIds="">

<condition attributeKey="cpu|readyPct" resourceKind="VirtualMachine" minDuration="1" criticality="critical" alertType="" alertSubtype="" infoRegEx=""/>

</definition>

</definitions>

Thanks again!

0 Kudos
keg9035
Contributor
Contributor
Jump to solution

Hey Gradinka,

I found a typo in the manual!

We have to use | not the : as the separator for AdapterKind:ResourceKind.  I tried it both ways and only the | key worked.

Here's the text:  -

I found that using the |  and not the : as the separator for AdapterKind:ResourceKind worked for me.  I tried it both ways and only the | key worked.

Here's the text:

<FilterRule name="VM Alerts 1">

<Conditions>

<condition type="Tag">VMWARE|Virtual Machine</condition>

</Conditions>

<Addresses>

Now, is there a way to filter on cpu|readyPCT?  Is that considered a tier or tag?

Thanks again!

0 Kudos
keg9035
Contributor
Contributor
Jump to solution

I got this one to work in case this is helpful to anyone.

<Conditions>

<condition type="AlertType">CLASSIC</condition>

<condition type="AlertSubType">KPI_HT_BREACH</condition>

<condition type="Status">NEW</condition>

<condition type="Level">CRITICAL</condition>

<condition type="ResourceKind">VMWARE:VirtualMachine</condition>

<condition type="RootCauseTier">cpu:readyPct</condition>

</Conditions>