Difference between revisions of "Plugin:UnixSock"

From collectd Wiki
Jump to: navigation, search
(add 2 examples of socket usage)
(Relicensed to MIT license.)
 
Line 6: Line 6:
 
   | FirstVersion={{Version|4.0}}
 
   | FirstVersion={{Version|4.0}}
 
   | Copyright=''2007–2008'' Florian octo Forster
 
   | Copyright=''2007–2008'' Florian octo Forster
   | License={{GPLv2}}
+
   | License={{MIT License}}
 
   | Manpage={{Manpage|collectd.conf|5|plugin_unixsock}}<br />{{Manpage|collectd-unixsock|5}}
 
   | Manpage={{Manpage|collectd.conf|5|plugin_unixsock}}<br />{{Manpage|collectd-unixsock|5}}
 
}}
 
}}

Latest revision as of 09:55, 21 May 2015

UnixSock plugin
Type: other
Callbacks: config, init, shutdown
Status: supported
First version: 4.0
Copyright: 2007–2008 Florian octo Forster
License: MIT license
Manpage: collectd.conf(5)
collectd-unixsock(5)
List of Plugins

The UnixSock plugin opens a UNIX domain socket and accepts connections. Using this socket one can send commands to the daemon and receive information. The protocol used is documented in the collectd-unixsock(5) manual page and in the Plain text protocol wiki page.

This plugin is a generic plugin, i.e. it cannot work without configuration, because there is no reasonable default behavior. Please read the Plugin unixsock section of the collectd.conf(5) manual page for an in-depth description of the plugin's configuration.

Synopsis

LoadPlugin unixsock
# ...
<Plugin unixsock>
  SocketFile "/path/to/socket"
  SocketGroup "collectd"
  SocketPerms "0770"
  DeleteSocket true
</Plugin>

Dependencies

  • none

Examples

collectdctl listval # collectdctl is available since version 5.0.0
echo "PUTNOTIF severity=okay time=$(date +%s) message=hello" | \
  socat - UNIX-CLIENT:/path/to/socket

See also