Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

163637

May 31st, 2013 13:00

Need help creating a rule to monitor the "DSDeviceTotalLatency" under "VMWDatastore"

Hello all, I am very new to vFoglight and have been tasked to create a rule to monitor the "DSDeviceTotalLatency" property of the "VMWDatastore" topology type.  Looking at a few existing rules, I see that I'll need to write a mini script under the "Conditions & Actions" tab.  The problem is I don't know how to reference this propery and the command to use to retrieve it.  Thank you in advance.

132 Posts

May 31st, 2013 13:00

At it's most basic, can be as simple as:

scope the rule to the VMWDatastore type on tab 1

condition on tab 2:

if (#totalLatency# > 10) {return true}

return false

9 Posts

May 31st, 2013 16:00

Thanks John.  I created the rule as outlined above.  Do you know if I should set a schedule under the "Schedule" tab?  Right now, I have it set for "Always" for the "Effective Schedule" section.  Thanks.

132 Posts

May 31st, 2013 17:00

It's easy to get a lot of mail from Foglight.

On the Behavior tab (4), try selecting 'Fire actions if 8 out of 12 evaluations are true' (roughly 12 evaluations should be occuring per hour, based on the default collection frequency)

Also, consider evaluating how low the threshold is set.  Might want to set it higher.

132 Posts

May 31st, 2013 17:00

The variables you want are in either Rule Variables (Tab 5) or context rule variables.

set a name expression as

return scope.get("name");

In the condition alarm message.

[Critical] The Total Latency for datastore @name is high.  The following URL can be used to obtain alarm details. @foglight_rule_alarm_link

should work. 

Also set this to be the same, as a user defined action parameter ,on the EmailAction mail.message.

132 Posts

May 31st, 2013 17:00

generally, you don't need to do anything ot the last 3 tabs, until you are getting more complex requirements.

On Rule Definition tab (1), did you select Data Driven?

9 Posts

May 31st, 2013 17:00

One more thing, when I enabled the rule, it sent me a bunch of emails (over 60) one after the other.  Do you know why that is the case?  Thanks.

9 Posts

May 31st, 2013 17:00

Yes, I did select "Data Driven" on the 1st tab.  Also, I undid my change on the "Schedule" tab.  So I got the alarm to send an email to me whenever it is triggered but the body of the email is not informative.  This is what it looks like:

[Critical] The Total Latency for datastore null is high.  The following URL can be used to obtain alarm details. No alarm reported

This is what I've configured as the body of the message:

[Critical] The Total Latency for datastore @name is high.  The following URL can be used to obtain alarm details. @foglight_rule_alarm_link

Does that look correct?  Thanks.

9 Posts

June 4th, 2013 19:00

John, after making the changes your have suggested, I now get this email whenever the rule is triggered:

[Critical] The Total Latency for datastore vplex_lrc_102_vol is null.  The following URL can be used to obtain alarm details. null

This is the message that I've configured the rule with:

[Critical] The Total Latency for datastore @name is @totalLatency.  The following URL can be used to obtain alarm details. @foglight_rule_alarm_link

So a couple of questions regarding the configuration of this message:

1. How come "@totalLatency" yields "null"?

2. How come "@foglight_rule_alarm_link" yields "null"?

I am just guessing but is it because I don't have alarms configured to catch data for these two variables?  Thank you very much for your time and patience.

9 Posts

June 12th, 2013 21:00

Hello John, I have one quick question that hopefully you have the answer to:

What is the difference between "DSDeviceTotalLatency" and "Total Latency" as seen under Dashboards | Configuration | Data | VMware | Datastores | ?  I noticed that the latter is always much higher than the former.  Thank you.

No Events found!

Top