Hi Johan, your nfacctd is compiled without mysql support, so it's not logging 
to the database, only the memory plugin. Please fix that and try again. Cheers, 
Chris.


-----Original Message-----
From: johan lotter <jlct...@gmail.com>
Sender: Chris Wilson <ch...@aptivate.org>Date: Sun, 1 Apr 2012 16:33:50 
To: <pmacct-discussion@pmacct.net>; <ch...@aptivate.org>; <pa...@pmacct.net>
Cc: <pmgraph-t...@aptivate.org>
Subject: nfacctd

Hi Chris

1) Clean install of pmgraphs on Debian Squeeze using the Debian
package instructions at: http://www.aptivate.org/pmgraph-nstallation-2
2) Disabled Iptables Firewall Rules using these instructions:
http://www.cyberciti.biz/faq/turn-on-turn-off-firewall-in-linux/
3) Created nfacctd.conf file using "known working" nfacct/pmgraph
configuration, page 52: http://www.ws.afnog.org/afnog2010/bw-mgmt/

daemonize: false
debug: true
pidfile: /var/run/nfacctd.pid
logfile: /var/log/nfacctd.log
! syslog: daemon
nfacctd_port: 5678
plugins: mysql
aggregate: src_host, src_port, dst_host, dst_port, proto
sql_db: pmacct
sql_table: acct_v6
sql_history: 1m
sql_history_roundoff: m
sql_table_version: 6
sql_host: 127.0.0.1
sql_user: pmacct
sql_passwd: secret
sql_refresh_time: 60
sql_dont_try_update: true
sql_optimize_clauses: true
! sql_preprocess: minb = 1000

4) Changed the subnet in pmgraphs to that of my own (192.168.88.)
5) Configured Net-Flow (v5) on my (Mikrotik) Router to send flows to
PC running pmacct/pmgraphs: 192.168.88.150
6) Executed with: nfacctd -f nfacctd.conf

And get the following error:

root@debhome:/etc/pmacct# nfacctd -f nfacctd.conf
ERROR ( nfacctd.conf ): Unknown plugin type: mysql. Ignoring.
WARN ( nfacctd.conf ): No plugin has been activated; defaulting to
in-memory table.

gedit /var/log/nfacctd.log

(edited down quite a bit)

Apr 01 16:10:38 INFO ( default/memory ): 124928 bytes are available to
address shared memory segment; buffer size is 176 bytes.
Apr 01 16:10:38 INFO ( default/memory ): Trying to allocate a shared
memory segment of 2748416 bytes.
Apr 01 16:10:38 INFO ( default/core ): waiting for NetFlow data on 0.0.0.0:5678
Apr 01 16:10:38 DEBUG ( default/memory ): allocating a new memory segment.
Apr 01 16:10:38 DEBUG ( default/memory ): allocating a new memory segment.
Apr 01 16:10:38 OK ( default/memory ): waiting for data on: '/tmp/collect.pipe'
Apr 01 16:10:39 DEBUG ( default/memory ): Selecting bucket 4612.
Apr 01 16:10:39 DEBUG ( default/memory ): Selecting bucket 9644.
Apr 01 16:10:41 DEBUG ( default/memory ): Selecting bucket 2391.
Apr 01 16:10:41 DEBUG ( default/memory ): Selecting bucket 2391.
Apr 01 16:11:23 DEBUG ( default/memory ): Selecting bucket 31124.
Apr 01 16:11:24 INFO: Discarding unknown packet: nfacctd=0.0.0.0:5678
agent=192.168.88.1:5678
Apr 01 16:12:19 DEBUG ( default/memory ): Selecting bucket 20471.
Apr 01 16:12:24 INFO: Discarding unknown packet: nfacctd=0.0.0.0:5678
agent=192.168.88.1:5678
Apr 01 16:12:33 DEBUG ( default/memory ): Selecting bucket 2325.
Apr 01 16:12:33 DEBUG ( default/memory ): Selecting bucket 1887.

There is nothing in /var/log/daemon.log pertaining to nfacctd (even
though I have tried running with daemonize: true

Any help very welcome (as always), thanks.


> ---------- Forwarded message ----------
> From: Chris Wilson <ch...@aptivate.org>
> To: pmacct-discussion@pmacct.net
> Cc: pmgraph-t...@aptivate.org
> Date: Thu, 2 Feb 2012 12:37:42 +0000 (GMT)
> Subject: Re: [pmacct-discussion] pmacct-discussion Digest, Vol 83, Issue 1
> Hi Johan,
>
> On Thu, 2 Feb 2012, johan lotter wrote:
>
>> Yet when I configure and run with mysql plugin I get no data...
>
>
> Does that mean that you get nothing in the database, or nothing graphed? I 
> notice that you mentioned pmgraph later, which is a different project (that 
> uses pmacct).
>
> If you get nothing in the database, please check your /var/log/syslog and 
> /var/log/daemon files for messages from pmacct.
>
>> Created a file called nfacctd.conf
>> placed it in the same directory as pmacct.conf
>> edited as follows:
>> !
>> daemonize: true
>> plugins: mysql
>> aggregate: sum_host

> pmgraph will not work if you aggregate on sum_host. It requires the src_host, 
> dst_host, src_port and dst_port fields at least. It may also get confused by 
> a recent change to pmacct (which I requested) to change the names of the 
> src_port and dst_port fields, as the pmgraph package may not have been 
> updated to account for that change.
>
> You may find this presentation useful for a "known working" nfacct/pmgraph 
> configuration, especially page 52:
>
>  http://www.ws.afnog.org/afnog2010/bw-mgmt/
>
>> executed with nfacctd -f nfacctd.conf
>> enabled Netflow (Traffic-Flow on my router) and told it to send
>> traffic to IP address of listening NIC on port 5678
>>
>> Yet pmgraph is not graphing anything

> No firewall blocking inbound UDP traffic to port 5678?


!DSPAM:4f78675743401269443440!

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to