Ad Widget

Collapse

Unable to monitor apache using zabbix agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • megabhz
    Junior Member
    • Sep 2023
    • 1

    #1

    Unable to monitor apache using zabbix agent

    I'm following https://www.zabbix.com/documentation...monitor_apache to monitor an Apache server, and I can see that "httpd -M | grep status​" is showing "status_module (shared)​" enabled as per below - My Zabbix Server was installed using Appliance:

    [root@fcserver1 ~]# httpd -M | grep status
    status_module (shared)

    ​My apache is:

    [root@fcserver1 ~]# httpd -v
    Server version: Apache/2.4.57 (codeit)
    Server built: Apr 6 2023 17:31:33

    ​I have this Zabbix agent installed:

    [root@fcserver1 ~]# rpm -qa | grep -i zabbix
    zabbix-release-6.4-1.el9.noarch
    zabbix-agent-6.4.6-release1.el9.x86_64

    I was able to add the below line into "/etc/httpd/conf.modules.d/status.conf​":

    <Location "/server-status"> SetHandler server-status Require ip 192.168.10.230 </Location>

    However, the apache server is not restarting due to the below error - can you please help me?

    Sep 04 17:03:30 fcserver1.localdomain systemd[1]: Starting The Apache HTTP Server...
    Sep 04 17:03:30 fcserver1.localdomain httpd[54933]: httpd: Syntax error on line 59 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.modules.d/status.conf: /etc/httpd/conf.modules.d>
    Sep 04 17:03:30 fcserver1.localdomain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
    Sep 04 17:03:30 fcserver1.localdomain systemd[1]: httpd.service: Failed with result 'exit-code'.
    Sep 04 17:03:30 fcserver1.localdomain systemd[1]: Failed to start The Apache HTTP Server.

    ​Thank you!
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    not in row!

    <Location /server-status>
    SetHandler server-status
    Require ip 192.168.10.230
    </Location>


    Comment

    Working...