Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Bienvenido a la comunidad de Pandora FMS Forums Community support Filter monitored SNMP interfaces by ifAlias

  • Filter monitored SNMP interfaces by ifAlias

    Posted by aurimas_plu on enero 8, 2021 at 15:47

    I am trying out PandoraFMS Enterprise version.
    I discover Cisco switches and routers via Discovery > Host&Devices > Network Scan

    I do not select any Module templates and run SNMP only discovery. Devices are discovered successfully and ifOperStatus, ifHCInOctets, ifHCOutOctets of ALL interfaces is monitored. But do not need that.
    I need match such logic:
    if ifAlias (1.3.6.1.2.1.31.1.1.1.18.X) contains string “monitor_me”, start monitoring ifOperStatus (1.3.6.1.2.1.2.2.1.8.X), and alert if it is down.
    X – interface SNMP index from 1 to n.

    How can I achieve this?

    With policies it seems I cannot do that, because I cannot find module which would be able to interact with more than one OID. And it seems that modules are static in nature and only can poll single OID of single interface.
    During discovery something more clever and dynamic is done. There all interfaces and their names are discovered.
    I wonder if it could be changed to what I need?

    enrique_m replied 4 years ago 2 Members · 1 Reply
  • 1 Reply
  • enrique_m

    Member
    enero 11, 2021 at 14:05
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello Aurimas.

    What you need to do can’t be achieved without using a script for that, as Pandora features don’t include something like “match a string and if true then create the module”.

    Discovery is intended for get all the interesting information from the devices and then let you decide if you want to add all the monitoring or only part of them, but use more complex or specific rules as you mention is not possible.

    So as a script would be the only way to do exactly what you need, it could be done by querying via SNMP the ifAlias of desired interfaces, check if it matches with the desired string and if it does then create the ifOperStatus module with Pandora CLI:

    https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Anexo_CLI#Create_network_module

    Kind regards.
    Enrique.