Ad Widget

Collapse

Log monitoring, Display alert on Dashboard, email notification error messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • z.mpintor07
    Junior Member
    • Jan 2021
    • 7

    #1

    Log monitoring, Display alert on Dashboard, email notification error messages

    Can I ask for an assistance on how to do this.

    My requirement is to have an alert where I can receive an email if an error occurred on an application we have on Linux.

    It will display on the dashboard and send an email about the error with the error log.

    I tried by making a log monitoring item on a host and use that item for a trigger:
    {Odoo Server:log["/var/log/gold/gold-server.log",,,100].regexp("\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d+\s\d+\sERROR")}>0

    It only sends me the lines on the emails.

    Can anyone help me?
  • z.mpintor07
    Junior Member
    • Jan 2021
    • 7

    #2
    Yes if possible. Do the log key only catch 1 line?

    Comment

    • z.mpintor07
      Junior Member
      • Jan 2021
      • 7

      #3
      so only the "timestamp error" can be caught?

      is there a way to view the error on the frontend?

      Comment

      • z.mpintor07
        Junior Member
        • Jan 2021
        • 7

        #4
        now I am trying to get something on a log monitor i made just a play log[file] key and a trigger.

        But I am not picking up any error log.

        Here is my expression:

        {Odoo Server:log["/var/log/gold/gold-server.log"].regexp("\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d+\s\d+\sERROR\s*.+")}>= 1

        Comment

        • z.mpintor07
          Junior Member
          • Jan 2021
          • 7

          #5
          I can't display the error log line I got on the email. Help.

          Comment

          • z.mpintor07
            Junior Member
            • Jan 2021
            • 7

            #6
            Can I disable the resolved email for my trigger on the log monitoring item?

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              You want whole log to be sent?

              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                Duh...
                "If output is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except 'Result is TRUE' always return the whole matched line and the output parameter is ignored."
                https://www.zabbix.com/documentation...s/zabbix_agent

                Pulling whole log can be done with vfs.file.contents, but its limited to files smaller than 64k...

                Comment

                Working...