Announcement

Collapse
No announcement yet.

ZABBIX server is running - Value "No" on dashboard

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    ZABBIX server is running - Value "No" on dashboard

    Under Status of Zabbix the Value for Parameter "ZABBIX server is running" is "No".
    The server is up and several zabbix_server processes are running.

    Everything else so far seems to be working properly.
    Any idea's what I am missing?

    version is 1.5.3

    Thanks

    #2
    This usually happens when you run the frontend on a different server that is not running the zabbix_server. The frontend is doing a 'ps -ef' command to determine if the zabbix_server is running. Since the zabbix_server is on a different machine it will always return 0. I have not tried this yet but I was thinking about using ssh to run the command on the remote machine. Almost sure it will work. Just not had a chance to try it.

    To run a command on a remote machine the command is something like this:
    ssh [email protected] 'ps -ef | grep zabbix_server | grep -v grep'

    ssh <remote user name running the web services>@<hostname running zabbix_server> '<command>'


    Note: The web service account starting appache should be the same user id and password on both boxes so that ssh will not prompt for a password.

    THIS HAS NOT BEEN TESTED BUT SHOULD WORK!

    in file include/config.inc.php:

    before:
    Code:
             if( (exec('ps -ef|grep zabbix_server|grep -v grep|wc -l')>0) || (exec('ps -ax|grep zabbix_server|grep -v grep|wc -l')>0) ){
    after:
    Code:
             if( (exec(ssh [email protected] 'ps -ef|grep zabbix_server|grep -v grep|wc -l')>0) || (exec(ssh [email protected] 'ps -ax|grep zabbix_server|grep -v grep|wc -l')>0) ){
    Last edited by Palmertree; 06-08-2008, 05:28.

    Comment


      #3
      Same box

      Thanks for the response but, the frontend is on the same box.

      Your message did make me think that SELinux could be causing the problem. I will have to look at that next.

      Thanks for the help,

      Comment


        #4
        Originally posted by prowl View Post
        Under Status of Zabbix the Value for Parameter "ZABBIX server is running" is "No".

        hi,
        if i have safe_mode on in php.ini - then zabbix server is running is NO
        if i have safe_mode off in php.ini- then zabbix server is running is yes

        Comment


          #5
          Originally posted by prowl View Post
          Thanks for the response but, the frontend is on the same box.

          Your message did make me think that SELinux could be causing the problem. I will have to look at that next.

          Thanks for the help,
          Yes, SELinux is the problem.
          We noticed it last year running a standard CentOS 5.2.

          Apache is running as user nobody or apache and does not "see" all
          processes, e.g. zabbix_server.
          As palmertree stated it just does a "ps -ef" and checks the output.
          This output is empty on SELinux, regardless whether zabbix_server
          processes are running or not.
          You will have some other difficulties, even with the agent, running
          on SELinux.

          Regards

          Norbert.

          Comment


            #6
            The newest version of Zabbix in SVN includes a fix for this. Using it now and it works great.

            Comment


              #7
              ZABBIX server is running on RHEL 5.1 - Value &quot;No&quot; on dashboard

              Hi,
              I am running zabbix 1.6.2 and still zabbix status on the dashboard says its not running.

              Also, I am running zabbix under SELinux enabled mode and have taken care of issues experienced while deploying. The zabbix php sits under the default apache htdocs folder.

              I am also experiencing another problem of fping. zabbix is not able to use fping because of some reason.

              Any light thrown on above queries will be appreciated.

              Regards,
              Niks.

              Comment


                #8
                After upgrading to 1.64, server status shows "No". The "ps -ef" check line in previous versions of include/config.inc.php no longer exists and has been abstracted to variables, the origin of which i can't trace. Also missing from 1.6.3.

                thanks

                Comment


                  #9
                  CS:
                  This is the function in include/config.inc.php that checks and reports zabbix server status. If I using the root login check the ps output I get around 22 server processes. However because of some reason (SELinux??) the condition is not getting satisfied.
                  So the question is if this is SELinux problem as the command is pretty straight forward otherwise.

                  In case anybody know if SELinux can be manually overridden for this single command then probably the issue can be resolved.

                  function get_status(){
                  // global $DB;
                  $status = array();
                  // server
                  if( (exec('ps -ef|grep zabbix_server|grep -v grep|wc -l')>0) || (exec('ps -ax|grep zabbix_server|grep -v grep|wc -l')>0) ){
                  $status["zabbix_server"] = S_YES;
                  }
                  else{
                  $status["zabbix_server"] = S_NO;
                  }

                  Comment


                    #10
                    I tried some help from forums on linuxquestions.org and found about the /var/log/audit/audit.log

                    For the error related to ps -ef...... similar log entries as follows can be seen:

                    type=AVC msg=audit(1239029034.823:17908830): avc: denied { search } for pid=20027 comm="ps" name="30836" dev=proc ino=2020868098 scontext=user_u:system_r:httpd_t:s0 tcontext=root:system_r:unconfined_t:s0-s0:c0.c1023 tclass=dir
                    type=SYSCALL msg=audit(1239029034.823:17908830): arch=40000003 syscall=5 success=no exit=-13 a0=43e6e0 a1=0 a2=0 a3=43e6e0 items=0 ppid=20026 pid=20027 auid=0 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) comm="ps" exe="/bin/ps" subj=user_u:system_r:httpd_t:s0 key=(null)


                    As per the solution given in http://www.linuxquestions.org/questi...9/#post3073278
                    audit2allow somehow does not permit confined httpd_t to execute ps and read /proc in unconfined_t mode...

                    Also allowing httpd access to command like ps could be a security risk... So can somebody from zabbix team enlighten me on how to solve this problem?? The very process zabbix being shown as not running on dashboard gives out a very wrong signal to management who would approve implementation of such a tool.

                    Comment


                      #11
                      Server running = Nyet

                      Scanning through all of the previous versions' build directories:

                      find zabbix* -name "config.inc.php" -exec grep -l "ps -ef" {} \;

                      zabbix-1.6.1-stable/frontends/php/include/config.inc.php
                      zabbix-1.6.2-stable/frontends/php/include/config.inc.php

                      shows that from 1.6.3 onwards, this routine has dropped out (and not been replaced elsewhere? I dunno)

                      Sorry for hijacking your SElinux thread - never touch the stuff!

                      Comment


                        #12
                        ZABBIX server is running, Value = NO &gt;&gt; Resolution

                        In my case issue was same i.e. ZABBIX server is running, Value = NO.

                        I had set mysql db password while installing mysql db, but the same was not updated @ /etc/zabbix/zabbix_server.conf

                        vim /etc/zabbix/zabbix_server.conf
                        DBHost=localhost
                        DBName=zabbix
                        DBUser=zabbix
                        DBPassword='mysql db password'

                        service zabbix-server restart
                        service httpd restart

                        Issue got resolved

                        Comment

                        Working...
                        X