Ad Widget

Collapse

it says "Apache is not running on {HOSTNAME}" but it is running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rvvn
    Junior Member
    • Jul 2007
    • 3

    #1

    it says "Apache is not running on {HOSTNAME}" but it is running

    hello,

    I just installed zabbix 1.4.1 on suse linux servers (opensuse 10.1 on IBM Xseries), and I get false alerts from trigger Template_Linuxroc.num[httpd].last(0)<1
    But of course apache is running:
    front1:# ps ax | grep http
    20449 ? Ss 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
    4686 ? S 0:10 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
    .../...

    the 3 web servers currently monitored report the same alert.

    I tried to edit the trigger, thinking that [httpd] needed to be replaced by something like [httpd2-prefork] or similar, but zabbix does not accept that modification.

    I searched google, found some similar problems,but did not found any suitable solution.

    Can someone bring me some lights to correct that?

    Thanks by advance,

    Alain Scieur
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Originally posted by rvvn
    I tried to edit the trigger, thinking that [httpd] needed to be replaced by something like [httpd2-prefork] or similar, but zabbix does not accept that modification.
    Change item, not the trigger! The trigger will be updated automatically.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • rvvn
      Junior Member
      • Jul 2007
      • 3

      #3
      Originally posted by Alexei
      Change item, not the trigger! The trigger will be updated automatically.
      yes
      thank you very much Alexei, it works now.

      Comment

      • iYRe
        Junior Member
        • Jul 2007
        • 4

        #4
        incidentally, alot of distributions run apache now as /usr/sbin/apache not /usr/sbin/httpd
        So it wont find a process called httpd because its called apache (or apache2)

        Comment

        • javierin79
          Junior Member
          • Aug 2007
          • 5

          #5
          I'm sorry if my question sounds clumsy but... How do you edit items? I am having the same problem mysqlf and don't know what file should I change and what's to be changed.

          Can you provide the rest of the forum with the solution you found?

          Thank you very much

          Comment

          • rvvn
            Junior Member
            • Jul 2007
            • 3

            #6
            Originally posted by javierin79
            I'm sorry if my question sounds clumsy but... How do you edit items? I am having the same problem mysqlf and don't know what file should I change and what's to be changed.

            Can you provide the rest of the forum with the solution you found?

            Thank you very much
            just use the web interface, no need to edit configuration files.

            in the configuration section of zabbix, choose "items".
            pick the item you want (in your case, it should be "Number of running processes mysqld") and it will show you a configuration screen.
            there just change the key "proc.num[mysqld]" to whatever you want, save, and that's all.

            Comment

            • walterg74
              Junior Member
              • Aug 2007
              • 14

              #7
              what about the same process?

              Originally posted by rvvn
              yes
              thank you very much Alexei, it works now.
              I am also having a problem with this.

              I am starting out monitoring 3 servers. all of them have apache and it runs as httpd

              I compiled on one server, statically linking libraries, and copied the binary to the other 2.

              On one server (the on I compiled it in) it shows as apache not running, on the other 2 it works fine.

              I tried to run locally a test, such as: zabbix_agentd -t num.proc[httpd] and it returns 0 !! (there are of course processes running). If I run the same test but with other running processes' names instead, it correctly returns the right number of running processes.

              What could be wrong???

              Comment

              • walterg74
                Junior Member
                • Aug 2007
                • 14

                #8
                anyone at all?

                Comment

                • surlyjake
                  Junior Member
                  • Jul 2007
                  • 28

                  #9
                  @walter:
                  i'm just curious myself, how do you determine what apache is "running as"?
                  ps -e?

                  Comment

                  • Alexei
                    Founder, CEO
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Sep 2004
                    • 5654

                    #10
                    Originally posted by walterg74
                    What could be wrong???
                    Perhaps you have some security patches or Apache is started in a protected environment...
                    Alexei Vladishev
                    Creator of Zabbix, Product manager
                    New York | Tokyo | Riga
                    My Twitter

                    Comment

                    • walterg74
                      Junior Member
                      • Aug 2007
                      • 14

                      #11
                      Originally posted by surlyjake
                      @walter:
                      i'm just curious myself, how do you determine what apache is "running as"?
                      ps -e?
                      we normally use: ps -eaf | grep httpd

                      I see several processes, but the test with the agent itself, on the host even is not working (returns 0 processes).

                      When I test for other processes, it works fine....

                      Comment

                      • walterg74
                        Junior Member
                        • Aug 2007
                        • 14

                        #12
                        Originally posted by Alexei
                        Perhaps you have some security patches or Apache is started in a protected environment...
                        Hmmm.. what do you mean?

                        I am actually logged on to the server that runs apache, I test the agent manually, and I get 0 process running for httpd param.

                        When I test for other processes the number shows correctly.

                        I am even logged on as root on the box.

                        On other servers I don't have this problem, and it correctly shows the number of httpd processes running.

                        Any clues of what I could check?

                        Thanks!

                        Comment

                        • surlyjake
                          Junior Member
                          • Jul 2007
                          • 28

                          #13
                          what happens when you run zabbix_get from your zabbix server? mine runs as "apache2" so:

                          when i run this on web server:
                          zabbix_agentd -t num.proc[apache2]
                          it returns [m|ZBX_NOTSUPPORTED]

                          When i run this from Zabbix server:
                          zabbix_get -s<IP> -p<PORT> -k"proc.num[apache2]"
                          it returns the correct value

                          Comment

                          • walterg74
                            Junior Member
                            • Aug 2007
                            • 14

                            #14
                            Originally posted by surlyjake
                            what happens when you run zabbix_get from your zabbix server? mine runs as "apache2" so:

                            when i run this on web server:
                            zabbix_agentd -t num.proc[apache2]
                            it returns [m|ZBX_NOTSUPPORTED]

                            When i run this from Zabbix server:
                            zabbix_get -s<IP> -p<PORT> -k"proc.num[apache2]"
                            it returns the correct value
                            When I run it on the webserver, I do not get "not supported". It works but I get 0....

                            If I run it on the zabbix server, it's the same, it works and returns 0....

                            The processes run as "httpd", and with user "apache"

                            Very strange....

                            Comment

                            • iYRe
                              Junior Member
                              • Jul 2007
                              • 4

                              #15
                              Then this
                              zabbix_get -s<IP> -p<PORT> -k"proc.num[apache2]"
                              Should read:
                              zabbix_get -s<IP> -p<PORT> -k"proc.num[httpd]"
                              If the process isnt called apache2, then it wont be able to find it. The httpd process is usually apache 1.3, and not apache2 btw.

                              Comment

                              Working...