This module is not very well named, as it has almost nothing to do with Logstash. It is used to define counters that will then be logged by collectd.
You should configure collectd to create a Unix socket :
LoadPlugin unixsock <Plugin "unixsock"> SocketFile "/var/run/collectd-unixsock" SocketGroup "collectdsocket" SocketPerms "0660" </Plugin>
This is a conduits-specific function that will increase a counter for each piece of data that traverses this conduit. It will not alter the data.
the counter to export
path to the unix socket
name of the node, usually the server's fully qualified domain name
name of the plugin + instance
name of the counter instance
|-> IO ()|
This registers a counter to a Collectd server. This can be used in this way :
counter2collectd nbmsg "/var/run/collectd-unixsock" nodename "logstash-shipper" "messages"