Author image Collin Starkweather

NAME

Net::Peep::Conf - Perl extension for providing an object representation of configuration information for Peep: The Network Auralizer.

SYNOPSIS

  use Net::Peep::Conf;
  my $conf = new Net::Peep::Conf;
  $conf->setBroadcast($class0,$value0);
  $conf->setBroadcast($class1,$value1);
  $conf->getBroadcastList();

DESCRIPTION

Net::Peep::Conf provides an object interface for Peep configuration information, typically extracted from a Peep configuration file (e.g., /etc/peep.conf) by the Net::Peep::Parser module.

EXPORT

None by default.

PUBLIC METHODS

  setApp($appname) - A unique identifier associated with a client
  configuration.  Typically the name of the application using the
  configuration information; e.g., logparser.

  getApp() - Returns the identifier set with setApp.

  getPort() - Returns the port set with setPort.

  setPort($port) - Sets a port number.  Typically the client broadcast
  port.

  getBroadcastList() - Returns a list of all broadcast names
  associated with all classes.

  getBroadcast($class) - Gets the broadcast string for the class
  $class.

  addBroadcast($class,$value) - Adds the broadcast string
  (consisting of IP/domain and port) named $name for the class $class.

  getClassList() - Returns a list of all class names that have
  associated server lists.

  getClass($class) - Returns a list of servers associated with the
  class $class.

  setClass($class,$arrayref) - Associates the class $class with the
  list of servers given in $arrayref.

  getEventList() - Returns a list of all event names.

  getEvent($event) - Returns the event information for the event with
  name $event.

  setEvent($event,$hashref) - Associates the event $event with the
  information contained in $hashref.

  getStateList() - Returns a list of all state names.

  getState($state) - Returns the state information associated with the
  state $state.

  setState($event,$hashref) - Associates the state $state with the
  information contained in $hashref.

  setConfigurationText($client,$text) - Sets the configuration text to
  $text for client $client.  For reference and debugging only.  The
  text is not actually used internally for any purpose.

  getNotificationText($client) - Returns the configuration text for
  client $client.

  setNotificationText($client,$text) - Sets the configuration text to
  $text for client $client.  For reference and debugging only.  The
  text is not actually used internally for any purpose.

  getConfigurationText($client) - Returns the configuration text for
  client $client.

  setClientEvent($name,$arrayref) - Sets the events associated with
  the client $name.

  getClientEvents($name) - Returns the events associated with the client $name.

  getClientEventList() - Returns all events associated with all clients.

  checkClientEvent() - The method name is a question: Based on
  command-line or configuration file settings, should this client
  event be considered active in the current client?  For example,
  should the logparser check the regular expression for this event
  against log files?

  setVersion() - Sets the version number.

  getVersion() - Return the version number taken from the Peep configuration
  file (e.g., peep.conf) if it exists.  Confesses if the version has not been
  set yet.  See also versionExists().

  versionExists() - Returns 1 if a version has been set with the setVersion()
  method, 0 otherwise.

  setSoundPath() - Sets the path to the Peep sound respository
  (typically /usr/local/share/peep/sounds).

  getSoundPath() - Returns the sound path.  Confesses if the sound
  path has not been set yet.  See also soundPathExists().

  soundPathExists() - Returns 1 if the sound path has been set with
  the setSoundPath() method, 0 otherwise.

AUTHOR

Collin Starkweather Copyright (C) 2001

SEE ALSO

perl(1), peepd(1), Net::Peep::BC, Net::Peep::Parser, Net::Peep::Log.

http://peep.sourceforge.net

CHANGE LOG

$Log: Conf.pm,v $ Revision 1.8 2001/09/23 08:53:56 starky The initial checkin of the 0.4.4 release candidate 1 clients. The release includes (but is not limited to): o A new client: pinger o A greatly expanded sysmonitor client o An API for creating custom clients o Extensive documentation on creating custom clients o Improved configuration file format o E-mail notifications Contact Collin at collin.starkweather@colorado with any questions.

Revision 1.7 2001/08/08 20:17:57 starky Check in of code for the 0.4.3 client release. Includes modifications to allow for backwards-compatibility to Perl 5.00503 and a critical bug fix to the 0.4.2 version of Net::Peep::Conf.

Revision 1.6 2001/08/06 04:20:35 starky Fixed bug #447844.

Revision 1.5 2001/07/23 20:17:45 starky Fixed a minor bug in setting groups and exclude flags from the command-line with the logparser.

Revision 1.4 2001/07/23 17:46:29 starky Added versioning to the configuration file as well as the ability to specify groups in addition to / as a replacement for event letters. Also changed the Net::Peep::Parse namespace to Net::Peep::Parser. (I don't know why I ever named an object by a verb!)

Revision 1.3 2001/07/20 03:19:58 starky Some trivial changes. They normally wouldn't be committed at this stage, but the code is being prepped for the 0.4.2 release.

Revision 1.2 2001/05/07 02:39:19 starky A variety of bug fixes and enhancements: o Fixed bug 421729: Now the --output flag should work as expected and the --logfile flag should not produce any unexpected behavior. o Documentation has been updated and improved, though more improvements and additions are pending. o Removed print STDERRs I'd accidentally left in the last commit. o Other miscellaneous and sundry bug fixes in anticipation of a 0.4.2 release.

Revision 1.1 2001/04/23 10:13:19 starky Commit in preparation for release 0.4.1.

o Altered package namespace of Peep clients to Net::Peep at the suggestion of a CPAN administrator. o Changed Peep::Client::Log to Net::Peep::Client::Logparser and Peep::Client::System to Net::Peep::Client::Sysmonitor for clarity. o Made adjustments to documentation. o Fixed miscellaneous bugs.

Revision 1.7 2001/04/17 06:46:21 starky Hopefully the last commit before submission of the Peep client library to the CPAN. Among the changes:

o The clients have been modified somewhat to more elagantly clean up pidfiles in response to sigint and sigterm signals. o Minor changes have been made to the documentation. o The Peep::Client module searches through a host of directories in order to find peep.conf if it is not immediately found in /etc or provided on the command line. o The make test script conf.t was modified to provide output during the testing process. o Changes files and test.pl files were added to prevent specious complaints during the make process.

Revision 1.6 2001/03/31 07:51:35 mgilfix

  Last major commit before the 0.4.0 release. All of the newly rewritten
clients and libraries are now working and are nicely formatted. The server
installation has been changed a bit so now peep.conf is generated from
the template file during a configure - which brings us closer to having
a work-out-of-the-box system.

Revision 1.6 =head1 CHANGE LOG

$Log: Conf.pm,v $ Revision 1.8 2001/09/23 08:53:56 starky The initial checkin of the 0.4.4 release candidate 1 clients. The release includes (but is not limited to): o A new client: pinger o A greatly expanded sysmonitor client o An API for creating custom clients o Extensive documentation on creating custom clients o Improved configuration file format o E-mail notifications Contact Collin at collin.starkweather@colorado with any questions.

Revision 1.7 2001/08/08 20:17:57 starky Check in of code for the 0.4.3 client release. Includes modifications to allow for backwards-compatibility to Perl 5.00503 and a critical bug fix to the 0.4.2 version of Net::Peep::Conf.

Revision 1.6 2001/08/06 04:20:35 starky Fixed bug #447844.

Revision 1.5 2001/07/23 20:17:45 starky Fixed a minor bug in setting groups and exclude flags from the command-line with the logparser.

Revision 1.4 2001/07/23 17:46:29 starky Added versioning to the configuration file as well as the ability to specify groups in addition to / as a replacement for event letters. Also changed the Net::Peep::Parse namespace to Net::Peep::Parser. (I don't know why I ever named an object by a verb!)

Revision 1.3 2001/07/20 03:19:58 starky Some trivial changes. They normally wouldn't be committed at this stage, but the code is being prepped for the 0.4.2 release.

Revision 1.2 2001/05/07 02:39:19 starky A variety of bug fixes and enhancements: o Fixed bug 421729: Now the --output flag should work as expected and the --logfile flag should not produce any unexpected behavior. o Documentation has been updated and improved, though more improvements and additions are pending. o Removed print STDERRs I'd accidentally left in the last commit. o Other miscellaneous and sundry bug fixes in anticipation of a 0.4.2 release.

Revision 1.1 2001/04/23 10:13:19 starky Commit in preparation for release 0.4.1.

o Altered package namespace of Peep clients to Net::Peep at the suggestion of a CPAN administrator. o Changed Peep::Client::Log to Net::Peep::Client::Logparser and Peep::Client::System to Net::Peep::Client::Sysmonitor for clarity. o Made adjustments to documentation. o Fixed miscellaneous bugs.

Revision 1.7 2001/04/17 06:46:21 starky Hopefully the last commit before submission of the Peep client library to the CPAN. Among the changes:

o The clients have been modified somewhat to more elagantly clean up pidfiles in response to sigint and sigterm signals. o Minor changes have been made to the documentation. o The Peep::Client module searches through a host of directories in order to find peep.conf if it is not immediately found in /etc or provided on the command line. o The make test script conf.t was modified to provide output during the testing process. o Changes files and test.pl files were added to prevent specious complaints during the make process.

Revision 1.6 2001/03/31 07:51:35 mgilfix

  Last major commit before the 0.4.0 release. All of the newly rewritten
clients and libraries are now working and are nicely formatted. The server
installation has been changed a bit so now peep.conf is generated from
the template file during a configure - which brings us closer to having
a work-out-of-the-box system.

Revision 1.7 2001/03/31 02:17:00 mgilfix Made the final adjustments to for the 0.4.0 release so everything now works. Lots of changes here: autodiscovery works in every situation now (client up, server starts & vice-versa), clients now shutdown elegantly with a SIGTERM or SIGINT and remove their pidfiles upon exit, broadcast and server definitions in the class definitions is now parsed correctly, the client libraries now parse the events so they can translate from names to internal numbers. There's probably some other changes in there but many were made :) Also reformatted all of the code, so it uses consistent indentation.

Revision 1.5 2001/03/28 02:41:48 starky Created a new client called 'pinger' which pings a set of hosts to check whether they are alive. Made some adjustments to the client modules to accomodate the new client.

Also fixed some trivial pre-0.4.0-launch bugs.

Revision 1.4 2001/03/27 05:49:04 starky Modified the getClientPort method to accept the 'port' option as specified on the command line if no client has been specified in the conf file.

Revision 1.3 2001/03/27 00:44:19 starky Completed work on rearchitecting the Peep client API, modified client code to be consistent with the new API, and added and tested the sysmonitor client, which replaces the uptime client.

This is the last major commit prior to launching the new client code, though the API or architecture may undergo some initial changes following launch in response to comments or suggestions from the user and developer base.

Revision 1.2 2001/03/18 17:17:46 starky Finally got LogParser (now called logparser) running smoothly.

Revision 1.1 2001/03/16 18:31:59 starky Initial commit of some very broken code which will eventually comprise a rearchitecting of the Peep client libraries; most importantly, the Perl modules.

A detailed e-mail regarding this commit will be posted to the Peep develop list (peep-develop@lists.sourceforge.net).

Contact me (Collin Starkweather) at

  collin.starkweather@colorado.edu

or

  collin.starkweather@collinstarkweather.com

with any questions.