Failed to build XML for sid xxxx

This support forum board is for questions relating to Nagios Fusion.
Locked
dunkyb
Posts: 4
Joined: Wed Jul 01, 2015 6:32 am

Failed to build XML for sid xxxx

Post by dunkyb »

Hi,

I am trialling Nagios Fusion as we have quite a few Nagios Core servers (version 3.5.1, Debian Linux OS) which we look after, and would
like a single place to monitor all of these.

However, upon installation of the VMware OVA template (Centos 6.6, 64bit), I am unable to get Fusion to work properly with my Nagios Core servers. I have tried a couple, adding them
works fine and under 'Fused server credentials', each shows as server status OK: Auth Check: OK (200). They show no hosts/services being monitored on the 'tactical overview' page however.
Setup is quite basic, Server type is Nagios core, auth type HTTP Basic, and the Nagios URL is correct (https://nagios.zananet.net), for example. This is a virtual host.

In poller.log, I am periodically seeing:

-------
...***GET DATA!***
RUNTIME: 183 INTERVAL: 30 POLL INTERVAL: 30
PHP Notice: Undefined index: path in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 246
PHP Notice: Undefined index: query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 80
ERROR: Failed to build XML for sid: g4h8glArray
(
)
Saving Tac Data to DB: ZanaNET Nagios Primary
PHP Notice: Undefined index: query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 80
Polling Recent Alerts...
NAGIOSCORE ALERT FETCHZanaNET Nagios Primary
PHP Notice: Undefined index: path in /usr/local/nagiosfusion/html/includes/utils-servers.inc.php on line 579
COUNT :0
-----------

Reading around this forum, I am unable to find any information regarding 'Unable to build XML' or what could cause it.
I did read about Core requiring CGIs to be recompiled for XML support - Is this true, if so how does one go about this?

It's also worth noting if I click on a server link from the Tactical Overview, the page it loads externally on the Nagios core fails with a 404 not found:
https://nagios.zananet.net/?corewindow= ... stypes%3D4

Many thanks for any support in getting this working!

Duncan
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Failed to build XML for sid xxxx

Post by ssax »

Shouldn't the Nagios URL be:

Code: Select all

https://nagios.zananet.net/nagios
Instead of:

Code: Select all

https://nagios.zananet.net/
?
dunkyb
Posts: 4
Joined: Wed Jul 01, 2015 6:32 am

Re: Failed to build XML for sid xxxx

Post by dunkyb »

Hi,

Thanks for the reply.

Nagios.zananet.net is a virtualhost, so accessing https://nagios.zananet.net in a web browser works fine (and points to /nagios or /nagios3)
I'm not sure if this could somehow be confusing it, but I'm sure others have got Fusion to work with Nagios Core's with virtual hosting?

I have just tested with a server in format http://mon.domain.com/nagios3, (version 3.4.1) and this does the same. So must be something I'm doing wrong?!

Thanks
Duncan
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Failed to build XML for sid xxxx

Post by lmiltchev »

Are you using Nagios Fusion 2014R1.1?

We used to have a problem with fusing Nagios Core servers on Ubuntu/Debian boxes, but this was fixed a long time ago (in 2012 R1.6)...
- Bug fix for Fusion to work with Ubuntu's modified nagios3 package - MG
https://assets.nagios.com/downloads/nag ... HANGES.TXT

I wonder if the bug resurfaced somehow... I will try to recreate the issue in-house.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Failed to build XML for sid xxxx

Post by lmiltchev »

Update: I tried fusing a Nagios Core server, running on Debian in Nagios Fusion, and it seemed to work fine.

On the Debian box

Code: Select all

/usr/sbin/nagios3 | head -2

Nagios Core 3.2.3
root@debian:~# cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-45) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 04:01:19 UTC 2012
On the Fusion box
example01.PNG
example02.PNG
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dunkyb
Posts: 4
Joined: Wed Jul 01, 2015 6:32 am

Re: Failed to build XML for sid xxxx

Post by dunkyb »

Hi,

My settings pretty much mirror yours, only difference I see is my Nagios Core is a somewhat newer version (Deb 8.1 Jessie)
and Nagios Fusion 2014R1.1.

~# /usr/sbin/nagios3 | head -2
Nagios Core 3.5.1

On the Fusion box, the hosts/services are not shown:

Image

Thanks a lot for your help.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Failed to build XML for sid xxxx

Post by tmcdonald »

I think the hint is in your first post:
dunkyb wrote: It's also worth noting if I click on a server link from the Tactical Overview, the page it loads externally on the Nagios core fails with a 404 not found:
https://nagios.zananet.net/?corewindow= ... stypes%3D4
Does your remote Nagios machine handle the cgi-bin in the URL properly? My guess is Fusion assumes an install where https://nagios.zananet.net/nagios is the URL, and https://nagios.zananet.net/nagios/cgi-bin gives a 403. Instead, if your virtualhost configs are setting the root to just https://nagios.zananet.net/ then https://nagios.zananet.net/nagios/cgi-bin probably doesn't resolve properly, hence the 404.

Could you check the apache error logs on the Core system to confirm?
Former Nagios employee
dunkyb
Posts: 4
Joined: Wed Jul 01, 2015 6:32 am

Re: Failed to build XML for sid xxxx

Post by dunkyb »

tmcdonald, spot on .. thank you!

I had to remove the host completely and re-add after making the relevant ScriptAlias change to the Apache config to allow /cgi-bin,
and it now is reporting correctly.

Many thanks for your help.

Duncan
Locked