r/collectd: Enable unixsock plugin
The *unixsock* plugin for *collectd* provides a socket-based interface that other software can use to communicate with *collectd*. Notably, this can be used to publish custom values, query existing values, and flush caches. The socket is created at `/run/collectd/socket`. The `/run/collectd` directory is managed by systemd; it will be created automatically when the service starts and cleaned up when it stops.
This commit is contained in:
18
roles/collectd/templates/collectd-unixsock.conf.j2
Normal file
18
roles/collectd/templates/collectd-unixsock.conf.j2
Normal file
@@ -0,0 +1,18 @@
|
||||
{% if collectd_load_unixsock_plugin %}
|
||||
LoadPlugin unixsock
|
||||
{% endif %}
|
||||
|
||||
<Plugin unixsock>
|
||||
SocketFile "/run/collectd/socket"
|
||||
{% if collectd_unixsock_group|d %}
|
||||
SocketGroup "{{ collectd_unixsock_group }}"
|
||||
{% endif %}
|
||||
{% if collectd_unixsock_perms|d %}
|
||||
SocketPerms "{{ collectd_unixsock_perms }}"
|
||||
{% endif %}
|
||||
{% if collectd_unixsock_delete|d is true %}
|
||||
DeleteSocket true
|
||||
{% elif collectd_unix_sock_delete|d is false%}
|
||||
DeleteSocket false
|
||||
{% endif %}
|
||||
</Plugin>
|
||||
Reference in New Issue
Block a user