ASNMTAP

 view release on metacpan or  search on metacpan

lib/ASNMTAP/Asnmtap.pod  view on Meta::CPAN

Subclass of ASNMTAP::Asnmtap::Applications

=item ASNMTAP::Asnmtap::Plugins

This module that provides a nice object oriented interface for building ASNMTAP (http://asnmtap.citap.be) compatible plugins.

Subclass of ASNMTAP::Asnmtap

=item ASNMTAP::Asnmtap::Plugins::Nagios

This module that provides a nice object oriented interface for building Nagios (http://www.nagios.org) compatible plugins.

Subclass of ASNMTAP::Asnmtap::Plugins

=back

=head2 PACKAGES

=over 4

=item ASNMTAP::Time

Is a Perl module that provides date and time functions used by ASNMTAP and ASNMTAP-based applications and plugins.

=item ASNMTAP::Asnmtap::Plugins::IO

Is a Perl module that provides IO functions used by ASNMTAP-based plugins.

=item ASNMTAP::Asnmtap::Plugins::Mail

Is a Perl module that provides Mail functions used by ASNMTAP-based plugins.

=item ASNMTAP::Asnmtap::Plugins::Modem

Is a Perl module that provides Modem functions used by ASNMTAP-based plugins.

=item ASNMTAP::Asnmtap::Plugins::SOAP

Is a Perl module that provides SOAP functions used by ASNMTAP-based plugins.

=item ASNMTAP::Asnmtap::Plugins::WebTransact

Is an object-oriented class for generating ASNMTAP-based plugins of Web Transactions.

=item ASNMTAP::Asnmtap::Plugins::XML

Is a Perl module that provides XML functions used by ASNMTAP-based plugins.

=back

=head1 OVERVIEW OF CONSTANTS

 $APPLICATION       Application Monitoring
 $BUSINESS          CITAP
 $DEPARTMENT        Development
 $COPYRIGHT         2003-2011
 $SENDEMAILTO       alex.peeters@citap.be
 $TYPEMONITORING    central # central or distributed
 $RUNCMDONDEMAND    localhost # localhost or probe

 $CAPTUREOUTPUT     1 # 1 -> capture_exec($system_action) or 0 -> system ($system_action)

 $PREFIXPATH        /opt/asnmtap-3.001.xxx
 $APPLICATIONPATH   $PREFIXPATH/applications
 $PLUGINPATH        $PREFIXPATH/plugins
 $LOGPATH           $PREFIXPATH/log
 $PIDPATH           $PREFIXPATH/pid

 $CHATCOMMAND       /usr/sbin/chat
 $DIFFCOMMAND       /usr/bin/diff
 $KILLALLCOMMAND    /usr/bin/killall
 $PERLCOMMAND       /usr/bin/perl
 $PPPDCOMMAND       /usr/sbin/pppd
 $ROUTECOMMAND      /sbin/route
 $RSYNCCOMMAND      /usr/bin/rsync
 $SCPCOMMAND        /usr/bin/scp
 $SSHCOMMAND        /usr/bin/ssh

 %ERRORS            'OK'          => '0'
                    'WARNING'     => '1'
                    'CRITICAL'    => '2'
                    'UNKNOWN'     => '3'
                    'DEPENDENT'   => '4'
                    'OFFLINE'     => '5'
                    'NO TEST'     => '6'
                    'NO DATA'     => '7'
                    'IN PROGRESS' => '8'
                    'TRENDLINE'   => '9'

 %STATE             '0' => 'OK'
                    '1' => 'WARNING'
                    '2' => 'CRITICAL'
                    '3' => 'UNKNOWN'
                    '4' => 'DEPENDENT'
                    '5' => 'OFFLINE'
                    '6' => 'NO TEST'
                    '7' => 'NO DATA'
                    '8' => 'IN PROGRESS'
                    '9' => 'TRENDLINE'

 %TYPE              'REPLACE'       => '0'
                    'APPEND'        => '1'
                    'INSERT'        => '2'
                    'COMMA_REPLACE' => '3' # <- reserved !!!
                    'COMMA_APPEND'  => '4'
                    'COMMA_INSERT'  => '5'

=head1 CONFIG

You can change the values for the CONSTANTS by use of an config file 'Asnmtap.cnf'.

The default location for the config file is into the root for ASNMTAP-based applications and plugins '/opt/asnmtap'.

With the environment variable ASNMTAP_PATH you can change the default location for ASNMTAP-based applications and plugins.

=head2 Example Asnmtap.cnf

 # SET ENVIRONMENT VARIABLES - - - - - - - - - - - - - - - - - - - - -
 <ENV>
     PATH               /usr/bin:/bin:/usr/sbin:/sbin
     BASH_ENV
     ENV
 </ENV>

 <SET>
     PERL5LIB			/opt/asnmtap/cpan-shared/lib/perl5
     MANPATH			/opt/asnmtap/cpan-shared/share/man
     LD_LIBRARY_PATH	/opt/asnmtap/ssl/lib
 </SET>

 # Common variables  - - - - - - - - - - - - - - - - - - - - - - - - -
 <COMMON>
     APPLICATION        Application Monitoring
     BUSINESS           CITAP
     DEPARTMENT         Development
     COPYRIGHT          2003-2011
     SENDEMAILTO        alex.peeters@citap.be
     TYPEMONITORING     central
     RUNCMDONDEMAND     probe
 </COMMON>

 <COMMAND>
     CHAT               /usr/sbin/chat
     DIFF               /usr/bin/diff
     KILLALL            /usr/bin/killall
     PPPD               /usr/sbin/pppd
     PERL               /usr/bin/perl
     ROUTE              /sbin/route
     RSYNC              /usr/bin/rsync
     SCP                /usr/bin/scp
     SSH                /usr/bin/ssh
 </COMMAND>

 <IO>
     CAPTUREOUTPUT      1
 </IO>

 # -------------------------------------------------------------------
 # DON'T TOUCH BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!
 # -------------------------------------------------------------------

 <SUBDIR>
     APPLICATIONS       applications
     PLUGINS            plugins
     LOG                log
     PID                pid
     RUN                run
 </SUBDIR>

 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

=head1 ATTRIBUTES

=over 4

=item _programName

required, scalar, the program name, default: 'NOT DEFINED'

=item _programDescription

required, scalar, the program description, default: 'NOT DEFINED'

=item _programVersion

required, scalar, the program version, default: '0.000.000'

=item _programUsagePrefix

optional, scalar, the program usage prefix, default: undef

=item _programHelpPrefix

optional, scalar, the program help prefix, default: undef

=item _programUsageSuffix

scalar, the program predifined usage suffix

 [-v|--verbose <LEVEL>]
 [-V|--version]
 [-h|--help]
 [--usage]
 [--dumpData]

=item _programHelpSuffix

scalar, the program predifined help suffix

 -v, --verbose=<LEVEL>
    0: single line, minimal output.
    1: single line, additional information
    2: multi line, configuration debug output
    3: lots of detail for plugin problem diagnosis
 -V, --version

lib/ASNMTAP/Asnmtap.pod  view on Meta::CPAN


usage: scalar, description

=item Function

Print usage function

=item Return

exit 'UNKNOWN' when usage argument exists for ASNPTAP::Plugins and inherits, otherwise exit 0

=back

=item printHelp()

=over 4

=item Arguments (none)

=item Function

Print help function when command arguments are -h or --help

=item Return

exit 'UNKNOWN' for ASNPTAP::Plugins and inherits, otherwise exit 0

=back

=item call_system()

=over 4

=item Arguments

command, scalar

=item Function

system call for command

=item Return

returns success, stdout and stderr

=back

=back

=head1 EXPORT

=head2 TAGS

=over 4

=item *

ALL

  $APPLICATION $BUSINESS $DEPARTMENT $COPYRIGHT $SENDEMAILTO $TYPEMONITORING $RUNCMDONDEMAND
  $CAPTUREOUTPUT
  $PREFIXPATH $APPLICATIONPATH $PLUGINPATH $LOGPATH $PIDPATH $PERL5LIB $MANPATH $LD_LIBRARY_PATH
  $CHATCOMMAND $DIFFCOMMAND $KILLALLCOMMAND $PERLCOMMAND $PPPDCOMMAND $ROUTECOMMAND $RSYNCCOMMAND $SCPCOMMAND $SSHCOMMAND
  %ERRORS %STATE %TYPE

=item *

ASNMTAP

  $APPLICATION $BUSINESS $DEPARTMENT $COPYRIGHT $SENDEMAILTO $TYPEMONITORING $RUNCMDONDEMAND
  $CAPTUREOUTPUT
  $PREFIXPATH $LOGPATH $PIDPATH $PERL5LIB $MANPATH $LD_LIBRARY_PATH
  %ERRORS %STATE %TYPE

=item *

COMMANDS

  $CHATCOMMAND $DIFFCOMMAND $KILLALLCOMMAND $PERLCOMMAND $PPPDCOMMAND $ROUTECOMMAND $RSYNCCOMMAND $SCPCOMMAND $SSHCOMMAND

=item *

APPLICATIONS

  $APPLICATIONPATH

=item *

PLUGINS

  $PLUGINPATH

=back

=head1 AUTHOR

Alex Peeters [alex.peeters@citap.be]

=head1 SEE ALSO

ASNMTAP::Time

ASNMTAP::Asnmtap::Applications, ASNMTAP::Asnmtap::Applications::CGI, ASNMTAP::Asnmtap::Applications::Collector, ASNMTAP::Asnmtap::Applications::Display

ASNMTAP::Asnmtap::Plugins, ASNMTAP::Asnmtap::Plugins::Nagios

ASNMTAP::Asnmtap::Plugins::IO, ASNMTAP::Asnmtap::Plugins::Mail, ASNMTAP::Asnmtap::Plugins::Modem, ASNMTAP::Asnmtap::Plugins::SOAP, ASNMTAP::Asnmtap::Plugins::WebTransact, ASNMTAP::Asnmtap::Plugins::XML

=head1 DEPENDENCIES

  Carp
  Config::General
  Data::Dumper 
  Dumpvalue
  Getopt::Long
  IO::CaptureOutput
  Test::Pod::Coverage
  Test::Simple
  Time::Local

=head1 COPYRIGHT NOTICE

(c) Copyright 2000-2011 by Alex Peeters [alex.peeters@citap.be],
                        All Rights Reserved.

ASNMTAP is based on 'Process System daemons v1.60.17-01', Alex Peeters [alex.peeters@citap.be]

 Purpose: CronTab (CT, sysdCT),
          Disk Filesystem monitoring (DF, sysdDF),
          Intrusion Detection for FW-1 (ID, sysdID)
          Process System daemons (PS, sysdPS),



( run in 0.460 second using v1.01-cache-2.11-cpan-39bf76dae61 )