NAME
ASNMTAP::Asnmtap::Applications::Display is a Perl module that provides a nice object oriented interface for ASNMTAP Display Applications
Description
ASNMTAP::Asnmtap::Applications::Display 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/custom
-
- display.pm
-
Here we can add customised expressions to manipulate the output of the display regarding the content of the $statusMessage where the extra error information is added to $errorMessage
sub printStatusMessageCustom { my $statusMessage = shift(@_); my $break = ''; my $errorMessage = ''; if ($statusMessage =~ /<NIHIL>/ ) { $errorMessage = 'possible a problem with this execution for this plugin'; # *************************************************************************** # Error codes indicate an error with DUMMY-Tn * # *************************************************************************** } elsif ($statusMessage =~ /Check Dummy:/ ) { if ($statusMessage =~ /\+DUMMY-T1\+/ ) { $errorMessage = 'testing: <normal crontab>'; } if ($statusMessage =~ /\+DUMMY-T2\+/ ) { $errorMessage = 'testing: noOFFLINE'; } if ($statusMessage =~ /\+DUMMY-T3\+/ ) { $errorMessage = 'testing: multiOFFLINE'; } if ($statusMessage =~ /\+DUMMY-T4\+/ ) { $errorMessage = 'testing: noTEST'; } # --------------------------------------------------------------------------- # Start custom code --------------------------------------------------------- # --------------------------------------------------------------------------- # } elsif ($statusMessage =~ /<string to find>/ ) { # if ($statusMessage =~ /\+<substring to find>\+/ ) { $errorMessage = '<erormessage to return>'; } # --------------------------------------------------------------------------- # End custom code ----------------------------------------------------------- # --------------------------------------------------------------------------- } return $errorMessage; }
- located at /opt/asnmtap/applications/etc
-
- DisplayCT-*
-
are the config files used by the program display.pl
when the Application CGI module and CGI applications are installed, these config files is automatically generated by the program generateConfig.pl
- format
-
Format: <Interval>#<Groep Title>#<resultsdir>#[<catalogID>_]<uniqueKey>#<Title nnn>#check_nnn#<help 0|1>[|[<catalogID>_]<uniqueKey>#<Title mmm>#check_mmm#<help 0|1>] <Interval> : <Groep Title> : <resultsdir> : result subdir where the data from the collector is located <catalogID> : unique catalogID <uniqueKey> : unique key for this plugin <Title nnn> : check_nnn : plugin name <help 0|1> :
- example
-
more /opt/asnmtap/applications/etc/DisplayCT-test # DisplayCT-test - CTP-CENTRAL, generated on 2010/mm/dd 17:58:16, ASNMTAP v3.002.003 or higher # # <interval>#<groep title>#<resultsdir>#[<catalogID>_]<uniqueKey>#<titel nnn>#check_nnn#<help 0|1>[|[<catalogID>_]<uniqueKey>#<titel mmm>#check_mmm#<help 0|1>] # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 10#CACTUS: Based onto Template cactus#index#CITAP-04#CACTUS plugin cactus.citap.com#cactus-citap-com.pl --trendline=5#0 # 2#Condenced View Test#test-05#CID_DUMMY-T5#Condenced View test#check_dummy.pl --trendline=5#1 # 2#Testing Collector & Display for the 'Application Monitor'#test-01#CID_DUMMY-T1#DUMMY-T1#check_dummy.pl --trendline=0#1 2#Testing Collector & Display for the 'Application Monitor'#test-02#CID_DUMMY-T2#DUMMY-T2#check_dummy.pl --trendline=1#1 2#Testing Collector & Display for the 'Application Monitor'#test-03#CID_DUMMY-T3#DUMMY-T3#check_dummy.pl --trendline=2#1 2#Testing Collector & Display for the 'Application Monitor'#test-04#CID_DUMMY-T4#DUMMY-T4#check_dummy.pl --trendline=3#1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Einde DisplayCT-test - CTP-CENTRAL
- located at /opt/asnmtap/applications/master
-
- DisplayCT-*.sh
-
start, stop, reload, restart or get status for an Display daemon with the correspondending DisplayCT-*.sh shell script
- asnmtap-display.sh
-
shell script to start, stop, reload, restart or get status for all the Display daemons by the user asnmtap
- root-display.sh
-
shell script to start, stop, reload, restart or get status for all the Display daemons by the user root
- located at /opt/asnmtap/applications/slave
PROGRAMS
- located at /opt/asnmtap/applications
- located at /opt/asnmtap/applications/master
- 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.