Hey Stefan,
I use nfacctd with a custom plugin, never used pmacctd nor one of the SQL
plugins.
My guess is that you don't use "aggregate[]: none" and "sql_history[]: 1d".
Whatever configuration proposal I give you is a shot in the dark.
To have the data of all interfaces in one table I would create a pretag map
file for each of them, setting the tag to an interface index I choose (e.g.
tag=1 for eth0, tag=2 for eth1, ...) and use the "tag" primitive in the
aggregate directive.
MySQL table:
CREATE TABLE `if_daily` (
`agent_id` INT(10) UNSIGNED NOT NULL,
`stamp_inserted` DATETIME NOT NULL,
`packets` INT(10) UNSIGNED NOT NULL,
`bytes` BIGINT(20) UNSIGNED NOT NULL,
`stamp_updated` DATETIME NULL DEFAULT NULL,
PRIMARY KEY (`agent_id`, `stamp_inserted`)
)
File pretag-eth0.map file:
!
set_tag: 1
!
The configuration file:
!
plugins: mysql
!
sql_optimize_clauses: true
sql_history: 1d
sql_history_roundoff: d
sql_table: if_daily
sql_refresh_time: 300
!
aggregate: tag
interface: eth0
pre_tag_map: pretag-eth0.map
!
plugin_pipe_size: 10240000
plugin_buffer_size: 102400
!
sql_host: <mysqld-host>
sql_db: <db-name>
sql_user: <db-username>
sql_passwd: <db-password>
!
"agent_id" in the MySQL table contains the interface id as of the pre-tagging.
Data is updated every 300 seconds.
Regards,
Mario
> -----Original Message-----
> From: pmacct-discussion [mailto:[email protected]]
> On Behalf Of Whisky
> Sent: Dienstag, 1. April 2014 16:16
> To: [email protected]
> Subject: Re: [pmacct-discussion] Virtual interfaces setup problem
>
> Hi Mario.
>
> Thanks for your message. I think what would help me most would be a
> correct
> configuration. As I said, I only need the total in and out values for one
> specific interface without ports or protocol. Shouldn't be too difficult but
> I just can't figure out how a fitting config would look like.
>
> Regards,
>
> Stefan
>
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists