cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

NCM Regular expression to ignore "state up" or "state down" for node in the BigIP config

Jump to solution

I have tried the following with little success

^[ \t\r\n\v\f]state[ \t\r\n\v\f]*

^[ \t\r\n\v\f]state[ \t\r\n\v\f]*down

^[ \t\r\n\v\f]state[ \t\r\n\v\f]*up

^! state

^! state*

Labels (1)
Tags (2)
0 Kudos
1 Solution

Solarwinds support was able to help with the Regex.  Here are the details..

ltm pool pool_name {

    load-balancing-mode least-connections-member

    members {

        server1:http {

            address x.x.x.x

            session monitor-enabled

            state down

        }

        server2:http {

            address x.x.x.x

            session monitor-enabled

            state up

We ended up going with this Regex

state [du][op].*

This would match the "state" and the first letter being "d" or "u" and the second letter being "o" or "p"

We had to match this far to keep it from matching similar "state" lines on other parts of the config

View solution in original post

0 Kudos
4 Replies
Level 11

jhodges125  Copy and paste the example line in full context please.

0 Kudos

Solarwinds support was able to help with the Regex.  Here are the details..

ltm pool pool_name {

    load-balancing-mode least-connections-member

    members {

        server1:http {

            address x.x.x.x

            session monitor-enabled

            state down

        }

        server2:http {

            address x.x.x.x

            session monitor-enabled

            state up

We ended up going with this Regex

state [du][op].*

This would match the "state" and the first letter being "d" or "u" and the second letter being "o" or "p"

We had to match this far to keep it from matching similar "state" lines on other parts of the config

View solution in original post

0 Kudos

Perfect, you do not need the .* though, the end of your pattern was the second letter in the second word so anything beyond that is completely ignored.

jhodges125  also can you mark this solved?

Level 18

If our RegEx guru tim.l.nelson can't help you then no one.

Jiri

0 Kudos