Cacti 0.8.8 w/ flowview issues...

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
zkriz
Posts: 2
Joined: Fri Apr 06, 2012 1:43 pm

Cacti 0.8.8 w/ flowview issues...

Post by zkriz »

I've been fighting the flowview plugin for a couple of days now and I believe I'm very close. I'm having a similar issue other people have had when trying to view a flow you get the "Open Flash Chart" error, see screen shot attached. I've went ahead and captured the 'response' in Firebug, I believe I have the correct response attached.

Here is the back-end config:

Using flow-tools, started the service (also restarted the service after adding a new listener):

Code: Select all

[root@cdav1nettools01 flows]# service flow-capture restart
Stopping flow-capture: [  OK  ]
Starting flow-capture: [  OK  ]
[root@cdav1nettools01 flows]# /usr/bin/flow-capture -z0 -V5 -n 288 -N0  -w /var/netflow/flows/pkbear01a00 -E3G 0/0/3001
[root@cdav1nettools01 flows]# 
Tcpdump shows netflow data arriving from my Cisco router. Also the directory "/var/netflow/flows/pkbear01a00" shows files being populated.

Code: Select all

[root@cdav1nettools01 flows]# ls -l -R /var/netflow/flows/pkbear01a00
/var/netflow/flows/pkbear01a00:
total 3168
-rw-r--r--. 1 root root 122988 Apr  6 11:42 ft-v05.2012-04-06.114046-0700
-rw-r--r--. 1 root root 353388 Apr  6 11:47 ft-v05.2012-04-06.114235-0700
-rw-r--r--. 1 root root 345708 Apr  6 11:52 ft-v05.2012-04-06.114734-0700
-rw-r--r--. 1 root root 336108 Apr  6 11:57 ft-v05.2012-04-06.115233-0700
-rw-r--r--. 1 root root 355308 Apr  6 12:02 ft-v05.2012-04-06.115732-0700
-rw-r--r--. 1 root root 376428 Apr  6 12:07 ft-v05.2012-04-06.120231-0700
-rw-r--r--. 1 root root 330348 Apr  6 12:12 ft-v05.2012-04-06.120730-0700
-rw-r--r--. 1 root root 343788 Apr  6 12:17 ft-v05.2012-04-06.121229-0700
-rw-r--r--. 1 root root 113388 Apr  6 12:19 ft-v05.2012-04-06.121728-0700
-rw-r--r--. 1 root root 203628 Apr  6 12:22 ft-v05.2012-04-06.121920-0700
-rw-r--r--. 1 root root 338028 Apr  6 12:27 ft-v05.2012-04-06.122227-0700
-rw-r--r--. 1 root root    108 Apr  6 12:27 tmp-v05.2012-04-06.122726-0700
[root@cdav1nettools01 flows]# 
Cacti flowview configuration

Settings->Misc->Flow Viewer

Code: Select all

Flow tools Binary Path: /usr/bin
Flow tools Work Directory: /tmp
Flows Directory: /var/netflow/flows
Listeners

Code: Select all

name, directory, nesting, allowed from, port, version, compression, rotation, expire
pkbear01a00, /pkbear01a00, /YYYY-MM-DD, 0, 3001, NetFlow version 5, 0, 5 Minutes, 2 Days
Filters

**Everything is blank except for the following

Flow Filter Constraints:
Listener: pkbear01a00
Start Time: -8 HOURS
End Time: NOW

Report Parameters:
Statistics: Source/Destination IP
Sort Field: Bytes
Max Flows: Top 10
Include if: Any Part in Specified Time Span
Minimum Bytes: No Limit
Resolve Addresses: No

I'm not able to load the entire "POST flowview.php" file from Firebug because of forum restrictions so here is a portion. Is there another piece of information I can grab out of this file or am I looking in the wrong file all together?
Attachments
firebug_code.txt
(6.9 KiB) Downloaded 402 times
error.jpg
error.jpg (167.5 KiB) Viewed 15796 times
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Re: Cacti 0.8.8 w/ flowview issues...

Post by Voiper99 »

I appear to be having the same issue unfortunately.

By they way, have you checked to see if there is data in your files?

You can do this by issuing the following command:

Code: Select all

flow-cat /var/flows/MYROUTER2/2012/2012-04/2012-04-15/tmp-v05.2012-04-15.142120+1000 | flow-stat -f8
jenching0612
Posts: 5
Joined: Fri Apr 27, 2012 11:42 am

Re: Cacti 0.8.8 w/ flowview issues...

Post by jenching0612 »

Base on your information. the path of Flows Directory should be "MYROUTER2". NOT "/var/netflow/flows"
jenching0612
Posts: 5
Joined: Fri Apr 27, 2012 11:42 am

Re: Cacti 0.8.8 w/ flowview issues...

Post by jenching0612 »

Flows Directory: /var/netflow/flows need match to the flow-capture -w directory. /usr/bin/flow-capture -z0 -V5 -n 288 -N0 -w /var/netflow/flows/pkbear01a00 -E3G 0/0/3001. In "Device" tab. the directory should be "pkbear01a00"
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Re: Cacti 0.8.8 w/ flowview issues...

Post by Voiper99 »

Thank you for the reply, though I am pretty sure I had it set up correctly when I used it. I have since uninstalled but plan to give it another try.

Have you got it working in 8.8?
jenching0612
Posts: 5
Joined: Fri Apr 27, 2012 11:42 am

Re: Cacti 0.8.8 w/ flowview issues...

Post by jenching0612 »

yes. I installed Flowview 1.1 on Cacti 8.8.

Setting->Misc->Flows Directory: /var/log/flow/
"Flow" Tab->Listeners->Directory: MyRouter2

Another important thing. the flow log need be created by defined in "Listeners" section. you unable to capture flow log via command "for example:/usr/bin/flow-capture -z0 -V5 -n 288 -N0 -w /var/netflow/flows/pkbear01a00 -E3G 0/0/3001" directly.


Optional:

If you don't already have flows coming to the cacti box and being stored with flow-capture
you may follow the steps below to have cacti do this.

Next copy the 'flow-caputure' file in the flowview plugin directory to '/etc/init.d/'
or the appropriate location. You have to edit this file to set the cacti base path.

Finally, start the 'flow-capture' process using '/etc/init.d/flow-capture start'.

You may also want to insure that 'flow-capture' is a startup service using your operating
systems default process.

Also, remember that when using the Cacti 'flow-capture' init binary, that when you make
changes to the various listeners, you must subsequently 'restart' the 'flow-capture' binary.
giomatax
Posts: 1
Joined: Tue May 01, 2012 7:35 am

Re: Cacti 0.8.8 w/ flowview issues...

Post by giomatax »

when i upload files to plugin folder and then run install from console>Plugin Management >

it returs me an error
:
Warning: file(./plugin_flowview_ports.sql) [function.file]: failed to open stream: No such file or directory in /data/www/cactiD/plugins/flowview/setup.php on line 299

Warning: Invalid argument supplied for foreach() in /data/www/cactiD/plugins/flowview/setup.php on line 302

Warning: Cannot modify header information - headers already sent by (output started at /data/www/cactiD/plugins/flowview/setup.php:299) in /data/www/cactiD/plugins.php on line 71




after i try to change in setup.php file
this line

$inserts = file('/data/www/cactiD/plugins/flowview/plugin_flowview_ports.sql');


and after it there was no any errors .but it returs me an error after i whant to see in flow tab any log

Image


what can i do ?
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Re: Cacti 0.8.8 w/ flowview issues...

Post by Voiper99 »

I'm still having issues with this unfortunately.

Here are the details:
- I am using a fresh install of Centos 5.5.
- Using a Cisco 877 router to send the flow details.
- Using Cacti 8.8.
- I have installed FlowView 1.1 and enabled it.
- I have gone in to Console->Settings->Misc and changed the "Flow Tools" directory to /var/flow-tools
- I have changed the Cacti directory inside the "flow-capture" file provided with the plugin, and have moved it to the /etc/init.d directory.
- I have configured a listener as follows:

Code: Select all

Device Name: Home877
Directory: HomeRtr
Allowed Hosts: 0
Port: 2000
Nesting: /YYYY-MM-DD
Netflow Version: Netflow Version 5
Compression Level: 0
Rotation: 1 Minute
Expiration: 2 Days
I have confirmed that the statistics collections are working correctly, as follows:

Code: Select all

# flow-cat /var/flow-tools/HomeRtr/2012-06-26/ft-v05.2012-06-26.180401+1000 | flow-stat -f8
#  --- ---- ---- Report Information --- --- ---
#
# Fields:    Total
# Symbols:   Disabled
# Sorting:   None
# Name:      Destination IP
#
# Args:      flow-stat -f8
#
#
# IPaddr         flows                 octets                packets
#
255.255.255.255  2                     628                   4
192.168.0.255     2                     314                   2
33.22.33.11        6                     864                   18
5.4.2.1              1                     454                   6
11.22.33.44        6                     2666                  16
1.2.3.4              1                     263                   1
However, when I generate a report in Cacti, no details appear at all.

Any ideas what I'm doing wrong?
jrodri31
Posts: 2
Joined: Fri Feb 18, 2011 3:00 am

Re: Cacti 0.8.8 w/ flowview issues...

Post by jrodri31 »

I have the same problem.
somebody knows something related to this issue?
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Re: Cacti 0.8.8 w/ flowview issues...

Post by Voiper99 »

I ended up going with nfdump and nfsen as I was unable to resolve this issue.
Nautics
Posts: 3
Joined: Wed Oct 03, 2012 12:20 am

Re: Cacti 0.8.8 w/ flowview issues...

Post by Nautics »

I had the same issue with the Flash charts. I fixed it by editing the /etc/php5/apache2/conf.d/suhosin.ini file, uncommenting the following line, and changing it to "on":

suhosin.simulation = on

This allowed those looooonnnnngggg URIs pointing to the Flash charts to display.

Good luck!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest