NAME

App::Wubot::Plugin::Command - run an external command and capture the output and exit status

VERSION

version 0.3.10

  ~/wubot/config/plugins/Command/netstat.yaml

  ---
  command: netstat -s
  delay: 1m

DESCRIPTION

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'.

HINTS

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'

SUBROUTINES/METHODS

check( $inputs )

The standard monitor check() method.

validate_config( $config )

The standard monitor validate_config() method.