This plugin is currently being groomed to be an integration. It works, but we haven't spent a lot of time on it yet to optimize the user experience. Feel free to try it out, just keep in mind that we will be enhancing the experience over time.
This plugin is ported from the Telegraf Exec Input Plugin. It runs a script and reads its output. The plugin is able to parse the Nagios input data format.
nagios plugin is included with the SolarWinds Snap Agent by default, please follow the directions below to enable it for a agent instance.
The agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your installation. In this example a script called
/tmp/test.sh, a script called
/tmp/test2.sh, and all scripts matching glob pattern
/tmp/collect_*.sh are configured for JSON format. Glob patterns are matched on every run, so adding new scripts that match the pattern will cause them to be picked up immediately. To enable the plugin:
- Make a copy of the exec example configuration file
/opt/SolarWinds/Snap/etc/plugins.d/exec.yaml.example, renaming it to
$ sudo cp /opt/SolarWinds/Snap/etc/plugins.d/exec.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/exec.yaml
- Update the
/opt/SolarWinds/Snap/etc/plugins.d/exec.yamlconfiguration file with settings specific to your use case, for example:
## Commands array
## Timeout for each command to complete.
## measurement name suffix (for separating different commands)
## Data format to consume: "collectd", "graphite", "influx", "json", "nagios", or "value"
- Restart the agent:
$ sudo service swisnapd restart
Let's say that we have the above configuration, and mycollector outputs the following JSON:
The collected metrics will be stored as fields under the measurement "exec_mycollector":
exec_mycollector a=0.5,b_c=0.1,b_d=5 1452815002357578567
If using JSON, only numeric values are parsed and turned into floats. Booleans and strings will be ignored.
See more examples in the Telegraf Exec Input Plugin docs.
For this plugin it doesn't make much sense to create a metric table as the metrics that are generated depend on how the plugin is configured.
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.