Situation

Started by tivanni, December 05, 2011, 11:23:52 AM

Previous topic - Next topic

tivanni

Hi,

i have to create a situation in which when an interfaces goes down, no alarm is sent for the relative node down.

I have to do this for many interfaces and many nodes.

I use the procedure exposed in NetXms Manual, but i have a doubt for the filtering script.

Suppose we have node A with interface A and node B with interface B.

I use a general script like this (in the template "show alarm when node is down")

sub main()
{
s = FindSituation("ServiceStatus", %n);
if (s != NULL)
{
if (s->status == "failed")
return false; // Don't match rule
}
return true; // Match rule
}

and in "show alarm when interfaces is down" i set this value:

Situations object:ServiceStatus
Instance:%n
and in Attributes:
                       name=status
                       value=failed.

Can i use the previous general script or i Have to create specific script like the following?

in "show alarm when node is down" set source=nodeA and insert the following script:

sub main()
{
s = FindSituation("ServiceStatus", InterfaceA);
if (s != NULL)
{
if (s->status == "failed")
return false; // Don't match rule
}
return true; // Match rule
}

and in "show alarm when interface is down" set source= interface A and situations:

Situations object:ServiceStatus
Instance:InterfaceA
and in Attributes:
                       name=status
                       value=failed.

(obviously i repeat this procedure for interface B and node B).

Thank you for help.