ZABBIX Forums  
  #1  
Old 05-08-2008, 21:20
prowl prowl is offline
Junior Member
 
Join Date: Jul 2008
Posts: 2
Default 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
Reply With Quote
  #2  
Old 06-08-2008, 05:24
Palmertree Palmertree is offline
Senior Member
 
Join Date: Sep 2005
Location: Atlanta, GA
Posts: 710
Default

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 appache@zabbixserver '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 appache@zabbixserver 'ps -ef|grep zabbix_server|grep -v grep|wc -l')>0) || (exec(ssh appache@zabbixserver 'ps -ax|grep zabbix_server|grep -v grep|wc -l')>0) ){

Last edited by Palmertree; 06-08-2008 at 05:28.
Reply With Quote
  #3  
Old 06-08-2008, 13:47
prowl prowl is offline
Junior Member
 
Join Date: Jul 2008
Posts: 2
Default 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,
Reply With Quote
  #4  
Old 01-03-2009, 23:13
tnt tnt is offline
Junior Member
 
Join Date: Jul 2008
Posts: 15
Default

Quote:
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
Reply With Quote
  #5  
Old 25-03-2009, 15:54
NOB NOB is offline
Senior Member
Zabbix Certified Specialist
 
Join Date: Mar 2007
Location: Berne, Switzerland
Posts: 447
Default

Quote:
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.
Reply With Quote
  #6  
Old 26-03-2009, 14:12
Palmertree Palmertree is offline
Senior Member
 
Join Date: Sep 2005
Location: Atlanta, GA
Posts: 710
Default

The newest version of Zabbix in SVN includes a fix for this. Using it now and it works great.
Reply With Quote
  #7  
Old 03-04-2009, 13:59
niksbe niksbe is offline
Junior Member
 
Join Date: Apr 2009
Posts: 3
Default ZABBIX server is running on RHEL 5.1 - Value "No" 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.
Reply With Quote
  #8  
Old 05-04-2009, 13:47
CeeEss CeeEss is offline
Member
Zabbix Certified Specialist
 
Join Date: Nov 2007
Location: London, UK
Posts: 97
Default

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
Reply With Quote
  #9  
Old 06-04-2009, 16:06
niksbe niksbe is offline
Junior Member
 
Join Date: Apr 2009
Posts: 3
Default

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;
}
Reply With Quote
  #10  
Old 06-04-2009, 17:01
niksbe niksbe is offline
Junior Member
 
Join Date: Apr 2009
Posts: 3
Thumbs down

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:24.