Wubot::Plugin::Command - run an external command and capture the output and exit status
version 0.2.5
~/wubot/config/plugins/Command/netstat.yaml --- command: netstat -s delay: 1m
This plugin is useful for running a command at regular intervals, and then sending the output on to the reactor for further processing.
The output of the command will be sent in the field 'command_output'.
Here is an example to parses the packages sent and received of the output of 'netstat -s'.
--- command: netstat -s delay: 1m react: - name: command regexp packets sent plugin: CaptureData config: source_field: command_output target_field: packets_sent regexp: '(\d+) packets sent' - name: command regexp packets received plugin: CaptureData config: source_field: command_output target_field: packets_received regexp: '(\d+) packets received'
The standard monitor check() method.
The standard monitor validate_config() method.
To install Wubot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wubot
CPAN shell
perl -MCPAN -e shell install Wubot
For more information on module installation, please visit the detailed CPAN module installation guide.