This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

NCM - understanding script - filter results

SW - I am struggling with this and need clarification.

I assumed (which usually gets me in trouble) that filtering results would take the whole of the output and filter it.  I.E. I could filter just the name of the system and the results it output, excluding all empty set results or systems that didn't have output...thus not having to scroll forever to see systems with results.

     What I think is happening is that filtering occurs on just the output of the commands.

Please verify that this is the intended behavior.

  • Hi Larry,

    Could you please share a bit more details? A concrete example?

    Thanks,

    Jiri

  • sure...so I run script against routers looking for "stuck in active" indicators for eigrp routes...

    .*\s*A\s.*

    ---matches whole blocks

    ([\w-\.]+) \(.*\r((\s)*A [0-9]+.*)+

    ---matches whole blocks

    according to the site http://gskinner.com/RegExr/

    Essentially, NCM shows every system it logs into and runs script against...

    <sample output from script>

    ___________________________________________________________________________

    AA-ENT-VPN-1.xxxx (192.168.128.12):

     

      A 192.168.0.0/16, 1 Successors, FD is 17920

      A 172.16.0.0/12, 1 Successors, FD is 18176

    ________________________________________________________________________

    AA-ENT-VPN-2.xxxx (192.168.128.13):

     

     

    ___________________________________________________________________________

    AA-ENT-Voco.xxx (192.168.128.21):

     

     

    ___________________________________________________________________________

    <\sample output from script>

    so....

    essentially, I want the output email to include JUST the results from systems that have matches...so:

    ___________________________________________________________________________

    AA-ENT-VPN-1.xxxx (192.168.128.12):

     

      A 192.168.0.0/16, 1 Successors, FD is 17920

      A 172.16.0.0/12, 1 Successors, FD is 18176

    This way, I don't have to scroll for 10 pages to see anything with results...