Ad Widget

Collapse

how to monitor apache in zabbix server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jnagaraj
    Junior Member
    • Jul 2011
    • 16

    #1

    how to monitor apache in zabbix server?

    First of all thanks for the wonderful zabbix software with enough features.

    I have couple of questions while monitoring individual process in zabbix server

    How do I monitor apache2 in zabbix server? As I have gone through the zabbix wiki I didn't get it properly.

    I would need your assistance to help monitoring the apache2 in zabbix server..
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    you can use the search fuction in this forum..

    or take a look at this:
    Debian-User

    Sorry for my bad english

    Comment

    • jnagaraj
      Junior Member
      • Jul 2011
      • 16

      #3
      Process Monitoring for Individual process

      Is there any way to monitor a single process like by itself.

      if the process has been failed for some reason then alert message should be sent through mail.

      if the process has been success then alert message should be sent through mail.

      Like that process itself should be restarted by itself.

      Is there any script to work on it or any command is there.

      Comment

      • moo
        Junior Member
        • Aug 2010
        • 22

        #4
        You can monitor single processes - for mine I just use proc num and if it ever equals zero threads I get notified.

        {hostnameroc.num[processname].last(0)}=0

        Bear in mind you can only monitor if its running or not running - so it doesn't work so well if you're trying to look out for crashes.

        What you could do is program/script the service itself to write out to a file - then you could get zabbix to monitor output of that text file & if it stops writing then zabbix would notify you - little bit of a messy solution though.

        Comment

        • jnagaraj
          Junior Member
          • Jul 2011
          • 16

          #5
          Process Monitoring for Individual process

          Would you please provide me a small example for apache process

          where this needs to be keyed in the zabbix web host {hostnameroc.num[processname].last(0)}=0

          Do I need specify my own script for apache in order for stop and restart of apache?

          Comment

          • moo
            Junior Member
            • Aug 2010
            • 22

            #6
            Well it depends really - if you're happy just monitoring if the apache process is simply up or down, then you would create an Item in the web front end, and a corresponding trigger so that an action can be taken (i.e. email) to notify you of the drop.

            Creating items & triggers is covered in the manual which can be found here;

            http://www.zabbix.com/documentation.php

            This will talk you through how to obtain proc.num & it's associated values (it's actually easier than it looks - there's dropdowns for the values so you can choose > < = etc, and then you just specify the number).

            Be sure to check that you've got the process name right when you put it into zabbix

            I'm not sure how you would script in support to monitor the processes integrity itself, someone a bit more elite might be able to help with that - also it's worth asking about that on the apache forums.

            Comment

            • jnagaraj
              Junior Member
              • Jul 2011
              • 16

              #7
              Process Monitoring for Individual process

              Thank you for your feedback..

              "Be sure to check that you've got the process name right when you put it into zabbix "

              In case if the process name is not there under configuration->host
              and then add we can through template or else any other way is there.

              Note: Process name should be specified under host configuration.

              Comment

              • moo
                Junior Member
                • Aug 2010
                • 22

                #8
                you would specify the process name yourself

                so you would ensure you've got the right service name from the box you're monitoring - i.e. if you're running grep (poor example but an example nonetheless!) and grep is what the process is called on the host machine;

                so you'd end up with {hostnameroc.num[grep].last(0)}=0

                basically, always remember that zabbix will only do what you tell it to do - so whilst you have templates for triggers & items - it won't know that you're trying to do with them until you give it the correct parameters

                Comment

                • jnagaraj
                  Junior Member
                  • Jul 2011
                  • 16

                  #9
                  Process Monitoring for Individual process

                  If I have run this command, wherein I am receiving an error syntax error.
                  /zabbix/sbin#./zabbix_agentd {127.0.0.1roc.num[grep].last(0)}=0}
                  -bash: syntax error near unexpected token `('

                  I am unable to fix this error any idea to

                  Comment

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

                    #10
                    what would you do??

                    Code:
                    {hostnameroc.num[grep].last(0)}=0
                    this must in the GUI from zabbix..
                    Debian-User

                    Sorry for my bad english

                    Comment

                    • jnagaraj
                      Junior Member
                      • Jul 2011
                      • 16

                      #11
                      Process Monitoring for Individual process

                      just looking for it how it can rectified?

                      Comment

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

                        #12
                        you have an PM

                        take a lokk in the documentation..
                        http://www.zabbix.com/documentation/1.8/ or in the quickstart http://www.zabbix.com/documentation/...ual/quickstart

                        you must add an Item. Configuration->Hosts you´ll se all you hosts click on itmes and then on the top right "create item"
                        Debian-User

                        Sorry for my bad english

                        Comment

                        • jnagaraj
                          Junior Member
                          • Jul 2011
                          • 16

                          #13
                          Process Monitoring for Individual process

                          Just now I have tried wherein Template Linux ({Template_Linuxroc.num[apache2].last(0)}<1) the apache is working, but for
                          {Zabbix serverroc.num[apache2].last(0)}=0 is not working while triggering it not sure why exactly happens.

                          Comment

                          • jnagaraj
                            Junior Member
                            • Jul 2011
                            • 16

                            #14
                            Process Monitoring for Individual process

                            how to kill a apache process in zabbix? any thing is there to work on it.

                            Comment

                            Working...