Page 1 of 1

Problems in missingobjects.php on line 279

Posted: Tue Dec 03, 2013 1:41 pm
by ronsalas
When i import nodes from other nagios (passive check ) nagios xi present me this error.
Someone can help me.


Warning: in_array() expects parameter 2 to be array, null given in /usr/local/nagiosxi/html/admin/missingobjects.php on line 279

//refactor services array to handle hidden (deleted) items from the list
$show_svcs = array();
foreach($svcs as $sn => $val) {
if(in_array($sn,$hidden))
continue;
$show_svcs[$sn] = $val;
}

Code: Select all

	$current_host=0;
	$displayed=0;
	
	foreach($newobjects as $hn => $arr){
		//skip hidden (deleted) hosts 
		if(grab_array_var($arr,'hide_all',false)==true) 
			continue; 
	
		$svcs=$arr["services"];
		$hidden = grab_array_var($arr,'hidden_services',array()); 
				
		$total_services=0; 
		
		//refactor services array to handle hidden (deleted) items from the list 
		$show_svcs = array(); 
		foreach($svcs as $sn => $val) {
			if(in_array($sn,$hidden))
				continue;
			$show_svcs[$sn] = $val;  	
		}
		
		//overwrite old array
		$svcs = $show_svcs; 
		$total_services=count($svcs);
		
		// skip if host/service already exists
		if($total_services==0 && host_exists($hn)==true)
			continue;
		else if($total_services>0){
			$missing=0;
			foreach($svcs as $sn => $sarr){
				if(service_exists($hn,$sn)==true || in_array($sn,$hidden) ) //hide deleted services 
					continue;	
				$missing++;
				}
			if($missing==0)
				continue;
			}

Re: Problems in missingobjects.php on line 279

Posted: Tue Dec 03, 2013 1:54 pm
by sreinhardt
To clarify, this is when you are forwarding results from another core\XI system to this machine? Are you seeing this on the inbound transfer page?

Re: Problems in missingobjects.php on line 279

Posted: Tue Dec 03, 2013 3:26 pm
by ronsalas
The main nagios XI is the

Who sends the information is a nagios CORE

and when you refresh the page patalla inbound transfer

Re: Problems in missingobjects.php on line 279

Posted: Tue Dec 03, 2013 3:48 pm
by ronsalas
This is the image of the error
Capturenagiosxi.JPG

Re: Problems in missingobjects.php on line 279

Posted: Wed Dec 04, 2013 12:18 pm
by sreinhardt
Which version of XI and core are you using presently?

Re: Problems in missingobjects.php on line 279

Posted: Wed Dec 04, 2013 4:01 pm
by ronsalas
Nagios Core "slave node"

NagiosĀ® Coreā„¢
Version 4.0.2rc1


NAgios XI "primari Node"


Available Updates
Your Nagios XI installation is up to date.
Latest Available Version: 2012R2.7
Installed Version: 2012R2.7
Last Update Check: 2013-12-03 19:03:01
Last Updated: 2013-12-04 14:57:30

Re: Problems in missingobjects.php on line 279

Posted: Thu Dec 05, 2013 11:42 am
by abrist
ARe you pushing checks from more than one core install? If so, are you only experiencing issues with core 4, or with core 3 as well?