Ad Widget

Collapse

Apache running but Zabbix shows not running. Why?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lostmarbles
    Member
    • Mar 2009
    • 50

    #1

    Apache running but Zabbix shows not running. Why?

    Hello, all is well with our new Zabbix install, thanks for the support. One question, why do we this this trigger as TRUE:


    Code:
    Apache is not running on www.server.com
    {www.server.com:proc.num[httpd].last(0)}<1
    When, in fact Apache is running very well?

    Code:
    root@www:~# ps aux | grep httpd
    root     16885  0.0  0.0   5164   848 pts/0    S+   13:27   0:00 grep httpd
    root@www:~# ps aux | grep apache
    www-data  2694  0.4  0.1 350492 32468 ?        S    08:49   1:10 /usr/sbin/apache2 -k start
    www-data  2768  0.5  0.1 352964 29944 ?        S    12:03   0:25 /usr/sbin/apache2 -k start
    www-data  3022  0.4  0.1 350152 30016 ?        S    08:51   1:07 /usr/sbin/apache2 -k start
    www-data  3340  0.4  0.2 352792 33480 ?        S    08:52   1:13 /usr/sbin/apache2 -k start
    Perhaps the zabbix agent looks for the string "httpd" and not "apache2" ?

    If so, how do the update this?

    Thanks!
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    Originally posted by lostmarbles
    Code:
    Apache is not running on www.server.com
    {www.server.com:proc.num[[B]httpd[/B]].last(0)}<1
    ...
    Perhaps the zabbix agent looks for the string "httpd" and not "apache2" ?
    Indeed.

    Originally posted by lostmarbles
    If so, how do the update this?
    Update the proc.num[httpd] item to proc.num[apache2] for your host or on template level. Trigger will be automatically updated.

    Comment

    • lostmarbles
      Member
      • Mar 2009
      • 50

      #3
      Originally posted by Calimero
      Update the proc.num[httpd] item to proc.num[apache2] for your host or on template level. Trigger will be automatically updated.
      Thanks!

      So, I can do all this on on the server side in the Configuration-->Item part of the Control Panel, and no need to do anything on the agent side at all?

      Comment

      • izabbuse
        Junior Member
        • Feb 2009
        • 5

        #4
        hi,

        your trigger is testing for "httpd",
        when you type "ps -aux |grep httpd" it return "grep httpd" and not the service "httpd".
        so you can try to test "apache2" and not "httpd" (there is no httpd service with apache2)

        Comment

        • Calimero
          Senior Member
          • Nov 2006
          • 481

          #5
          Originally posted by lostmarbles
          So, I can do all this on on the server side in the Configuration-->Item part of the Control Panel, and no need to do anything on the agent side at all?
          Yes, all the built-in/native checks supported by zabbix_agent can be configured remotely.

          Only UserParameters (that is: custom scripts run by zabbix_agent) require some tweaking on agents. But even UserParameter scripts can be given arguments and as such can be quite flexible.

          E.g:
          UserParameter=my.mysql.checks[*],/usr/local/zabbix/scripts/mysql_checks.php $1 $2 $3 $4

          When you configure on the server item 'my.mysql.checks[variables,Com_select]', zabbix_server will connect to zabbix_agent, request item 'my.mysql.checks[variables,Com_select]'.
          zabbix_agent will then run "/usr/local/zabbix/scripts/mysql_checks.php" with the supplied args, that is to say: "/usr/local/zabbix/scripts/mysql_checks.php variables com_select". Your script would then process accordingly and return the expected value which zabbix_agent would give to zabbix_server.

          You could then have a single script do all mysql related checks instead of having specific scripts for each item you want to poll regarding mysql.

          Comment

          • lostmarbles
            Member
            • Mar 2009
            • 50

            #6
            Hi, well, lostmarbles, me, LOL. I am not finding this to be the case.

            For example, in this ZABBIX agent:

            Code:
            WEB (HTTP) server is running  net.tcp.service[http]
            Even when disabled in Configuration-->Items it will not let me edit net.tcp.service[http]

            So, I don't see how to edit http and change it to apache2 if it will not permit me to edit.

            Why can't I edit it when I have full read-write permissions and these items are disabled?

            Comment

            • MrKen
              Senior Member
              • Oct 2008
              • 652

              #7
              If you can't edit the host directly, then it is probably a Template.

              Edit the Template that the host is attached to.

              Hope this helps you find your marbles.

              MrKen
              Disclaimer: All of the above is pure speculation.

              Comment

              • lostmarbles
                Member
                • Mar 2009
                • 50

                #8
                Thanks! Well, my marbles are still lost

                In my post above, I was trying to edit the Template in the control panel.

                Perhaps I am confused about the use of terminology

                Maybe someone could kindly just simply put down the necessary steps to change http to apache2 in the template? Because, when I try to do it via the configuration panel, it will not permit me to edit.

                Thanks!

                Comment

                • Calimero
                  Senior Member
                  • Nov 2006
                  • 481

                  #9
                  Go to Configuration > Items.
                  Top right: choose group and then your host.

                  All items for that host are displayed.

                  Look at the Description column. You probably have something like:

                  Template_Name : Item Description

                  Click on the template name. It will then switch you to the "Config > Items" screen for the template. You will then be able to edit items and changes will be propagated to all hosts using the template.

                  Comment

                  • lostmarbles
                    Member
                    • Mar 2009
                    • 50

                    #10
                    Hi Calimero!

                    Thanks for your kind reply. That is *exactly* what I did (many time, btw) and for this template item:

                    Code:
                    Template_Linux:WEB (HTTP) server is running	net.tcp.service[http]
                    .. when I click on the description I cannot edit or update the first six fields:
                    • Description
                    • Type
                    • Key
                    • Type of information
                    • Units
                    • Use multiplier


                    However, I can update all the rest of the fields:
                    • Update interval
                    • Flexible intervals
                    • New flexible interval
                    • Keep history
                    • Keep trends
                    • Status
                    • Store value
                    • Show value throw map
                    • Applications


                    Hence, my marbles still lost I cannot edit the template key and change http to apache2

                    Any idea why not?

                    Comment

                    • Calimero
                      Senior Member
                      • Nov 2006
                      • 481

                      #11
                      Originally posted by lostmarbles
                      Code:
                      Template_Linux:WEB (HTTP) server is running	net.tcp.service[http]
                      If that's what you see, then you're not displaying items for Template_Linux but for a child template or for a host using Template_Linux.

                      Click on "Template_Linux" to show items for Template_Linux. And keep "going up" recursively as long as there's as "Template_XXX:" prefix in front of description.

                      Comment

                      • lostmarbles
                        Member
                        • Mar 2009
                        • 50

                        #12
                        Hi Calimero!

                        Thanks!! That worked fine.

                        Item 'www.server.com: proc.num[apache2]' updated
                        Item 'Template_Linux: proc.num[apache2]' updated

                        We updated Template_Linux and it automatically updated the instance that was associated with the server.

                        Thanks again

                        Comment

                        Working...