Blank Page with word Refreshing... indicated?
mrochellesr opened this issue · 12 comments
I'm trying to add the Nagdash to a Nagios XI installation. Nagdash has several features that the standard Nagios XI Operations Center display lacks. I've got the Nagios-api working and can pull state data with the command " curl http://localhost:6315/state ". I've confirm the php5-curl is install from the prior indicated similar problem. When I access the index.php, all I get is the word " Refreshing..." with the spinner. The page source display indicates the code from the index.php? Any thoughts or suggestions are appreciated or if you can confirm it should work on an Nagios xi installation.
Thanks,
Marcus
Hi, I have the same problem using Nagios Core 3.5.0 and the last Nagdash version.
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Linux 2.6.32-358.el6.i686 #1 SMP Tue Jan 29 11:48:01 EST 2013 i686 i686 i386 GNU/Linux
nagios-api-master / 1.2.2: June 14th, 2013
Flask-0.9.tar
Jinja2-2.7.1.tar
Twiggy-0.4.5.tar
Werkzeug-0.9.4.tar
diesel-master.zip
dnspython-1.11.1.zip
greenlet-0.4.1.zip
http-parser-0.8.3.tar
I can query the nagios-api fine using public URL: http://:6315/state
but when I open the App URL http:///nagdash/ the " Refreshing..." message appear for ever
Thank you for your help.
Fernando
Hey,
Can you both try and hit http://yourserver/nagdash.php instead and see if any errors occur? Do your PHP/Apache logs show any errors in them?
Thanks!
Hi. Having the same problem. Centos 6.4 / php 5.3.3. nagios-api looks good.
Hitting nagdash.php returns correct data. Here's how it looks (this is a fresh icinga install, no hosts etc added yet):
After modifying index.php to up the error reporting a bit, just one php error in my logs:
PHP Notice: Undefined index: nagdash_unwanted_hosts in /var/www/html/Nagdash-master/index.php on line 7
I tried using one of the forks based on an older version and that works.
I started to close this thread but since others have commented with the same problem I'll leave it open. I'm currently analyzing Thruk as a possible solution although Nagdash is an easier installation.
@dayreiner Curious. Sounds like a Javascript issue then, rather than a PHP one which I originally suspected.
Does the Chrome error console have anything to say when index.php is loaded? Can you see it firing nagdash.php in the network inspector?
Javascript-wise, the console is showing a syntax error on line 17 in the javascript.
Uncaught SyntaxError: Unexpected token < server-ip/:17
ignoring: unable to inject below fold
Line 17:
<?if ($show_refresh_spinner) {?>
No other errors I can see on that side.
Ahhhh. I understand what's happened here.
Please check your PHP installation (php.ini) for "short_open_tags" and enable it.
What this option does, is interpret "<?" in PHP files as "<?php". In a certain version of Nagdash, people began to use these short <? tags, which are not being interpreted as PHP with your installation.
If you are unable to do so, it is possible I could go through and remove all instances of them.
That did the trick for me. This seems to be the default behaviour for RHEL/CentOS 6 and possibly other distros, so it may be worth a mention in the readme if not a full change. Cheers!
thanks lozzd!, this change solve the problem in my installation too. regards
Fantastic! Sorry for the confusion. I'm going to add it to the README now.