Ad Widget

Collapse

How to insert two regular expresions in a Discovery Rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HarryKalahan
    Member
    • Jan 2014
    • 40

    #1

    How to insert two regular expresions in a Discovery Rule

    Hi all,

    I have a little problem because I notice that the Regular expresion option has character limit. I want to discover a lot of Ethernet ports (not all) of a switch by SNMP. My regular expresion is the following:

    ^(GigabitEthernet0\/2|GigabitEthernet0\/1|FastEthernet0\/2|FastEthernet0\/4|FastEthernet0\/13|FastEthernet0\/14|FastEthernet0\/15|FastEthernet0\/16|FastEthernet0\/18|FastEthernet0\/19|FastEthernet0\/20|FastEthernet0\/21|FastEthernet0\/22)$

    I saved it as "Result is TRUE" with name SW-S-CCTVPSM. It works ok, but I need to add two more ports, but I can't due to the limit.

    Is it possible to create a new regular expression and add it to the first one with OR character "|" in the discovery rule? I tried it but it didn't work.

    I tried the following in the RegExp field of the discovery rule without success:
    @SW-S-CCTVPSM|@SW-S-CCTVPSM2
    @SW-S-CCTVPSM|FastEthernet0/23
    @SW-S-CCTVPSM|"^FastEthernet0/23|^FastEthernet0/24"
    @SW-S-CCTVPSM|"^FastEthernet0\/23|^FastEthernet0\/24"
    @SW-S-CCTVPSM|^(FastEthernet0\/23|FastEthernet0\/24)$

    When I use those options the discovery fail and mark all discovered items to delete.

    Do you have any idea to escape the regular expression limit?

    Thanks in advanced.

    Regards!
Working...