Ad Widget

Collapse

Discussion thread for official Zabbix Template Apache

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlexL
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Aug 2019
    • 55

    #1

    Discussion thread for official Zabbix Template Apache

    This thread is designed to provide grounds for discussion of the upcoming official Zabbix Template for Apache.
    The template and details of the template are available in GIT repository.
    HTTP Monitoring Template:
    Agent Monitoring Template:

    Zabbix is always looking for ways to improve our services and to make our users happier.
    We pride ourselves on doing our best each and every day, but we know that there is always something more to learn.
    We would like to hear back from you to know what have you liked and what would you improve in the template.
    Last edited by AlexL; 30-08-2019, 10:55.
  • AlexL
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Aug 2019
    • 55

    #2
    Templates have been released and are available under the following URL:
    HTTP Monitoring Template: https://git.zabbix.com/projects/ZBX/...pp/apache_http
    Agent Monitoring Template: https://git.zabbix.com/projects/ZBX/...p/apache_agent
    Last edited by AlexL; 04-09-2019, 08:36.

    Comment

    • multazim
      Junior Member
      • May 2018
      • 18

      #3
      Looks like these templates are not compatible with Zabbix 4.0.
      It would be great if official templates are released for 4.0 as well.

      Comment

      • gospodin.horoshiy
        Senior Member
        • Sep 2008
        • 272

        #4
        Hi! This template relies on Javascript so porting it to 4.0 is not that easy. While not that complete, you can try this template instead for 4.0 https://github.com/v-zhuravlev/zbx_template_apache2
        Zbx 2.0.4 on Debian and MYSQL5 on Ubuntu Server 64bit 8.04,
        200+ Win Agents, 50+ Linux Agents, 150+ Network Devices

        Comment

        • langemol
          Junior Member
          • Jul 2018
          • 1

          #5
          I can't seem to get half of the items working. The status page returns
          Code:
           [TABLE]
          [TR]
          [TD] 			
           {"Date":"Fri, 01 Nov 2019 10:48:44 GMT","Server":"Apache/2.4.29 (Ubuntu)","Location":"https://127.0.0.1/server-status?auto","Length":220,"Type":"text/html; charset=iso-8859-1","Workers":{"waiting":0,"starting":0,"reading":0,"sending":0,"keepalive":0,"dnslookup":0,"closing":0,"logging":0,"finishing":0,"cleanup":0,"slot":0}} 			[/TD]
           		[/TR]
          [/TABLE]
          Half of the info the template needs seems to be missing on the page.
          I checked `/etc/apache2/mods-enabled/status.conf` and it has `ExtendedStatus On`.
          I'm running on Ubuntu 18.04

          Comment

          • jgiucci
            Junior Member
            • Apr 2018
            • 2

            #6
            Hi! Great template, nice way to get an example on how to use javascript in preprocessing. Got it working after enabling mod_status on Apache.

            The only thing I had to modify is the first preprocessing step for the "Apache: version" item. I changed the parameter to ":Server" from ":ServerVersion", since that is how it is being reported:

            {"Date":"Fri, 22 Nov 2019 18:12:55 GMT","Server":"Apache/2.4.6 (Red Hat Enterprise Linux) PHP/5.4.16","Length":429,"Type":... Don't know if it is just for this version of Apache.

            Saludos!

            Comment

            • unficyp
              Junior Member
              • Dec 2014
              • 27

              #7
              How can i set http scheme ? Seems like Agent is always connecting using https.
              thanks

              Comment

              • jkangas
                Junior Member
                • Mar 2016
                • 1

                #8
                Curious why there is no default Trigger for Apache Slots being full. Also curious how to prevent the server-status Items from going into a disabled state when all apache slots are full. We just applied this template and we're running into this exact issue. Http call to get server-status timesout due to no apache slots and then the server-status items become disabled as a result. How would we prevent this from happening?

                Comment

                • Yasumi
                  Junior Member
                  • Sep 2020
                  • 1

                  #9
                  There is a part that I do not understand the specifications of this template so much.

                  Below is the information I got with "Get Apache".
                  {"Connection":"close","Length":211,"Type":"text/html; charset=iso-8859-1","Date":"Thu, 03 Sep 2020 03:54:52 GMT","Server":"Apache/2.4.37 (centos) OpenSSL/1.1.1c","Workers":{"waiting":0,"starting":0,"readi ng":0,"sending":0,"keepalive":0,"dnslookup":0,"c lo sing":0,"logging":0,"finishing":0,"cleanup":0,"slo t":0}}

                  Apparently, it seems that the information corresponding to the following items has not been acquired.
                  Is this normal behavior?
                  apache.workers_total.busy
                  apache.workers_total.idle
                  apache.requests.rate
                  apache.requests
                  apache.bytes.rate
                  apache.bytes

                  Comment

                  • Leonid Kabanov
                    Junior Member
                    • Mar 2021
                    • 1

                    #10
                    Type of "Apache: Total bytes" should be changed to "Numeric (unsigned)":

                    6549:20210302:000202.127 item "web17 server:apache.bytes" became not supported: Value 1000003696640 is too small or too large.
                    6550:20210302:000302.469 error reason for "web17 server:apache.bytes" changed: Value 1000005673984 is too small or too large.

                    Comment

                    • Lizzardd
                      Junior Member
                      • Mar 2021
                      • 1

                      #11
                      I'm a little confused as to the trigger below
                      Apache: Process is not running - {TEMPLATE_NAMEroc.num["{$APACHE.PROCESS_NAME}"].last()}=0
                      This will always be in "Problem" state while apache is running as the results will be greater than 0.
                      When Apache is stopped this will be in state "OK"

                      I see there are also dependencies off of this trigger, is this the correct and intended behaviour?

                      Comment

                      • Alec
                        Junior Member
                        • Mar 2021
                        • 1

                        #12
                        Hello,

                        Since the update to zabbix 5.2.5 the "zabbix agent 2" on the servers where this template is activated crash :

                        zabbix_agent2[488]: panic: runtime error: index out of range [0] with length 0
                        zabbix_agent2[488]: goroutine 45076 [running]:
                        zabbix_agent2[488]: zabbix.com/plugins/proc.getProcesses(0xb, 0xc0003c3400, 0x79, 0x80, 0x0, 0x0)
                        zabbix_agent2[488]: /build/zabbix/src/zabbix-5.2.5/src/go/plugins/proc/procfs_linux.go:142 +0x93f
                        zabbix_agent2[488]: zabbix.com/plugins/proc.(*Plugin).Collect(0x124f220, 0x0, 0x0)
                        zabbix_agent2[488]: /build/zabbix/src/zabbix-5.2.5/src/go/plugins/proc/proc_linux.go:217 +0xb7
                        zabbix_agent2[488]: zabbix.com/internal/agent/scheduler.(*collectorTask).perform.func1(0xc000197 a40, 0xe45218, 0xc0002280a0)
                        zabbix_agent2[488]: /build/zabbix/src/zabbix-5.2.5/src/go/internal/agent/scheduler/task.go:104 +0x6f
                        zabbix_agent2[488]: created by zabbix.com/internal/agent/scheduler.(*collectorTask).perform
                        zabbix_agent2[488]: /build/zabbix/src/zabbix-5.2.5/src/go/internal/agent/scheduler/task.go:102 +0xb1
                        Last edited by Alec; 12-03-2021, 18:42.

                        Comment

                      • ddougan
                        Junior Member
                        • Jun 2020
                        • 17

                        #13
                        I'm seeing these errors in the zabbix_server log (for Apache on the server itself):

                        Code:
                        1. Failed: cannot extract value from json by path "$.IdleWorkers": no data matches the specified path
                        2987:20210424:104340.164 error reason for "Zabbix server:apache.workers_total.busy" changed: Preprocessing failed for: {"Date":"Sat, 24 Apr 2021 17:43:40 GMT","Server":"Apache/2.4.37 (centos) OpenSSL/1.1.1g","Length"...
                        1. Failed: cannot extract value from json by path "$.BusyWorkers": no data matches the specified path
                        2987:20210424:104340.164 error reason for "Zabbix server:apache.bytes.rate" changed: Preprocessing failed for: {"Date":"Sat, 24 Apr 2021 17:43:40 GMT","Server":"Apache/2.4.37 (centos) OpenSSL/1.1.1g","Length"...
                        1. Failed: cannot extract value from json by path "$["Total kBytes"]": no data matches the specified path
                        This is on Zabbix 5.2 on CentOS 8, updated recently. I'm not sure what these are being caused by.

                        Comment

                        • Colttt
                          Senior Member
                          Zabbix Certified Specialist
                          • Mar 2009
                          • 878

                          #14
                          Hello,

                          I got the error:
                          HTTP get error: cannot resolve [http://127.0.0.1:60080/server-status?auto]
                          but if I run this command on the machine it works fine:
                          Code:
                          curl http://127.0.0.1:60080/server-status?auto
                          127.0.0.1
                          ServerVersion: Apache/2.4.38 (Debian) OpenSSL/1.1.1d
                          ServerMPM: prefork
                          Server Built: 2020-08-25T20:08:29
                          CurrentTime: Monday, 20-Sep-2021 16:57:17 CEST
                          RestartTime: Wednesday, 08-Sep-2021 09:43:58 CEST
                          ParentServerConfigGeneration: 14
                          ParentServerMPMGeneration: 13
                          ServerUptimeSeconds: 1062799
                          ServerUptime: 12 days 7 hours 13 minutes 19 seconds
                          Load1: 0.00
                          Load5: 0.00
                          Load15: 0.00
                          Total Accesses: 64530
                          Total kBytes: 1252525
                          Total Duration: 777144864
                          CPUUser: 17.49
                          CPUSystem: 37.45
                          CPUChildrenUser: 387.39
                          CPUChildrenSystem: 113.01
                          CPULoad: .0522526
                          Uptime: 1062799
                          ReqPerSec: .060717
                          BytesPerSec: 1206.8
                          BytesPerReq: 19875.8
                          DurationPerReq: 12043.2
                          BusyWorkers: 1
                          IdleWorkers: 9
                          Scoreboard: __...__._.._..._..W......_...._................... .................................................. ..................................................
                          TLSSessionCacheStatus
                          CacheType: SHMCB
                          CacheSharedMemory: 512000
                          CacheCurrentEntries: 11
                          CacheSubcaches: 32
                          CacheIndexesPerSubcaches: 88
                          CacheTimeLeftOldestAvg: 67
                          CacheTimeLeftOldestMin: 8
                          CacheTimeLeftOldestMax: 93
                          CacheIndexUsage: 0%
                          CacheUsage: 0%
                          CacheStoreCount: 1672
                          CacheReplaceCount: 0
                          CacheExpireCount: 1652
                          CacheDiscardCount: 0
                          CacheRetrieveHitCount: 1
                          CacheRetrieveMissCount: 5
                          CacheRemoveHitCount: 9
                          CacheRemoveMissCount: 7
                          any hints for this?
                          Debian-User

                          Sorry for my bad english

                          Comment

                        • nikolam
                          Junior Member
                          • Mar 2022
                          • 3

                          #15
                          Hello,

                          I have upgraded Zabbix from 5.4 LTS to 6.0 LTS version and wanted to use apache2 template check that is working with new Zabbix version.

                          I've edited in template process name to {$APACHE.PROCESS_NAME} from httpd to apache2 and port and status scheme to 443 and https.

                          One server is working alright, while others aren't. Reason is the IP address. On that server where is status check working, it has IP redirection to domain name.
                          Just wanted to write in case someone had same issues as me trying to make it work.

                          Is there a way for zabbix to use domain name as status check? Macro that taking value of agent domain name and trying to do /server-status/ .
                          If its like this it would work no matter what for everyone, due that many servers don't have IP redirect to the domain name where I put /server-status/ check.

                          If someone has a solution on their mind let me know or if my idea for macro is good then what is the macro that grabs that value?

                          TIA
                          Attached Files

                          Comment

                          Working...