NetXMS Support Forum

English Support => General Support => Topic started by: mgiammarco on January 06, 2021, 01:09:31 PM

Title: Disable SYS_IF_DOWN for most nodes
Post by: mgiammarco on January 06, 2021, 01:09:31 PM
Hello,
I am learning NetXMS.
I have a big network with servers, routers, switches and pcs.
I receive too many SYS_IF_DOWN events.
I want to receive them only from servers, which is the best way to do it?
Thanks,
Mario
Title: Re: Disable SYS_IF_DOWN for most nodes
Post by: pvo on January 06, 2021, 02:12:27 PM
Did you mean not receive notifications (for example via email) or not see the alarms?

I have solution for the first case which even allows notification to different people for different nodes.
Title: Re: Disable SYS_IF_DOWN for most nodes
Post by: mgiammarco on January 06, 2021, 02:15:14 PM
I prefer to not see alarms in alarm browser but I am also interested in your idea.
I supposed this is a common thing to ask, like having different thresholds for different nodes.
Title: Re: Disable SYS_IF_DOWN for most nodes
Post by: pvo on January 06, 2021, 03:05:12 PM
I do notification via following nxsl script:

/*
$1 - Unique ID of event source object
$2 - Email subject
$3 - Email body
*/

node = FindObject($1);
if (node != null) {
    emails = node->getCustomAttribute("notify");
    if (emails != null && emails != "") {
         SendMail(emails, $2, $3);
    }
}


The notify  Custom Attribute contains email addresses separated by ";". The value can be set for each Node differently or as Inheritable for whole Container.
It it is missing no notification is sent.

I solve the different thresholds for different nodes similar way (Custom Attribute and nxsl script checking the threshold).
Title: Re: Disable SYS_IF_DOWN for most nodes
Post by: Filipp Sudanov on January 06, 2021, 03:47:06 PM
You can set expected states of interfaces to "IGNORE". This could be done automatically from HOOK::ConfigurationPoll - it's a script that is launched on each configuration poll.
interfaces = GetNodeInterfaces($node);
foreach(i : interfaces)
{
SetInterfaceExpectedState(i, "IGNORE");
}


Obviously you need to add some filters - you can check if node has agent ($node->isAgent), etc.