Page 1 of 1
Bandwidth Report
Posted: Thu Mar 21, 2013 11:19 am
by sarfarosh
Hello Guys,
Today i was trying to get Bandwidth Report for the Host group, but when i tried accessing BANDWIDTH USAGE i reportÅ› nothing appeared... it jst shows blank page can you please help me with this ?
i am useing Nagios XI 2012R1.6
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 11:24 am
by abrist
Do a running tail on the apache error log and then try to access the bandwidth report again. Post the output here.
Now open up "Bandwidth Report". We should get some errors in the running tail, post them here.
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 11:31 am
by sarfarosh
Below is the HTTPD error log ..
[root@localhost ~]# tail -f /var/log/httpd/error_log
[Thu Mar 21 19:24:55 2013] [error] [client 49.248.31.218] PHP Parse error: syntax error, unexpected '?' in /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php on line 369, referer:
http://123.176.37.93/nagiosxi/reports/
[Thu Mar 21 19:24:55 2013] [error] [client 49.248.31.218] PHP Parse error: syntax error, unexpected '?' in /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php on line 369, referer:
http://123.176.37.93/nagiosxi/reports/
[Thu Mar 21 19:30:59 2013] [error] [client 49.248.31.218] PHP Parse error: syntax error, unexpected '?' in /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php on line 369, referer:
http://123.176.37.93/nagiosxi/reports/
Traceback (most recent call last):
File "/usr/local/nagiosxi/html/includes/components/capacityplanning/timeframe.py", line 3, in ?
import rrdtool, sys
ImportError: No module named rrdtool
[Thu Mar 21 19:37:21 2013] [error] [client 49.248.31.218] PHP Parse error: syntax error, unexpected '?' in /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php on line 369, referer:
http://123.176.37.93/nagiosxi/reports/
[Thu Mar 21 21:29:40 2013] [error] [client 120.62.180.77] PHP Parse error: syntax error, unexpected '?' in /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php on line 369, referer:
http://123.176.37.93/nagiosxi/reports/
[Thu Mar 21 21:58:48 2013] [error] [client 50.59.209.153] File does not exist: /var/www/html/user
[Thu Mar 21 21:59:45 2013] [error] [client 120.62.180.77] PHP Parse error: syntax error, unexpected '?' in /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php on line 369, referer:
http://123.176.37.93/nagiosxi/reports/
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 11:39 am
by abrist
Can you post line 369 and 10 surrounding lines from the file: /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php?
Code: Select all
sed -n 359,379p /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 11:46 am
by sarfarosh
Hello Abrist
Below is the extract from /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php
Code: Select all
[root@localhost ~]# sed -n 359,379p /usr/local/nagiosxi/html/includes/components/bandwidthreport/index.php
if($lastip==$ip) //still on the same host //XI MOD - added hostname with IP for clarity
{
$theip="";
echo "<td></td>"; //add a blank td
}
else
echo "<td>".$authIPs[$ip]."</td>";
echo "<td>".$theip."</td>";
echo "<td>".$port."</td>";
printf("<td><a href=\"%s?name=%s\">"<?php gettext("View Report") ?>"</a></td>\n", $_SERVER['SCRIPT_NAME'], $name);
//echo "<td>".$name."</td>";
echo "</tr>";
$lastip=$ip;
}
if(empty($legalnames))
echo "<tr><td colspan='4'>".gettext("No valid devices are being monitored at this time")."</td></tr>\n";
?>
</tbody>
[root@localhost ~]#
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 11:59 am
by abrist
There is some invalid php in line 369. Change line 369 to:
Code: Select all
printf("<td><a href=\"%s?name=%s\">".gettext("View Report")."</a></td>\n", $_SERVER['SCRIPT_NAME'], $name);
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 12:17 pm
by sarfarosh
Thanks abrist
this worked for me .... but here i can get bandwidth report of each port ... is there any way i can get Bandwidth reports of particular hostgroup, in XY graph format ?
Re: Bandwidth Report
Posted: Thu Mar 21, 2013 12:24 pm
by scottwilkerson
sarfarosh wrote:is there any way i can get Bandwidth reports of particular hostgroup, in XY graph format ?
Unfortunately this feature isn't currently available. You can feel free to add it as a feature request on out tracker
http://tracker.nagios.com/