I figured out a workaround for this FlowDoh issue on my setup (first row is
empty):
If you get an error message like this when running the nfdump command:
Verify map id 5: ERROR: Expected 7 elements in map, but found 2!
Apparently this is normal.
Peter has already mentioned this about it:
"This is a known issue in the v5 module of nfdump-1.6.10. nfdump self
corrects this, therefore you can safely
ignore the message. This will be fixed a the next release."

As a temporary fix, I edited this file:  /var/www/nfsen/plugins/flowdoh.php
Find:  function flowdoh_output_table($csvdata, $offset, $settings) {

In this function add the following lines:
$csvdata = array_diff($csvdata, array('Verify map id 0: ERROR: Expected 7
elements in map, but found 2!'));
$csvdata = array_values($csvdata);
This got rid of the first element in the array (which was the error) and my
flowdoh page looks good now.
No more errors in my httpd logs either.
As I said I don't mess with PHP much, so maybe they'll find a better way.
Works for me though.
I'm liking FlowDoh.



On Mon, Jul 8, 2013 at 3:30 PM, Sean Kenn <hunve...@gmail.com> wrote:

> Looking deeper into this, it seems to be a nfdump error which is the the
> same as what Jens Hektor reported with ICMP.
>
> For me it's not specific to ICMP though.
>
> To debug I added:
> echo "<pre>".print_r($data, true)."</pre>";
> around line 389 ( just below "$data = nfsend_query('flowdoh::getData',
> $opts);" )
> to the following frontend file: /var/www/nfsen/plugins/flowdoh.php
> # service httpd restart
> and web back to flowdoh
>
> webpage shows this error in the first line of the array:
> Verify map id 0: ERROR: Expected 7 elements in map, but found 2!
>
> testing with nfdump:
> nfdump -M /data/nfsen/profiles-data/live/ROUTER1 -T -R
> 2013/07/08/nfcapd.201307081500 -s srcip -s ip/flows -s
> dstport/pps/packets/bytes -s record/bytes
>
> Same error:
> Verify map id 0: ERROR: Expected 7 elements in map, but found 2!
>
>
> I'm running nfdump/nfsen in a qemu/kvm VM on RHEL6:
> # cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 6.3 (Santiago)
> # uname -a
> Linux receiver 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012
> x86_64 x86_64 x86_64 GNU/Linux
> # nfdump -V
> nfdump: Version: 1.6.10 $Date: 2013-04-30 16:34:53 +0200 (Tue, 30 Apr 2013)
>
> Will mess with it some more later.
>
>
>
>
> On Sat, Jul 6, 2013 at 7:27 AM, Esteban Monge 
> <este...@nuevaeralatam.com>wrote:
>
>>  El 04/07/2013 19:50, Sean Kenn escribió:
>>
>>  Ditto to all that on this end as well. Only web errors in the log are
>> as follows:
>> (I'm guessing it could be the third one, but I'm not a PHP person so
>> hopefully this helps.)
>>
>> [Fri Jul 05 10:36:31 2013] [error] [client 192.168.122.1] PHP Notice:
>> Undefined variable: bkcolor in /var/www/nfsen/plugins/flowdoh.php on line
>> 492, referer: http://192.168.122.100/nfsen/nfsen.php?tab=5
>> [Fri Jul 05 10:36:31 2013] [error] [client 192.168.122.1] PHP Warning:
>> gethostbyaddr(): Address is not a valid
>> IPv4 or IPv6 address in /var/www/nfsen/plugins/flowdoh.php on line 497,
>> referer: http://192.168.122.100/nfsen/nfsen.php?tab=5
>> [Fri Jul 05 10:36:31 2013] [error] [client 192.168.122.1] PHP Warning:
>> number_format() expects parameter 1 to be double, string given in
>> /var/www/nfsen/plugins/flowdoh.php on line 502, referer:
>> http://192.168.122.100/nfsen/nfsen.php?tab=5
>>
>> I get in my error.log from Apache2. I used Iceweasel 22.0:
>> [Fri Jul 05 18:21:18 2013] [error] [client x.x.x.x] PHP Notice:
>> Undefined variable: bkcolor in /var/www/nfsen/plugins/flowdoh.php on line
>> 492, referer: http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:18 2013] [error] [client x.x.x.x] PHP Warning:
>> gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in
>> /var/www/nfsen/plugins/flowdoh.php
>> on line 497, referer: http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:18 2013] [error] [client x.x.x.x] PHP Warning:
>> number_format() expects parameter 1 to be double, string given in
>> /var/www/nfsen/plugins/flowdoh.php on line 502, referer:
>> http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Notice:
>> Undefined variable: bkcolor in /var/www/nfsen/plugins/flowdoh.php on line
>> 492, referer: http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Warning:
>> gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in
>> /var/www/nfsen/plugins/flowdoh.php
>> on line 497, referer: http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Warning:
>> number_format() expects parameter 1 to be double, string given in
>> /var/www/nfsen/plugins/flowdoh.php on line 502, referer:
>> http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Warning:
>> number_format() expects parameter 1 to be double, string given in
>> /var/www/nfsen/plugins/flowdoh.php on line 468, referer:
>> http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Notice:
>> Undefined variable: bkcolor in /var/www/nfsen/plugins/flowdoh.php on line
>> 492, referer: http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Warning:
>> gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in
>> /var/www/nfsen/plugins/flowdoh.php
>> on line 497, referer: http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>> [Fri Jul 05 18:21:19 2013] [error] [client x.x.x.x] PHP Warning:
>> number_format() expects parameter 1 to be double, string given in
>> /var/www/nfsen/plugins/flowdoh.php on line 502, referer:
>> http://y.y.y.y/nfsen/nfsen.php?sub_tab=3
>>
>>
>>
>>
>> On Fri, Jul 5, 2013 at 1:20 AM, Esteban Monge 
>> <este...@nuevaeralatam.com>wrote:
>>
>>> Hello:
>>>
>>> We love Flow DOH but we had problems with rows, the first row always
>>> show:
>>>
>>>   ank Host Address IP Address Bytes % Bytes 1
>>> val 0 MB %
>>>
>>>
>>> The next rows are showed correctly.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by Windows:
>>>
>>> Build for Windows Store.
>>>
>>> http://p.sf.net/sfu/windows-dev2dev
>>> _______________________________________________
>>> Nfsen-discuss mailing list
>>> Nfsen-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/nfsen-discuss
>>>
>>>
>>
>>
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Nfsen-discuss mailing list
Nfsen-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss

Reply via email to