Ad Widget

Collapse

Status of Zabbix server in Reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ibrahim
    Junior Member
    • Sep 2006
    • 19

    #1

    Status of Zabbix server in Reports

    Hi,
    When I look at the item 'ZABBIX server is running' in Zabbix status report, it always says the value No. The server is running and the items values are retrieved correctly. The hosts are available and monitored. It's not any problem, but it doesnt look nice in the status report.
    Does anybody know how to fix this problem.
    With many thanks,
    Ibrahim
  • dantheman
    Senior Member
    • May 2006
    • 209

    #2
    Tell us some more about your setup, is the frontend hosted on the same computer as the zabbix_server... what version of zabbix and what is the OS on the server.. etc..

    Comment

    • RandySpinaGE
      Member
      • Jun 2006
      • 57

      #3
      My PMO made the same comment.

      Just thought I would add that I got a comment from one of my Project Managers who saw the red "No" value for "ZABBIX server is running" as well.

      I have zabbix_server and zabbix_agentd and front end all running on the same box.

      more /proc/version
      Linux version 2.6.9-5.ELsmp ([email protected]) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005

      Zabbix 1.1 (runs like a champ)
      Attached Files

      Comment

      • James Wells
        Senior Member
        • Jun 2005
        • 664

        #4
        Greetings,

        If you are running the Zabbix server on a different host than the web interface it will always say 'No', unless you apply the patch I submitted at;


        Please note this patch does not require that you run the Zabbix Server and the Zabbix UI on seperate machines, but it was written to support it and to correctly list if the server is online or not. Also please read the instructions I posted carefully as it does add a new feature as well to list the server status at the top of each page.
        Unofficial Zabbix Developer

        Comment

        • Ibrahim
          Junior Member
          • Sep 2006
          • 19

          #5
          Zabbix server and frontend are runninig on the same host. The OS is Linux
          $uname -a
          Linux <hostname> 2.6.9-42.EL #1 Wed Jul 12 23:16:43 EDT 2006 i686 i686 i386 GNU/Linux

          Zabbix version is 1.1.2

          Everything works fine otherwise.

          Regards,
          Ibrahim

          Comment

          • James Wells
            Senior Member
            • Jun 2005
            • 664

            #6
            Originally posted by Ibrahim
            Zabbix server and frontend are runninig on the same host. The OS is Linux
            If you had searched the forum, you would have seen that this is a known issue, and has been for some time, which is one of the reasons I wrote the patch. To fix the issue, so that it only works when the web server and the zabbix server are the same machine, simply edit config.inc.php and change the line that reads;
            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) )
            to look like;
            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) )
            Unofficial Zabbix Developer

            Comment

            • Ibrahim
              Junior Member
              • Sep 2006
              • 19

              #7
              thnk you for the reply, but i am afraid this didn't work in my case. I have made this change to config.inc.php, but the server status still shows No.

              I don't know php. What unix shell is this exec function using ?

              Comment

              • RandySpinaGE
                Member
                • Jun 2006
                • 57

                #8
                Yes - I have the same situation as Ibrahim - the edit mentioned above just fixes a warning of the ps command and in fact the return code is still 0 since its a warning and not an error.
                [root@homename]# ps -ax|grep zabbix_server|grep -v grep|wc -l
                Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
                11
                [root@hostname]# echo $?
                0
                [root@hostname]# ps ax|grep zabbix_server|grep -v grep|wc -l
                11
                [root@hostname]# echo $?
                0

                What I am really wondering about is in "config.inc.php ->
                / 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;
                _________________
                SHOULD branch into the "S_YES" line......

                ____ my report still says zabbix_server runing -> NO

                Thanks
                In fact I upgraded to 1.1.3 this week (nice upgrade) and it stayed the same

                Comment

                • Giliak
                  Junior Member
                  • Dec 2006
                  • 1

                  #9
                  I believe your problem is related to selinux. Apache user is resticted to run some of the system commands or at least the way you can run them. I had exactly the same problem with version 1.1.2 and RHEL4.4. It was easier for me to disable selinux, but you can play with apache policies as well.
                  Hope this helps.

                  Comment

                  Working...