Bandwidth Report

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Bandwidth Report

Post 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
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Bandwidth Report

Post by abrist »

Do a running tail on the apache error log and then try to access the bandwidth report again. Post the output here.

Code: Select all

tail -f /var/log/httpd/error_log
Now open up "Bandwidth Report". We should get some errors in the running tail, post them here.
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.
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: Bandwidth Report

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

Re: Bandwidth Report

Post 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
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.
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: Bandwidth Report

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

Re: Bandwidth Report

Post 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);
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.
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: Bandwidth Report

Post 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 ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Bandwidth Report

Post 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/
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked