This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

NPM Alert based on percentage of group members status?

I have a group of nodes, which I would like to be alerted on IF a certain percentage (let's go with 50% for the example) of a group's members are down.

So:

- Single member of group down = no problem

- 50% or more of groups members down = alert

As far as I can see the alert wizard does not support this natively, I can only do alerting if the entire group is down. And the group status rollup itself (from the group properties) can only be set as "show best/worst/mixed", but not more granular.

Anyone who can show a way out of this? A custom DB query? but how to integrate this with alerting?

Thanks in advance!

Lasse

Parents Reply Children
  • Hi Mesverum,

    Thank you for your kind assistance - I am really trying to learn here.

    You mean like this(?)

    join (select count(Name) as [Total], containerid FROM Orion.ContainerMembers group by containerid) t on t.containerid=Groups.containerid

    join (select count(Name) as [Down], containerid FROM Orion.ContainerMembers where status=2 group by containerid) d on d.containerid=Groups.containerid where (d.Down/t.Total)*100>50 and groups.name='DUMMYGROUP'

    When I use the statement above, the statement validates, but it does not trigger even though the group DUMMYGROUP has more than 50% downed members. If I omit the "and groups.name='DUMMYGROUP'" from the statement, it triggers, but on a completely different group (and only that group), even though more groups exist with the condition more than 50% members down exist.

    Regards Lasse

  • Lasse, Looking at the query in my lab i see that i did the math wrong.

    try changing the where line from

    where (d.Down/t.Total)*100>50

    to

    where (d.Down*100/t.Total)>50

    Since I didn't specify the numbers to be floats SQL was rounding things to the nearest whole number and then multiplying that, which gave unexpected results.