Ad Widget

Collapse

monitoring /var/log/messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • faded
    Junior Member
    • Nov 2008
    • 4

    #1

    monitoring /var/log/messages

    couldn't find this option for zabbix: how can I set zabbix to check files like /var/log/messages and identify errors and other kind of messages?
    thanks
  • zibbax
    Junior Member
    • Nov 2008
    • 11

    #2
    Step 1: chgrp zabbix /var/log/messages
    Step 2: Create an item for that host with
    Step 3: key = log[/var/log/messages,VALUE]
    Step 4: Set VALUE to the string or regexp value you wish to watch for in the log
    Step 5: ENJOY!

    Comment

    • faded
      Junior Member
      • Nov 2008
      • 4

      #3
      many thanks, zibbax, worked out for me
      now, can anyone tell me if there is a way to return in zabbix server the exact log from that file? I mean everytime the error appers, i have to ssh the machine and look manualy trough logs.

      Comment

      • zibbax
        Junior Member
        • Nov 2008
        • 11

        #4
        If you view the node group in Monitoring -> Overview you will see the name of the item you made as one of the rows. If you click the tuple (where the row and column for the host meet) for that item/host it will give you the option to view the 500 latest values. This will give you the full strings that match your item key.

        Comment

        • Supriya123
          Junior Member
          • Jun 2019
          • 17

          #5
          Hi Faded,

          Can you show me? exactly what you specified for trigger? I specified the same thing. But I am not receiving any result.

          Here is my item
          Type: Zabbix Agent(Active)
          Key: log[/var/log/messages,"test_all.pl"]
          Type of Information: log
          Log time format: yyyyMMdd:hhmmss

          Trigger:
          servername:log[/var/log/messages,"test_all.pl"].str(test_all.pl)}=0

          But I am not seeing any alert coming in , even I see the string in my /var/log/message.

          I really appreciate your help

          Comment

          Working...