Ad Widget

Collapse

Monitoring LOG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JJMR
    Junior Member
    • Jan 2015
    • 4

    #1

    Monitoring LOG

    Dear,

    I present a problem to monitor a log because it does not know the parameter "[]"

    My check has the following structure:

    Key = the [C:/path/data.log "error in [1.2.7.0.1]"]

    Zabbix not recognize the pattern that contains "[]".

    For his help with the correct syntax for monitoring one's with this structure.

    Saludos
  • bagni
    Senior Member
    Zabbix Certified Specialist
    • Mar 2012
    • 164

    #2
    Hi,
    please check the documentation https://www.zabbix.com/documentation...ypes/log_items

    the key is:
    log[/path/to/file/file_name,<regexp>,<encoding>,<maxlines>,<mode>,<o utput>]
    so i guess in your case you could try:
    log[C:/path/data.log, "error in [1.2.7.0.1]"]

    Comment

    • JJMR
      Junior Member
      • Jan 2015
      • 4

      #3
      Originally posted by bagni
      Hi,
      please check the documentation https://www.zabbix.com/documentation...ypes/log_items

      the key is:
      log[/path/to/file/file_name,<regexp>,<encoding>,<maxlines>,<mode>,<o utput>]
      so i guess in your case you could try:
      log[C:/path/data.log, "error in [1.2.7.0.1]"]
      Bagni

      thanks for the help, but

      not working
      log[C:/path/data.log,"error in [1.2.7.0.1]"]

      if it works
      log[C:/path/data.log,"error in"]

      The problem is "[ ]"

      Comment

      • bagni
        Senior Member
        Zabbix Certified Specialist
        • Mar 2012
        • 164

        #4
        It's a regular expression, so I don't leave the square brackets.
        But you could quote it and dots, try:
        log[C:/path/data.log, "error in \[1\.2\.7\.0\.1\]"]

        Comment

        Working...