NAME

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

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

FILES

located at /opt/asnmtap/applications/etc
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

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
example
more /opt/asnmtap/applications/etc/CollectorCT-test

# CollectorCT-test - CTP-CENTRAL, generated on 2010/mm/dd 17:58:16, ASNMTAP v3.002.003 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
located at /opt/asnmtap/applications/master
...

...

located at /opt/asnmtap/applications/slave
...

...

PROGRAMS

located at /opt/asnmtap/applications
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.

PerfParse:
Methodes:
1) Periodic ASNMTAP Log Parse
$perfParseMethode = 'PALP'

... TODO ...
2) ASNMTAP Invokes Perfparse
$perfParseMethode = 'AIP', default
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
4) Pipe to Perfparse
$perfParseMethode = 'PTP'

... TODO ...
5) Perfparse Daemon Server
$perfParseMethode = 'PDS'

... TODO ...
collector-test.pl

test version from the program collector.pl

located at /opt/asnmtap/applications/master
CollectorCT-*.sh

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

asnmtap-collector.sh

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

root-collector.sh

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

located at /opt/asnmtap/applications/slave
...

...

EXPORT

...

AUTHOR

Alex Peeters [alex.peeters@citap.be]

SEE ALSO

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

DEPENDENCIES

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

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),
         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

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.