root/src/modules/collectd.xml

Revision 3b18b2ab4d2dc2b0a962ebcafa619a5b3cc86fdb, 5.9 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 months ago)

Update collectd to support larger metric names.
Default to collectd's protocol defaults of 64 bytes. There is a
*module* configuration options to change them, that actually control
global noit behavior. I figure if you're going to violate the
published protocol, you should do it on a noit-by-noit basis so no
one gets confused.

  • Property mode set to 100644
Line 
1 <module>
2   <name>collectd</name>
3   <description><para>The collectd module provides collectd support for Reconnoiter.  The collectd modules listens on a UDP port and waits for metrics to come from a collectd agent. It also provides support for signing and encrypting metrics from the collectd agent, which is supported in version 4.7.0 and above.  Only one is supported per target.</para>
4     <para>Additionally, this module registers a REST handler to support collectd's write_http output plugin.  This exposes a REST endpoint at /module/collectd.</para></description>
5   <loader>C</loader>
6   <image>collectd.so</image>
7   <moduleconfig>
8     <parameter name="host_len"
9                required="optional"
10                default="64"
11                allowed="\d+">Maximum length of the host field [64, 256].</parameter>
12     <parameter name="plugin_len"
13                required="optional"
14                default="64"
15                allowed="\d+">Maximum length of the plugin field [64, 256].</parameter>
16     <parameter name="plugin_instance_len"
17                required="optional"
18                default="64"
19                allowed="\d+">Maximum length of the plugin_instance field [64, 256].</parameter>
20     <parameter name="type_len"
21                required="optional"
22                default="64"
23                allowed="\d+">Maximum length of the type_instance field [64, 256].</parameter>
24     <parameter name="type_instance_len"
25                required="optional"
26                default="64"
27                allowed="\d+">Maximum length of the type_instance field [64, 256].</parameter>
28     <parameter name="asynch_metrics"
29                required="optional"
30                default="false"
31                allowed="(?:true|false)">Report metrics asthey arrive, not on the period provided.</parameter>
32     <parameter name="collectd_port"
33                required="required"
34                default="25826"
35                allowed="\d+">The port which collectd packets are received</parameter>
36     <parameter name="notifications"
37                required="options"
38                default="true"
39                allowed="(?:true|on|false|off)">Specify whether collectd notifications are acted upon.</parameter>
40     <parameter name="security_level"
41                required="optional"
42                allowed="\d+">An integer detailing the security level which to allow.  0 for all packets allowed, 1 for signed and encrypted packets allowed, 2 for only encrypted packets allowed.</parameter>
43     <parameter name="username"
44                required="optional"
45                allowed=".+">The collectd username for authenticating signed and encrypted packets. Also the username used for HTTP authentication when using the write_http ingestion method.</parameter>
46     <parameter name="secret"
47                required="optional"
48                allowed=".+">The collectd password for authenticating signed and encrypted packets. Also the password used for HTTP authentication when using the write_http ingestion method.</parameter>
49   </moduleconfig>
50   <checkconfig>
51     <parameter name="asynch_metrics"
52                required="optional"
53                default="false"
54                allowed="(?:true|false)">Report metrics asthey arrive, not on the period provided.</parameter>
55     <parameter name="security_level"
56                required="optional"
57                allowed="\d+">An integer detailing the security level which to allow.  0 for all packets allowed, 1 for signed and encrypted packets allowed, 2 for only encrypted packets allowed.</parameter>
58     <parameter name="username"
59                required="optional"
60                allowed=".+">The collectd username for authenticating signed and encrypted packets. Also the username used for HTTP authentication when using the write_http ingestion method.</parameter>
61     <parameter name="secret"
62                required="optional"
63                allowed=".+">The collectd password for authenticating signed and encrypted packets. Also the password used for HTTP authentication when using the write_http ingestion method.</parameter>
64   </checkconfig>
65   <examples>
66     <example>
67       <title>Simple encrypted passive checking.</title>
68       <para>The following example allows a collectd agent to send any metric to the noit
69       system.  In this example the collectd agent must be version 4.7.0 to support encryption
70       and must be configured with parameters similar to the ones below.  Like the snmptrap
71       module the collectd disregards the timeout value completely, but uses the period to
72       batch all the checks in one commit.  If there are >1 metrics within the period the
73       check is marked as G and A for state and availability respectively.  The first program
74       listing shows a collectd configuration and the second listing shows the corresponding
75       check configuration in reconnoiter.</para>
76       <programlisting><![CDATA[
77       <Plugin network>
78         <Server "127.0.0.1" "25826">
79           SecurityLevel "encrypt"
80           Username "us3rname"
81           Password "s3cr3t"
82         </Server>
83       </Plugin>
84
85       <Plugin write_http>
86         <URL "https://127.0.0.1:43191/module/collectd/">
87           User "us3rname"
88           Password "s3cr3t"
89           VerifyPeer false
90           VerifyHost false
91           CACert "/etc/ssl/ca.crt"
92           Format "JSON"
93           StoreRates false
94         </URL>
95       </Plugin>
96       ]]></programlisting>
97
98       <programlisting><![CDATA[
99       <noit>
100         <modules>
101           <module image="collectd" name="collectd">
102             <config>
103               <username>us3rname</username>
104               <secret>s3cr3t</secret>
105               <security_level>2</security_level>
106             </config>
107           </module>
108         </modules>
109         <checks>
110           <check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" module="collectd"
111                  target="127.0.0.1" period="60000" timeout="30000"/>
112         </checks>
113       </noit>
114       ]]></programlisting>
115     </example>
116   </examples>
117 </module>
Note: See TracBrowser for help on using the browser.