Problems in missingobjects.php on line 279

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ronsalas
Posts: 12
Joined: Thu Oct 04, 2012 6:56 am

Problems in missingobjects.php on line 279

Post 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;
			}
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Problems in missingobjects.php on line 279

Post 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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ronsalas
Posts: 12
Joined: Thu Oct 04, 2012 6:56 am

Re: Problems in missingobjects.php on line 279

Post 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
ronsalas
Posts: 12
Joined: Thu Oct 04, 2012 6:56 am

Re: Problems in missingobjects.php on line 279

Post by ronsalas »

This is the image of the error
Capturenagiosxi.JPG
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Problems in missingobjects.php on line 279

Post by sreinhardt »

Which version of XI and core are you using presently?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ronsalas
Posts: 12
Joined: Thu Oct 04, 2012 6:56 am

Re: Problems in missingobjects.php on line 279

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Problems in missingobjects.php on line 279

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked