Wubot::Plugin::WebMatches - monitor a web page for items matching a regexp


version 0.2_002



  delay: 1d
  regexp: '\"(openssl\-[\d\.]+[a-z]?\.tar\.gz)\"'


This plugin allows you define a regexp will capture match one or more items on a web page. Each time a new item shows up on the page that matches your regexp, a message will get sent with the matching item.

The message will contain a field called 'match' which will contain the matched text, and 'link' which will point to the source URL.

In the event of a failure retrieving content from the specified URL, a message will be sent containing a subject field such as:

  subject: Request failure: {$error}


If you simply want to capture a single occurrence of a regexp from a page at regular intervals, you may want to use the Wubot::Plugin::WebFetch plugin instead. This plugin will cache previously seen values and will only send a message when a new item shows up in the list of matches.


I like to use this plugin to monitor for new releases of software when there is no RSS feed or other mechanism to notify you of a new release. For example, here is the complete monitor config I use for monitoring for new OpenSSL releases:

  delay: 1d
  regexp: '\"(openssl\-[\d\.]+[a-z]?\.tar\.gz)\"'


    - name: matched
      condition: match is true

        - name: field
          plugin: SetField
          field: sticky
          value: 1

        - name: subject
          plugin: Template
            template: 'New openssl release: {$match}'
            target_field: subject


This monitor uses the global cache mechanism, so each time the check runs, it will update a file such as:


The monitor caches all matches in the feed in this file. When a new (previously unseen) match shows up on the feed, the message will be sent, and the cache will be updated. Removing the cache file will cause all matching items to be sent again.


This plugin uses Wubot::Util::WebFetcher.