Ad Widget

Collapse

More Apache Monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gpmidi
    Member
    • Aug 2009
    • 62

    #31
    Problem With Type Of Check

    Originally posted by FireMail
    hi paul,

    i sent you the debug log since the server logs dont show anything.
    Maybe my setup is just weird or the agentd isnt correctly configured?

    We have X servers - each running agentd.
    The server "MONITORING" (DNS via /etc/hosts: "MONITORING", local IP Adress: 192.168.0.10) runs the zabbix_server which uses the DB on "TS" (DNS via /etc/hosts: "TS", local IP Adress: 192.168.0.11) to store the information. The web frontend is also located on "TS".

    Heres the configuration of the zabbix_server on "MONITORING"


    Heres the configuration of the zabbix_agentd on "TS"
    Try using mass-update to change the type of check from "Zabbix Agent (Active)" to "Zabbix Trapper". I --think-- that will fix the problem you're having. In either case I'll be updating the XML Import with the right check type in the next couple days.
    -Paul

    Comment

    • FireMail
      Junior Member
      • Mar 2010
      • 13

      #32
      sadly it didnt remove the problem.

      The items now stay activated, but still "failed: 20"

      Comment

      • gpmidi
        Member
        • Aug 2009
        • 62

        #33
        Edit the script and send resulting file

        Originally posted by FireMail
        sadly it didnt remove the problem.

        The items now stay activated, but still "failed: 20"
        Let's gather some debug info:
        1. Edit the script and change the line with "os.remove(tempfilepath)" to "print tempfilepath". Make sure that the number of spaces before the "os.re..." is the same as before "print..." (Python uses spacing instead of {}).
        2. Run the script
        3. At the end of the script it will print out a path. Send me the contents of that file (paul at gpmidi dot ignorethis net).
        4. Revert the script back to normal.


        If you have problems with editing the script let me know and I'll post a debug version or something. Also, I'll be in the Zabbix IRC channel (#zabbix on freenode) today. So just say my name a few times to get my attention or, better yet, directly send me a message via IRC.
        -Paul (gpmidi_wrk on IRC)

        Comment

        • FireMail
          Junior Member
          • Mar 2010
          • 13

          #34
          contacted you via IRC, hope we find the problem

          Comment

          • gpmidi
            Member
            • Aug 2009
            • 62

            #35
            Originally posted by FireMail
            contacted you via IRC, hope we find the problem
            Firemail and I worked together via IRC and figured out that it's the keys. The key in the template is "apache[localhost,BusyWorkers]" and the template is sending it as "apache[TS,BusyWorkers]". TS is the hostname of the Apache instance that is being monitored.

            This raises the question about how to fix this. This leaves up with a couple of options:
            1. Alter the script so that items are sent up like "apache[BusyWorkers]". This would remove the ability to monitor multiple Apache instances with a single Zabbix host.
            2. Alter the script so that (by default) items are sent up like "apache[,BusyWorkers]" but there is a flag that will cause it to send up with the hostname of the Apache server it's checking (ie "apache[somehostname,BusyWorkers]"
            3. Use host level macros to do something like "apache[{$APACHEHOST},BusyWorkers]". This should work in theory but am having problems getting this working.
            4. Use something like "apache[{HOSTNAME},BusyWorkers]". I'm not even sure if this will work. FireMail's testing indicates that it doesn't. This method would be the ideal solution as it will always work but allow users to override the checked host.

            Comment

            • fraenki
              Junior Member
              • May 2008
              • 6

              #36
              I'd like to suggest to use the Apache ScoreBoardFile to gather information. While the /server-status page may be unresponsive due to high server load, the ScoreBoardFile is always available.

              The script "ftss" is able to present the ScoreBoardFile in plaintext to make processing with Zabbix easy:

              Code:
              # ftss /var/run/apache_status
              13762   K       127.0.0.1       127.0.0.1       GET / HTTP/1.1
              13763   _
              13764   _
              13765   _
              13766   _
              13767   _
              It's easy to use and to implement... just take a look at the Website for a 3-step manual:



              Bye
              - fraenki
              Last edited by fraenki; 30-03-2010, 10:09.

              Comment

              • FireMail
                Junior Member
                • Mar 2010
                • 13

                #37
                hi paul,

                i know its not directly related to you but something i wanted to ask. is it possible that the "kb/s" value of the apache status is already an average over the time the apache is running?
                after 2 days it finally reached 95kb/s and doesnt even move slightly between peak hours and the night where it should be lower.

                Comment

                • bashman
                  Senior Member
                  • Dec 2009
                  • 432

                  #38
                  If you don't want to use a python script you can use zapache
                  978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                  Comment

                  • gpmidi
                    Member
                    • Aug 2009
                    • 62

                    #39
                    Originally posted by FireMail
                    hi paul,

                    i know its not directly related to you but something i wanted to ask. is it possible that the "kb/s" value of the apache status is already an average over the time the apache is running?
                    after 2 days it finally reached 95kb/s and doesnt even move slightly between peak hours and the night where it should be lower.
                    Sounds like it is averaged. But I don't know for sure.
                    -Paul

                    Comment

                    • gpmidi
                      Member
                      • Aug 2009
                      • 62

                      #40
                      Originally posted by fraenki
                      I'd like to suggest to use the Apache ScoreBoardFile to gather information. While the /server-status page may be unresponsive due to high server load, the ScoreBoardFile is always available.

                      The script "ftss" is able to present the ScoreBoardFile in plaintext to make processing with Zabbix easy:

                      Code:
                      # ftss /var/run/apache_status
                      13762   K       127.0.0.1       127.0.0.1       GET / HTTP/1.1
                      13763   _
                      13764   _
                      13765   _
                      13766   _
                      13767   _
                      It's easy to use and to implement... just take a look at the Website for a 3-step manual:



                      Bye
                      - fraenki
                      I'm going to look into doing this. Thanks for the tip!
                      -Paul

                      Comment

                      • gpmidi
                        Member
                        • Aug 2009
                        • 62

                        #41
                        Originally posted by bashman
                        If you don't want to use a python script you can use zapache
                        The downside is that you make a call to mod_status for each value you pull. This adds significant overhead if mod_status is showing the state of every process. Plus it doesn't parse state of all of the processes.
                        -Paul

                        Comment

                        • bashman
                          Senior Member
                          • Dec 2009
                          • 432

                          #42
                          The downside is that you make a call to mod_status for each value you pull. This adds significant overhead if mod_status is showing the state of every process. Plus it doesn't parse state of all of the processes.
                          -Paul
                          You're right Paul, but I don't want to use neither a perl scrip nor a zabbix_sender. Is there another way to do it?.

                          Thanks.
                          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                          Comment

                          • gpmidi
                            Member
                            • Aug 2009
                            • 62

                            #43
                            Originally posted by bashman
                            You're right Paul, but I don't want to use neither a perl scrip nor a zabbix_sender. Is there another way to do it?.

                            Thanks.
                            You could, in theory, do all of what my Python script does in Bash. However it would be difficult.
                            -Paul

                            Comment

                            • radamand
                              Member
                              • Aug 2008
                              • 89

                              #44
                              is there any way to get this to work for a host using SSL with a self signed cert?

                              Comment

                              • gpmidi
                                Member
                                • Aug 2009
                                • 62

                                #45
                                Depends

                                Originally posted by radamand
                                is there any way to get this to work for a host using SSL with a self signed cert?
                                It may work with a self-signed cert. Depending on the version of Python it may or may not do certificate validation.
                                -Paul

                                Comment

                                Working...