Ad Widget

Collapse

Apache logs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adnan
    Junior Member
    • Jan 2017
    • 11

    #1

    Apache logs

    Hi,

    I want to display the apache logs of my server. Their is an permission error, Kindly suggest the solution

    active check "log["/var/log/httpd/everycatalog-error_log"]" is not supported: Cannot obtain information for file "/var/log/httpd/everycatalog-error_log": [13] Permission denied
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Please check the authority so that the user executing the agent can access it.
    For example, is the /var/log/httpd directory accessible only as the root user?
    It is necessary to make it accessible to zabbix user.

    - Access right to the directory where the log file is located
    - Permission to read the log file

    Comment

    • adnan
      Junior Member
      • Jan 2017
      • 11

      #3
      I added the zabbix user in a group called www-data and assigned the apache folder. It has read and excute to the folder and file has read access.

      drwxr-x---. 2 root www-data 4096 Feb 6 18:25 httpd

      -rw-r-xr-- 1 root www-data 2661 Feb 6 18:25 item-error_log

      Still permission denied issue
      Last edited by adnan; 07-02-2017, 15:46.

      Comment

      • Pada
        Senior Member
        • Apr 2012
        • 236

        #4
        What is the output when you run like:

        Code:
        su zabbix -s /bin/bash -c "tail /var/log/httpd/everycatalog-error_log"
        ?

        Comment

        • adnan
          Junior Member
          • Jan 2017
          • 11

          #5
          It is showing the logs.

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #6
            Have you restarted the Zabbix agent after changing the permissions?

            Comment

            • adnan
              Junior Member
              • Jan 2017
              • 11

              #7
              Yes. The main issue that initially when i create the item it is enabled and showing result in latest but after few mins the item showing permission denied error.

              Comment

              Working...