Ad Widget

Collapse

No data for log monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gcaccia
    Junior Member
    • Jul 2014
    • 3

    #1

    No data for log monitoring

    I'm a new user to Zabbix. I'm trying to get log monitoring to work with Zabbix 2.0.4. I want to see trends for "ERROR" occurrences in a tomcat app log file. I've created an item for the host of type "Zabbix agent (active)", with a key of "log[/var/tom8080/logs/app,ERROR]", a "type of information" of "Log" and status enabled.

    I've confirmed that the Zabbix agent user has read access to the log file and that "hostname" is properly set in the zabbix_agentd.conf file on the host where the log file resides.

    I have confirmed that there are ERROR instances in the log file and I can send requests that generate new ERROR entries. Despite all this, when I view a graph of the item for the host there is no data. What am I missing?
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome!

    So far you have done all the troubleshooting steps right.
    Can you verify that the path and file name is correct?
    /var/tom8080/logs/app
    For a test, could you create another small test file with a simple key and having only values ok and error in the log file?
    Code:
    log[/var/log/test/testlog.log,^ok$|^error$]
    Can you get any data from this test item?

    Best Regards,
    Ingus

    Comment

    • gcaccia
      Junior Member
      • Jul 2014
      • 3

      #3
      Yes, the path and filename are correct. I created a new testlog.log file with content of "ok" and "error", though I used the same directory as the other log file (not sure if that was important or not). Then, in Zabbix I first created a new template. I then added a new item to that template and configured that item for log monitoring for the test log file. I then added that template to the host where the log file resides. Finally, I went to Monitoring->Latest Data and selected the host from the Group/Host combo boxes in the upper right. I then found my item. It shows "Never" for the "Last Check" column. It shows "-" for the "Last Value" column. For the original item that I set up, it actually shows a date of yesterday for "Last Check", but shows a value of 0 for "Last Value" and shows nothing when I view history.

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        Ok, thank you for info!
        Then please check permissions for the user account under which zabbix_server is running, whether it has access to read the contents of that log file directory.

        Best Regards,
        Ingus

        Comment

        • gcaccia
          Junior Member
          • Jul 2014
          • 3

          #5
          did you really mean zabbix_server or zabbix_agent? I have confirmed that the user account under which zabbix_agent is running has read access to the contents of the log file directory. zabbix server is not running on that host.

          Comment

          • Wamuyu
            Junior Member
            • Jan 2023
            • 1

            #6
            Is there a solution for this? I have run into the same error and I cant seem to find a solution.

            Comment

            Working...