Ad Widget

Collapse

Monitoring log file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • macky
    Junior Member
    • Nov 2019
    • 1

    #1

    Monitoring log file

    Hi,

    I found out that this Zabbix is powerful. However, I am really new with this and I want really want to monitor the a log file that contains the status of a job that I was being executed via cron.

    Here is the sample log file:

    "host":"21072072","status":"FAILED","startdate":"2 019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072073","status":"FAILED","startdate":"2 019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072074","status":"Success","startdate":" 2019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072075","status":"Success","startdate":" 2019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072076","status":"FAILED","startdate":"2 019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072077","status":"FAILED","startdate":"2 019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072078","status":"Success","startdate":" 2019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072079","status":"Success","startdate":" 2019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"
    "host":"21072080","status":"FAILED","startdate":"2 019/10/31 00:01:01","enddate":"2019/10/31 01:33:36"

    I just want to display the "status" and the "host" in the monitoring dashboard.

    Could someone help/guide me on how to accomplish this?

    Super Thank you in advance!

  • Grzegorz Wiktorowski
    Junior Member
    • Nov 2018
    • 5

    #2

    Comment

    • yishai
      Junior Member
      • Nov 2019
      • 2

      #3
      you can also check out this video with examples:

      Comment

      • Nguyen Trang
        Junior Member
        • Nov 2019
        • 2

        #4
        If you have not done it yet, you can try my config

        Item key: log[/tmp/test.log,""host":"(.[0-9]+)"."status":"(.[a-zA-Z]+)".*",,,,host: \1 status: \2]

        The output will be like the image below
        Attached Files

        Comment

        Working...