Ad Widget

Collapse

monitoring PostgreSQL log file for DBA relevant error messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roby
    Junior Member
    • Feb 2013
    • 13

    #1

    monitoring PostgreSQL log file for DBA relevant error messages

    Hi, I want to monitor PostgreSQL log file as stated in title of this thread.
    The problem is best described here:


    in other words PostgreSQL relevant messages can be prefixed with "LOG:", but some irrelevant problems with select or connection problem can be prefixed with "ERROR:" or "FATAL:":
    FATAL: no pg_hba.conf entry for host "X.X.X.X", user "zabbix_monitor", database "postgres", SSL off.
    But I would only like to be alerted when real DBA relevant problems occur! My idea was to create item with this key:
    Code:
    log[/var/log/postgresql/postgresql-9.1-main.log,"
    
    [I]^(?=.*?(ERROR|FATAL|PANIC|temporary file: path|SIGHUP|archive command failed|could not be archived|transaction ID wrap limit|must be vacuumed within|terminated|Segmentation fault|is missing))
    ((?!syntax|unrecognized configuration parameter|parameter ".+" cannot be changed now|outside the valid range for parameter|out of range|canceling statement due to user request|cannot be matched|cannot drop|current transaction is aborted|relation ".+" already exists|returned record type does not match expected record type|at character|duplicate key|must not return|cannot cast|has no field|does not exist|value too long|must have an alias|must appear in the|constraint|temporary file|must be type|not allowed in|invalid regular expression|there is no parameter|IMMUTABLE|already exists).)*$[/I]
    
    "]
    which would only trigger a trigger when a text is found from first part of the regexp but not when the text from second part of this regexp is found.

    The problem here is - the key length is limited to 256 characters?

    How would you monitor PostgreSQL log file for relevant messages?
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    the next version of zabbix you can use more than 256characters!
    Debian-User

    Sorry for my bad english

    Comment

    • roby
      Junior Member
      • Feb 2013
      • 13

      #3
      sweet! my regexp is around 700 chars long so 2048 chars will be sufficient.
      but meanwhile, isnt there a way to solve my problem before 2.2 release?

      Comment

      • roby
        Junior Member
        • Feb 2013
        • 13

        #4
        bump and:
        Code:
        5.3 Trigger length limit increased
        
        Maximum length limit for trigger expressions was increased from 512 to 2048. Note that this is the “raw” limit, actual expression string may be notably longer in most cases.
        but, I just tested that item key maximum lenght is 255 chars! what about item key lenght in Zabbix 2.2, will it change?

        And when is 2.2 coming? Any ETA?

        Comment

        • roby
          Junior Member
          • Feb 2013
          • 13

          #5
          Guys, this does not need any more assistance, the answer here is:


          which means it is possible to build whatever regexp you want.

          Comment

          Working...