NetXMS Import / Mark to skip

General discussion of anything Unimus
Post Reply
User avatar
lweidig
Posts: 31
Joined: Fri Jan 12, 2018 4:43 pm

Wed Apr 25, 2018 1:30 pm

We import a number of groups from our NetXMS system into Unimus for backup and this generally works very well. However, there are a couple of groups where Unimus does not currently know how to backup the device and therefore fails on it daily when it attempts either discovery or backup.

We would prefer not to have to further break down the groupings in NetXMS as they are giving us what we want. What we would like is some way (open to ideas since there are MANY possible solutions) to mark a device as either not to be imported or once imported not to attempt discovery / backup (without of course consuming a license).

Suggestions / solutions?
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Wed Apr 25, 2018 11:54 pm

I would suggest creating a separate container (let's call it "Unimus sync") and manipulating the Auto-Bind rules to it to only bind devices you want into it.

Example auto-bind script - it would be applied to the "Unimus sync" container:

Code: Select all

parentContainers = %("Container 1", "Container 2");

shouldBind = false;

foreach (nodeContainer : GetNodeParents($node)) {
    foreach (desiredContainer : parentContainers) {
        if (nodeContainer->name == desiredContainer) {
            shouldBind = true;
        }
    }
}

exclusionDescriptions = %("RouterOS", "SomeOtherDescriptionPart");

for (exclusion : exclusionDescriptions) {
    if ($node->sysDescription ~= exclusion) {
        shouldBind = false;
    }
}

return shouldBind;
So this would bind all devices that are in "Container 1" and "Container 2", but do not have "RouterOS" or "SomeOtherDescriptionPart" in their SNMP description.
Please note that the comparison is using ~= - which is the regex comparison in NXSL.

This way, you can keep your existing grouping, and when you add a new device into your existing groups, it would get auto-bound into the "Unimus sync" container, and Unimus would pick it up.
You will also have the ability to not import some of those devices, based on the exclusion rules.

Would this work for you?
Post Reply