Announcement

Collapse
No announcement yet.

Latest version handles regular expressions

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Latest version handles regular expressions

    Blade has put BLLogmonitor 2.0.14 in the updater. It handles regular expressions. I found this really useful to monitor the syslog output from my unifi access points. I can use it to monitor which phones are in my house, and which access points they are connected to.

    It is useful to have regular expressions because the log I monitor has entries that include the date and firmware version number and those will be changing over time. Using regular expressions, I was able to ignore those figures in the log entries and focus on portions such as "associated" "disassociated" and the mac addresses of access points and of phones.

    I found the following helpful for learning about how to use regular expressions:
    https://www.youtube.com/watch?v=sa-TUpSx1JA
    And Blade pointed me to this site for testing regular expressions:
    https://regex101.com/

    Thanks Blade!

    #2
    Since i'm matching to an exact message in the HS log, I unchecked the box for regular expressions. However, when I open the event back up again to edit, etc, I see the box is checked?

    Can I unselect this, or does it matter?

    Comment


      #3
      Originally posted by Tomgru View Post
      Since i'm matching to an exact message in the HS log, I unchecked the box for regular expressions. However, when I open the event back up again to edit, etc, I see the box is checked?

      Can I unselect this, or does it matter?
      Crickets? Anyone?

      Comment


        #4
        Originally posted by Tomgru View Post
        Since i'm matching to an exact message in the HS log, I unchecked the box for regular expressions. However, when I open the event back up again to edit, etc, I see the box is checked?

        Can I unselect this, or does it matter?
        I'm not an expert on this but would guess you can uncheck it. However, I don't think there is much harm in leaving it checked unless you have log entries with regular expression code in them (which would be really unusual).

        Comment


          #5
          Originally posted by jono View Post

          I'm not an expert on this but would guess you can uncheck it. However, I don't think there is much harm in leaving it checked unless you have log entries with regular expression code in them (which would be really unusual).
          Thanks Jon, but that's the point, I try to uncheck it, and it self re-checks itself a second later. @zwolfpack thinks asterics have special meaning in regular expressions, which I have in my log value, so that may be the issue. (other thead in this forum)

          Comment


            #6
            You can test the asterisk log entries here:
            https://regex101.com/
            See if it gives you the expected result, i.e. same as not using a regular expression.

            Comment


              #7
              Originally posted by jono View Post
              You can test the asterisk log entries here:
              https://regex101.com/
              See if it gives you the expected result, i.e. same as not using a regular expression.
              well that's darn handy... thanks! Maybe that's where zwolfpack got the idea. I'll try .

              Still be good to know why It won't stay deselected!!!

              Comment


                #8
                Asterisks definitely are used in Regular Expressions, as they refer to 0-or-more matches of the expression to look for with + being used for 1-or-more.

                Could be that plugin has a bug that it turns option on by mistake, or that it's trying to be helpful in an overzealous way thinking your search string has to be an expression.

                The "Espresso" tool is ideal if you want to test advanced expressions locally, and also explains expressions and has builder helpers.

                http://www.ultrapico.com/Expresso.htm

                Feel free to post example of what you're after, and what items you wish to extract and I'll gladly type out a regular expression to use as it's almost a second language for me.

                Comment

                Working...
                X