PrePAN

Sign in to PrePAN

App::PerlWatcher::Engine Nagios-inspired system tray events desktop watcher / notifier

Good

Synopsis

 # define own frontend in separate package

 package My::FrontEnd;

 use Moo;
 with 'App::PerlWatcher::Frontend';

 sub update {
    my ( $self, $status ) = @_;
    say $status->level;
 }


 # define engine config with reqired watchers

 $config = {
    watchers => [
        {
            class => 'App::PerlWatcher::Watcher::Ping',
            config => {
                host    =>  'google.com',
                port    =>  80,
                frequency   =>  10,
                timeout     => 1,
                on => {
		  fail => {
                      3   =>  'info',
		      5   =>  'warn',
		      8   =>  'alert',
		    }
                   ok   => { 1 => 'notice'},
                },
            },
        },
    ],
 };

 # initialization: bring all pieces together
 my $frontend = My::FrontEnd->new(engine => $engine);
 my $backend  = My::BackEnd->new;

 $engine = Engine->new(config => $config, backend => $backend)
 $engine->frontend( $app );

 $engine->start;
 # now if google is down, it says ping status with interpetation
 # notice
 # notice
 # notice
 # info
 # info
 # warn
 # ...

Description

Hello, this is my first application (and first cpanm module), which I would like to share. Currently it consists of 2 modules Engine and GTK2-Frontend.

PerlWatcher is nagios-inspired system tray events desktop watcher / notifier. It watches the different kind of events (rss updates, weather, stock quotes update, local log files change, network hosts availability etc.) and aggregates them into single viewable dashboard widget .

The more detailed description with screenshot is available on https://github.com/basiliscos/perl-watcher .

After some reviews, I'll put it on CPAN.

Thanks!

Comments

I like laconic programs. It's seems to me, that it is one of simple product from any similiar.
PerlWatcher must to grow and to evolve.
I'll be glad to use PerlWatcher with improved design and additional watch modules in nearest future. :)
PS. I installed it on Ubuntu 12.04 LTS. Any Unity owners, you'll need some additional packages.

Please sign up to post a review.