=head1 NAME

ASNMTAP::Asnmtap::Applications::Collector is a Perl module that provides a nice object oriented interface for ASNMTAP Collector Applications

=head1 Description

ASNMTAP::Asnmtap::Applications::Collector Subclass of ASNMTAP::Asnmtap::Applications

This version is still the old ASNMTAP Applications v3.000.001 addapted for using with the new ASNMTAP::Asnmtap, ASNMTAP::Asnmtap::Plugins and ASNMTAP::Asnmtap::Plugins::Nagios plugins.

We are working onto an new Object Oriented version for the ASNMTAP Applications

=head1 FILES

=over 4

=item located at /opt/asnmtap/applications/etc

=over 4

=item CollectorCT-*

are the config files used by the program collector.pl

when the Application CGI module and CGI applications are installed, these config files is automatically generated by the program generateConfig.pl

=over 4

=item format

 Format: <minute (0-59)> <hour (0-23)> <day of the month (1-31)> <month of the year (1-12)> <day of the week (0-6 with 0=Sunday)> <interval (1-30 min)> [<catalogID>_]<uniqueKey>#<resultsdir>#<Title nnn>#check_nnn[#noOFFLINE|multiOFFLINE|noTEST]][|[<catalogID>_]<uniqueKey>#<resultsdir>#<Title mmm>#check_mmm[#noOFFLINE|multiOFFLINE|noTEST]]

   <minute (0-59)> 						    : minute to schedule this plugin(s)
   <hour (0-23)>							: hour to schedule this plugin(s)
   <day of the month (1-31)>				: day of the month to schedule this plugin(s)
   <month of the year (1-12)>				: month of the year to schedule this plugin(s)
   <day of the week (0-6 with 0=Sunday)>	: day of the week to schedule this plugin(s)
   <interval (1-30 min)>					: test interval for this plugin(s)
   <catalogID>                              : unique catalogID
   <uniqueKey>								: unique key for this plugin
   <resultsdir>                             : the results subdir to store the data regarding this plugin
   <Title nnn>								: Description for this plugin
   /check_nnn								: plugin name
   [noOFFLINE|multiOFFLINE|noTEST]			: special types for scheduling plugins
											  - noOFFLINE	: when no test scheduled over more then one line, don't write OFFLINE into database
											  - multiOFFLINE: when no test scheduled over more then one line, write OFFLINE into database
											  - noTEST		: when no test scheduled, write noTEST into database

=item example

 more /opt/asnmtap/applications/etc/CollectorCT-test

 # CollectorCT-test - CTP-CENTRAL, generated on 2010/mm/dd 17:58:16, ASNMTAP v3.002.002 or higher
 #
 # <minute (0-59)> <hour (0-23)> <day of the month (1-31)> <month of the year (1-12)> <day of the week (0-6 with 0=Sunday)> <interval (1-30 min)> [<catalogID>_]<uniqueKey>#<resultsdir>#<titel nnn>#check_nnn[#noOFFLINE|multiOFFLINE|noTEST]][|[<catalogID>_]<uniqueKey>#<resultsdir>#<titel mmm>#check_mmm[#noOFFLINE|multiOFFLINE|noTEST]]
 #
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 #
 1-59/4 7-21/2 * * * 2 CID_DUMMY-T1#test-01#DUMMY-T1#check_dummy.pl -r 0 --trendline=0
 #
 1-59/6 7-21/2 * * * 2 CID_DUMMY-T2#test-02#DUMMY-T2#check_dummy.pl -r 1 --trendline=1#noOFFLINE
 3-59/6 7-21/2 * * * 2 CID_DUMMY-T2#test-02#DUMMY-T2#check_dummy.pl -r 2 --trendline=1#noOFFLINE
 3-59/6 8-22/2 * * * 2 CID_DUMMY-T2#test-02#DUMMY-T2#check_dummy.pl -r 3 --trendline=1#noOFFLINE
 1-59/6 8-22/2 * * * 2 CID_DUMMY-T2#test-02#DUMMY-T2#check_dummy.pl -r 0 --trendline=1#noOFFLINE
 #
 1-59/6 8-22/2 * * * 2 CID_DUMMY-T3#test-03#DUMMY-T3#check_dummy.pl -r 1 --trendline=2#multiOFFLINE
 3-59/6 8-22/2 * * * 2 CID_DUMMY-T3#test-03#DUMMY-T3#check_dummy.pl -r 2 --trendline=2#multiOFFLINE
 #
 1-59/4 8-22/2 * * * 2 CID_DUMMY-T4#test-04#DUMMY-T4#check_dummy.pl -r 0 --trendline=3#noTEST
 #
 1-5/2,17-21/2,33-37/2,49-53/2 * * * * 2 CID_DUMMY-T5#test-05#Condenced View test#check_dummy.pl -r 0 --trendline=5#noOFFLINE
 9-13/2,25-29/2,41-45/2,57-59/2 * * * * 2 CID_DUMMY-T5#test-05#Condenced View test#check_dummy.pl -r 0 --trendline=5#noOFFLINE
 7-59/8 * * * * 2 CID_DUMMY-T5#test-05#Condenced View test#check_dummy.pl -r 2 --trendline=5#noOFFLINE
 #
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Einde CollectorCT-test - CTP-CENTRAL

=back

=back

=item located at /opt/asnmtap/applications/master

=over 4

=item ...

...

=back

=item located at /opt/asnmtap/applications/slave

=over 4

=item ...

...

=back

=back

=head1 PROGRAMS

=over 4

=item located at /opt/asnmtap/applications

=over 4

=item collector.pl

this program is the Collector, executes the plugins and generate the charts used through the CGI interface.

the PID files his atime and mtime is updated every timeslot, to make monitoring possible with Nagios, etc.

=over 4

=item PerfParse:

=over 4

=item Methodes:

=over 4

=item 1) Periodic ASNMTAP Log Parse

 $perfParseMethode = 'PALP'

 ... TODO ...

=item 2) ASNMTAP Invokes Perfparse

 $perfParseMethode = 'AIP', default

=item 3) Periodic User Log Parse

 $perfParseMethode = 'PULP'

 cd /opt/asnmtap/applications/sbin
 mv perfparse_crontab.sh-orig perfparse_crontab.sh
 chmod 755 perfparse_crontab.sh

 when 'crontab': 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/asnmtap/applications/sbin/perfparse_crontab.sh > /dev/null

 mv perfparse_crontab_failed.sh-orig perfparse_crontab_failed.sh
 chmod 755 perfparse_crontab_failed.sh

 when 'crontab':  30 23 * * * /opt/asnmtap/applications/sbin/perfparse_crontab_failed.sh > /dev/null


=item 4) Pipe to Perfparse

 $perfParseMethode = 'PTP'

 ... TODO ...

=item 5) Perfparse Daemon Server

 $perfParseMethode = 'PDS'

 ... TODO ...

=back

=back

=back

=item collector-test.pl

test version from the program collector.pl

=back

=item located at /opt/asnmtap/applications/master

=over 4

=item CollectorCT-*.sh

start, stop, reload, restart or get status for an Collector daemon with the correspondending CollectorCT-*.sh shell script

=item asnmtap-collector.sh

shell script to start, stop, reload, restart or get status for all the Collector daemons by the user asnmtap

=item root-collector.sh

shell script to start, stop, reload, restart or get status for all the Collector daemons by the user root

=back

=item located at /opt/asnmtap/applications/slave

=over 4

=item ...

...

=back

=back

=head1 EXPORT

...

=head1 AUTHOR

Alex Peeters [alex.peeters@citap.be]

=head1 SEE ALSO

ASNMTAP::Asnmtap, ASNMTAP::Asnmtap::Applications

=head1 DEPENDENCIES

 ASNMTAP::Asnmtap::Applications
 Carp
 Time::Local

=head1 COPYRIGHT NOTICE

(c) Copyright 2000-2010 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),
          Reachability of Remote Hosts on a network (RH, sysdRH),
          Rotate Logfiles (system activity files) (RL),
          Remote Socket monitoring (RS, sysdRS),
          System Activity monitoring (SA, sysdSA).

'Process System daemons' is based on 'sysdaemon 1.60' written by Trans-Euro I.T Ltd

=head1 LICENSE

This ASNMTAP CPAN library and Plugin templates are free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The other parts of ASNMTAP may be used and modified free of charge by anyone so long as this copyright notice and the comments above remain intact. By using this code you agree to indemnify Alex Peeters from any liability that might arise from it's use.

Selling the code for this program without prior written consent is expressly forbidden. In other words, please ask first before you try and make money off of my program.

Obtain permission before redistributing this software over the Internet or in any other medium. In all cases copyright and header must remain intact.

=cut