[collectd] compiling collectd-5.0.1 for iptables on CentOS 5.6
Manish Sapariya
manish.sapariya at kpoint.com
Thu Jul 5 08:18:50 CEST 2012
Hi,
I have made some progress but not quite there yet.
As read in one of the tickets, I built and installed the
iptables from 1.4.13 sources and configuration and make
and install everything went fine with iptables enabled.
Sigh!
However I am still not able to see the RRD graphs.
Following is my configuration of iptables plugin.
==============================
<Plugin iptables>
# Chain table chain
Chain "filter" "FORWARD"
Chain "filter" "INPUT"
Chain "filter" "OUTPUT"
Chain "filter" "ACCT4" "httpup"
Chain "filter" "ACCT4" "httpdown"
</Plugin>
=============================
Here is the output of iptable command
===============================
# iptables -L -v
Chain INPUT (policy ACCEPT 169K packets, 30M bytes)
pkts bytes target prot opt in out source
destination
169K 30M ACCT4 all -- any any anywhere
anywhere
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
Chain OUTPUT (policy ACCEPT 167K packets, 66M bytes)
pkts bytes target prot opt in out source
destination
167K 66M ACCT4 all -- any any anywhere
anywhere
Chain ACCT4 (2 references)
pkts bytes target prot opt in out source
destination
24247 2836K tcp -- any any anywhere
anywhere tcp dpt:http /* =httpup=HTTP upload traffic */
18798 35M tcp -- any any anywhere
anywhere tcp spt:http /* =httpdown=HTTP download traffic */
==================================
How can I debug the iptables plugin. I don't see any
error/warning messages in collectd log file.
Thanks and Regards,
Manish
On 7/4/2012 12:45 PM, Manish Sapariya wrote:
> Here is briefly the results of next steps.
>
> After looking closely at the configure and
> configure.in revealed that there is no file
>
> ./src/owniptc/ipt_kernel_headers.h
>
> and the release notes confirms that the
> shipped version support has been deprecated.
>
> That means I need to have the iptables-devel
> installed to get libiptc.
>
> However as I mentioned in my earlier email
> make fails with conflicting types.
>
> To make progress, I modified the iptables.c
> with following two defines
>
> #define HAVE_IPTC_HANDLE_T 1
> #define HAVE_IP6TC_HANDLE_T 1
>
> which took me through compile, however stuck
> at the link stage again with multiple definition
> of TC_GET_RULE and others.
>
> Is this a known issue?
>
> Thanks and Regards,
> Manish
>
>
> On 7/3/2012 6:19 PM, Manish Sapariya wrote:
>> my bad ...
>>
>> I am NOT able to get this one compiled.
>>
>> Thanks,
>> Manish
>>
>>
>> On 7/3/2012 6:13 PM, Manish Sapariya wrote:
>>> Hi,
>>> I am able to get this one compiled.
>>>
>>> I have following header files.
>>>
>>> -
>>> /usr/src/kernels/2.6.18-238.el5-x86_64/include/linux/netfilter_ipv4/ip_tables.h
>>>
>>>
>>>
>>> -
>>> /usr/src/kernels/2.6.18-238.el5-x86_64/include/linux/netfilter_ipv6/ip6_tables.h
>>>
>>>
>>>
>>> -
>>> /usr/src/kernels/2.6.18-238.el5-x86_64/include/linux/netfilter/x_tables.h
>>>
>>>
>>> and I ran the configure after exporting
>>>
>>> export CPPFLAGS='-I /usr/src/kernels/2.6.18-238.el5-x86_64/include/'
>>>
>>>
>>> But it still fails with the same message saying no (Linux iptables
>>> headers not found)
>>>
>>> Could anyone please suggest anything else that I can try.
>>>
>>> Thanks and Regards,
>>> Manish
>>>
>>>
>>> On 6/25/2012 7:02 PM, Manish Sapariya wrote:
>>>> Hi,
>>>> I am trying to compile collectd-5.1.0 for libiptc for iptables
>>>> monitoring, but not able to compile it successfully. I tried to
>>>> apply the hints on the plugin page, but none of the following
>>>> approach is giveing me result.
>>>>
>>>> * When I configure with default parameters it could not find libiptc
>>>> libiptc . . . . . . . no (pkg-config doesn't know libiptc)
>>>>
>>>> * If I configure collectd with
>>>> ./configure --with-libiptc=shipped
>>>> libiptc . . . . . . . no (Linux iptables headers not found)
>>>>
>>>> * If I configure collectd with
>>>>
>>>> ./configure --with-libiptc=/usr/include/libiptc/
>>>>
>>>> the configuration is fine, but the make fails with following error.
>>>> iptables.c:50: error: conflicting types for âiptc_handle_tâ
>>>> /usr/include/libiptc/libiptc.h:29: error: previous declaration of
>>>> âiptc_handle_tâ was here
>>>> iptables.c:53: error: conflicting types for âip6tc_handle_tâ
>>>> /usr/include/libiptc/libip6tc.h:21: error: previous declaration of
>>>> âip6tc_handle_tâ was here
>>>> cc1: warnings being treated as errors
>>>>
>>>> Can somebody point me to the method which works.
>>>> Do I need the complete kernel sources to build this plugin?
>>>>
>>>> My environment:
>>>> - CentOS 5.6
>>>> - Linux one-567.gslab.com 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15
>>>> EST 2011 x86_64 x86_64 x86_64 GNU/Linux
>>>> - Packages
>>>> - iptables-1.3.5-5.3.el5_4.1
>>>> - iptables-devel-1.3.5-9.1.el5
>>>> - kernel-headers-2.6.18-238.el5
>>>> - kernel-devel-2.6.18-238.el5
>>>>
>>>> Appreciate any help, to get past this issue.
>>>>
>>>
>>>
>>> _______________________________________________
>>> collectd mailing list
>>> collectd at verplant.org
>>> http://mailman.verplant.org/listinfo/collectd
>>
>>
>> _______________________________________________
>> collectd mailing list
>> collectd at verplant.org
>> http://mailman.verplant.org/listinfo/collectd
>
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
More information about the collectd
mailing list