chef-collectd icon indicating copy to clipboard operation
chef-collectd copied to clipboard

Modeling nested XML plugin configuration using collectd_plugin resource

Open 0xAhmed opened this issue 12 years ago • 2 comments

Hi,

Great work, Thumbs up !

I was wondering how can i model a collectd plugin configuration that uses nested XML values using the collectd_plugin resource ?

Take the phpfpm collectd plugin as an example https://collectd.org/wiki/index.php/Plugin:cURL-JSON/phpfpm where is lists something like the following:

LoadPlugin curl_json
<Plugin curl_json>
<URL "http://127.0.0.1/_fpmstatus?json">
  Instance "fpm"
  <Key "accepted conn">
      Type "http_requests"
  </Key>
  <Key "listen queue len">
      Type "listen_queue"
  </Key>
  <Key "active processes">
      Type "active_processes"
  </Key>
  <Key "total processes">
      Type "total_processes"
  </Key>
</URL>
</Plugin>

Any hints on how to do that ?

Thanks in advance.

0xAhmed avatar Oct 31 '12 11:10 0xAhmed

Take a look at how the python plugin is implemented, make a little DSL for the curl_json in particular :)

coderanger avatar Oct 31 '12 18:10 coderanger

Is there a clear way to achieve this? Thank you!

danmilon avatar Sep 25 '14 13:09 danmilon