NAME

Net::Peep::Notification - A Peep notification

SYNOPSIS

use Sys::Hostname;
use Net::Peep::Notification;
$notification = new Net::Peep::Notification;
$notification->client($client); # e.g., logparser
$notification->message($message); # the notification message
$notification->status('info'); # or warn or crit
$notification->datetime(time()); # the time in epoch seconds
$notification->hostname(hostname()); # the host on which the client runs

DESCRIPTION

This object contains attributes which define a notification.

A notification is generated when criteria defined in the Peep
configuration file is met, such as when load exceeds 2.5 or a
syslog entry indicates a media failure.

EXPORT

None by default.

ATTRIBUTES

$LOGGER - A Net::Peep::Log object

METHODS

new() - The constructor

client() - A get/set method to store the name of the client (for
example, logparser) which is generating the notification.

message() - A get/set method to store the message associated with
the notification (for example, "Load is 2.72").

datetime() - A get/set method to store the time at which the
notification was generated.  The time should be in epoch seconds,
such as is returned by the time() function in Perl.

status() - A get/set method.  Stores one of 'info', 'warn', or
'crit'.

hostname() - A get/set method to store the hostname of the client
generating the notification.

AUTHOR

Collin Starkweather <collin.starkweather@colorado.edu> Copyright (C) 2001

SEE ALSO

perl(1), Net::Peep, Net::Peep::Notifier