Ad Widget

Collapse

not able to monitor apache httpd-2.4.57 in zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepmp
    Junior Member
    • Aug 2023
    • 19

    #1

    not able to monitor apache httpd-2.4.57 in zabbix

    Hello, I am using zabbix agent 2, on rhel 7.9 . I need to monitor a webserver running httpd-2.4.57 . most of the variables are showing not supported. Pls see the below screenshot

    Click image for larger version

Name:	image.png
Views:	1056
Size:	58.4 KB
ID:	469563
    In my httpd.conf file, I have added the following lines at bottom is as shown below

    Click image for larger version

Name:	image.png
Views:	966
Size:	17.9 KB
ID:	469564

    in folder /etc/httpd/conf.d, I have the my_website_name.conf and here also i ve added the same lines

    Click image for larger version

Name:	image.png
Views:	962
Size:	6.8 KB
ID:	469565

    I am using Apache by zabbix agent template with settings as below
    Click image for larger version

Name:	image.png
Views:	950
Size:	29.4 KB
ID:	469566

    pls guide me in this regard​​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    If an item is not supported, you should see reason, when you click on that red exclamation mark beside it...
    If some of those dependent items are ok and some not, there is probably some missing data in output...

    Comment

    • pradeepmp
      Junior Member
      • Aug 2023
      • 19

      #3
      this is another screenshot showing errors.
      Click image for larger version

Name:	image.png
Views:	941
Size:	42.5 KB
ID:	469615
      is this a bug in zabbix-agent2. There is another webserver where zabbix-agent2 is running perfectly well. All apache variables are fetched. same apache version and rhel 7.9. same apache configuration.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        The item Apache Requests per second is a Dependent item, right? Isn't the value of the parent item not being retrieved correctly?
        Also, if that parent item is being retrieved via Zabbix agent 2 and calling the local httpd server-status, I think you should allow access from 127.0.0.1.​

        Comment

        • pradeepmp
          Junior Member
          • Aug 2023
          • 19

          #5
          So should i be modifying code like this?

          <Location "/server-status">
          SetHand1er server-status
          Order deny, allow
          Deny from all
          Allow from 127.0.0.1
          </Location>​​

          Attached Files

          Comment

          • pradeepmp
            Junior Member
            • Aug 2023
            • 19

            #6
            Tried all methods. No hope. Same configuration on HA machine, of same website, works. but on primary machine not at all working. Same apache version, same zabbix agent, monitoring from same server.

            Comment

            • tim.mooney
              Senior Member
              • Dec 2012
              • 1427

              #7
              Have you actually looked at the httpd access_log, to verify that zabbix agent2 is attempting to connect on the frequency you expect? Have you increased the log level on the system that is having problems, to see if a clue about the problem appears in the error_log?

              It's not causing the problem here, but you're using deprecated access control syntax (Order, Deny, Allow). You should switch to the modern access control syntax.

              Comment

              • pradeepmp
                Junior Member
                • Aug 2023
                • 19

                #8
                my rhel version
                # hostnamectl
                Virtualization: kvm
                Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
                CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server
                Kernel: Linux 3.10.0-1160.71.1.el7.x86_64
                Architecture: x86-64​


                apache version
                # httpd -v
                Server version: Apache/2.4.57 (codeit)
                Server built: Apr 6 2023 17:31:51​


                I tested the modern access control syntax
                In my httpd.conf file I've added

                &lt;Location "/server-status"&gt;
                SetHandler server-status
                Require all denied
                Require ip 127.0.0.1 192.168.1.171
                &lt;/Location&gt;
                ExtendedStatus On
                TraceEnable Off
                ServerName 127.0.0.1​


                httpd error log entries:

                [Sun Sep 03 02:13:00.390273 2023] [access_compat:error] [pid 25794:tid 139904566671104] [client 127.0.0.1:41376] AH01797: client denied by server configuration: /var/www/html/futuriq/server-status
                [Sun Sep 03 02:14:00.632394 2023] [access_compat:error] [pid 25862:tid 139904575063808] [client 127.0.0.1:41402] AH01797: client denied by server configuration: /var/www/html/futuriq/server-status
                [Sun Sep 03 02:15:00.408441 2023] [access_compat:error] [pid 25794:tid 139904423995136] [client 127.0.0.1:41434] AH01797: client denied by server configuration: /var/www/html/futuriq/server-status
                .
                .

                similar entries.

                access logs has these entries
                192.168.1.171 - - [03/Sep/2023:03:09:00 +0530] "GET /server-status?auto HTTP/1.1" 404 13535 "-" "Zabbix 6.4.6"
                .
                .
                similar entries


                .htaccess file
                # Disable Directory Listing
                Options -Indexes

                # Deny Access to Certain Files by Extension
                &lt;FilesMatch "\.(env|json|config\.js|md|gitignore|gitattrib utes |lock)$"&gt;
                Order deny,allow
                Deny from all
                &lt;/FilesMatch&gt;

                &lt;IfModule mod_rewrite.c&gt;
                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ /index.php/$1 [L]
                &lt;/IfModule&gt;


                I think there is something wrong in htaccess.

                My httpd.conf file is attached​
                Attached Files

                Comment

                • pradeepmp
                  Junior Member
                  • Aug 2023
                  • 19

                  #9
                  I have used the modern access control syntax inside httpd.conf
                  <Location "/server-status">
                  SetHandler server-status
                  Require all denied
                  Require ip 127.0.0.1 192.168.1.171
                  </Location>

                  Comment

                  • pradeepmp
                    Junior Member
                    • Aug 2023
                    • 19

                    #10
                    # links http://192.168.1.171/server-status says link Expired. I think this is cause

                    Comment

                    • pradeepmp
                      Junior Member
                      • Aug 2023
                      • 19

                      #11
                      solved the issue. .htaccess was rewriting all urls

                      Comment

                      • pradeepmp
                        Junior Member
                        • Aug 2023
                        • 19

                        #12
                        I am using latest zabbix 6.4.1. I too facing error "Zabbix value cache working in low memory mode". average use of value cache is 70%. Default value in zabbix_server.conf is 8M. Is it ok to double it ?
                        and what does HistoryIndexCacheSize and HistoryCacheSize do? Do I have to increase them also?​

                        Comment

                        • cyber
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Dec 2006
                          • 4807

                          #13
                          Originally posted by pradeepmp
                          I am using latest zabbix 6.4.1. I too facing error "Zabbix value cache working in low memory mode". average use of value cache is 70%. Default value in zabbix_server.conf is 8M. Is it ok to double it ?
                          and what does HistoryIndexCacheSize and HistoryCacheSize do? Do I have to increase them also?​
                          yes, of course it is OK to increase the value, if it becomes too small.
                          Descriptions for different parameters you can find here .. https://www.zabbix.com/documentation.../zabbix_server

                          Comment

                          • pradeepmp
                            Junior Member
                            • Aug 2023
                            • 19

                            #14
                            Tnks it is resolved now.

                            Comment

                            • pradeepmp
                              Junior Member
                              • Aug 2023
                              • 19

                              #15
                              But I have another issue. Below is of log zabbix server 6.4.1 installed on RHEL 8 machine.

                              # tail -f /var/log/zabbix/zabbix_server.log
                              Start tag expected, '<' not found
                              ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password:
                              ^
                              parser error : Start tag expected, '<' not found
                              ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password:
                              ^
                              2217281:20230912:220532.749 cannot send list of active checks to "127.0.0.1": host [zabbix-server] not found


                              And zabbix agent log on same machine
                              tail -f /var/log/zabbix/zabbix_agentd.log
                              2218088:20230912:221107.856 no active checks on server [127.0.0.1:10051]: host [zabbix-server] not found
                              2218088:20230912:221112.858 no active checks on server [127.0.0.1:10051]: host [zabbix-server] not found



                              But zabbix server is working fine with almost 200 clients . I am getting all zabbix server monitoring parameters on front end. No issues. But why do these error msg keep displaying? ​

                              Comment

                              Working...