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.
Additionally, this module registers a REST handler to support collectd's write_http output plugin. This exposes a REST endpoint at /module/collectd.
The port which collectd packets are received
Specify whether collectd notifications are acted upon.
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.
The collectd username for authenticating signed and encrypted packets. Also the username used for HTTP authentication when using the write_http ingestion method.
The collectd password for authenticating signed and encrypted packets. Also the password used for HTTP authentication when using the write_http ingestion method.
Example 5.3. Simple encrypted passive checking.
The following example allows a collectd agent to send any metric to the noit system. In this example the collectd agent must be version 4.7.0 to support encryption and must be configured with parameters similar to the ones below. Like the snmptrap module the collectd disregards the timeout value completely, but uses the period to batch all the checks in one commit. If there are >1 metrics within the period the check is marked as G and A for state and availability respectively. The first program listing shows a collectd configuration and the second listing shows the corresponding check configuration in reconnoiter.
<Plugin network> <Server "127.0.0.1" "25826"> SecurityLevel "encrypt" Username "us3rname" Password "s3cr3t" </Server> </Plugin> <Plugin write_http> <URL "https://127.0.0.1:43191/module/collectd/"> User "us3rname" Password "s3cr3t" VerifyPeer false VerifyHost false CACert "/etc/ssl/ca.crt" Format "JSON" StoreRates false </URL> </Plugin>
<noit> <modules> <module image="collectd" name="collectd"> <config> <username>us3rname</username> <secret>s3cr3t</secret> <security_level>2</security_level> </config> </module> </modules> <checks> <check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" module="collectd" target="127.0.0.1" period="60000" timeout="30000"/> </checks> </noit>