[collectd] collectd for embedded, time tag

Denys Fedoryshchenko nuclearcat at nuclearcat.com
Thu Apr 23 22:18:06 CEST 2020


On 2020-04-23 14:33, Florian Forster wrote:
> Hi Denys,
> 
> On 2020-04-23 12:14, Denys Fedoryshchenko wrote:
>> I can try to write patch, for example:
> 
> that'd great!
> 
>> Extending sockent_t by adding there uint8_t (or int) "options" 
>> parameter,
>> where certain optional bits can be set.
>> So, for example bit 0 will be "ZERO_AS_CURRENT_TIME"
>> 
>> Then, maybe, it can be set in config as optional, third parameter for
>> "Listen" socket.
>> Like:
>> Listen "ff18::efc0:4a42" "ZeroAsCurrentTime"
> 
> I think this should be a named ("child") parameter, instead of a
> positional ("value") parameter. The configuration could look like
> this:
> 
>   <Listen "ff18::efc0:4a42" "25826">
>     ZeroAsCurrentTime true
>   </Listen>
> 
> To implement this, I'd extend `struct sockent_server` to add a boolean, 
> e.g.:
> 
>   struct sockent_server {
>     // …
>     _Bool accept_zero_time;
>   }
> 
> This is more readable than using flags / a bitfield.
> 
> Populate this field in `network_config_add_listen()`. The helper
> function `cf_util_get_boolean()` (from "configfile.h") is probably
> useful here.
> 
> Then, in `parse_packet()`, pass the boolean on to 
> `network_dispatch_values()`.
> 
> Last step would be to document the new config option in
> src/collectd.conf.pod (source of the manpage) and src/collectd.conf.in
> (default config).

Thanks for guidance!

I will try to implement first collectd for arduino as well (it seems 
arduino fans
got very interested), maybe will try to add encryption/signing as well.

> 
> HTH; if you have any questions or run into issues, feel free to ask :)
For sure! :)



More information about the collectd mailing list