This post is more than 5 years old

23 Posts

140299

September 17th, 2012 23:00

vFoglight Rule Not Firing

I have created a rule to monitor several VM's and alert if they ever move from their designated hosts. When I put the condition script in the 'Run Condition Query' it runs the code successfully and returns 'true' or 'false' however the rule is not generating an alarm. I have forced the rule to return 'true' as shown below and have verified that the rule is active. Any help would be great

The script takes the name of the VM and splits the name where 'vgw' was and then puts the name back together with 'esx' in the name. It uses this name to compare against the name of the esxServer/name, if they are different then the script would return true and fire off an alarm. (for the test I set the script to return true if the esxServer name matches the string I created)

example: mynamevgw001 --> mynameesx001

vm = scope.get('name')

esxhost = scope.get('esxServer/name')

myarray = vm.split('vgw')

mystring = 'esx'

esxhostcompare = myarray[0] + mystring + myarray[1]

if (esxhost == esxhostcompare)

return true;

Thanks

23 Posts

September 28th, 2012 15:00

After working with support we found that "Data Driven" rules will not fire if there are no data metrics in the rule condition. In my rule I was only using properties of the VMWVirtualMahine topology object.

The two options that I would need to do to make the rule fire is:

     

1. Set the rule to time driven and select the fire without data option

                       or

2.    Add a observation metric to the condition

vm = scope.get('name')

myUP=#uptimePercent#

esxhost = scope.get('esxServer/name')

myarray = vm.split('vgw')

mystring = 'esx'

esxcompare = myarray[0] + mystring + myarray[1]

if (esxhost == esxcompare) return true;

else return false;

23 Posts

September 18th, 2012 13:00

To combat that issue I created a new alarm from scratch without editing the conditions and then followed up with a reboot of the FMS server. Do you think 6.6.x would still cause this?

171 Posts

September 18th, 2012 13:00

What version of vFoglight are you on?  There is a bug in 6.6.X that can cause the alarms to not fire properly when you edit the conditions, it's since been fixed in 6.7 and that could be the culprit.

171 Posts

September 18th, 2012 14:00

A reboot of the host should take care of that, so that makes it more interesting.  Could still be related, but support will probably have to look at the logs or someone else can chime in.  I'm not sure

23 Posts

September 18th, 2012 14:00

Thanks Thomas.

I have opened up a case for support to review and am starting to look at upgrading my environment to 6.7.  Any other help from people of the community would be greatly appreciated as well

30 Posts

September 28th, 2012 16:00

The code myUP=#uptimePercent# is just an example from the case we were working on.


You can use any metric which is under VMWVirtualMahine topology object in your rule condition.

-Lee


No Events found!

Top