ASNMTAP

 view release on metacpan or  search on metacpan

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


 $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
    Report version
 -h, --help
    Display the help message
 --usage
    Display the short usage statement
 --dumpData
    Display the stringified data structures from the current object

=item _programGetOptions

array, the program command line option specifier defines the name of the predefined and optionally options

predifined: 'verbose|v:i', 'vervion|V', 'help|h', 'usage', 'dumpData'

=item _getOptionsArgv

scalar, the program command line entered options returned values (the equivalent of the assignment)

=item _getOptionsValues

there are no get options values defined for ASNMTAP::Asnmtap

=item _getOptionsType

there are no get options types defined for ASNMTAP::Asnmtap

=item _debug

set object debuging on or off

scalar, 0 set 'debug off' (default) and 1 set 'debug on'

=back

=head1 METHODS

=head2 Object accessor methods

=over 4

=item programName()

=over 4

=item Arguments (optional)

scalar, program name

=item Function

Set and/or get the program name

=back

=item programDescription()

=over 4

=item Arguments (optional)

scalar, program description

=item Function

Set and/or get the program description

=back

=item programVersion()

=over 4

=item Arguments (optional)

scalar, program version

=item Function

Set and/or get the program version

=back

=item getOptionsArgv()

=over 4

=item  Arguments

item: scalar, get option argv

=item Function



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