Yep that didnt work when i tried it. It still exported the src_host a string.

On Thu, Apr 19, 2018 at 2:58 PM, Paolo Lucente <pa...@pmacct.net> wrote:
>
> Hi Anthony,
>
> Yes, nice tip from Yann actually - i'm going to document it :) This
> would work and is portable across all plugins, you can give it a try.
> Specifically for the SQL plugins, which i understand is not your case,
> a sql_num_hosts feature exists - failing the custom primitive approach
> for any unforeseen reason, we could consider a porting of this feature.
>
> Paolo
>
> On Thu, Apr 19, 2018 at 11:04:24AM -0400, Anthony Caiafa wrote:
>> So this should technically work?
>>
>> name=src_host    field_type=8         len=4       semantics=u_int
>> name=dst_host    field_type=12        len=4       semantics=u_int
>>
>> Going against the direct keys instead of creating a new one for src_host_int.
>>
>> On Thu, Apr 19, 2018 at 10:05 AM, Anthony Caiafa <2600...@gmail.com> wrote:
>> > yeah backend is clickhouse and it has a similar function. However
>> > conversion for range queries is meh. might as well store as an int.
>> >
>> > On Thu, Apr 19, 2018 at 7:21 AM, Karl O. Pinc <k...@meme.com> wrote:
>> >> On Thu, 19 Apr 2018 07:30:12 +0000
>> >> Yann Belin <y.belin...@gmail.com> wrote:
>> >>
>> >>> As far as I know it doesn't but if you use nfacctd, you can easily
>> >>> define your own primitives to do the same job:
>> >>
>> >>> On Thu, Apr 19, 2018 at 12:14 AM Anthony Caiafa <2600...@gmail.com>
>> >>> wrote:
>> >>>
>> >>> > Does this feature currently exist? Having the ability to convert
>> >>> > the ipv4 key field to an int?
>> >>
>> >> Another option would be to save your data in PostgreSQL
>> >> and use the ip address data type, converting from there
>> >> on output if necessary.
>> >>
>> >> https://www.postgresql.org/docs/10/static/datatype-net-types.html
>> >>
>> >> Regards,
>> >>
>> >> Karl <k...@meme.com>
>> >> Free Software:  "You don't pay back, you pay forward."
>> >>                  -- Robert A. Heinlein
>> >>
>> >> _______________________________________________
>> >> pmacct-discussion mailing list
>> >> http://www.pmacct.net/#mailinglists
>>
>> _______________________________________________
>> pmacct-discussion mailing list
>> http://www.pmacct.net/#mailinglists
>
> _______________________________________________
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists

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

Reply via email to