ASNMTAP
view release on metacpan or search on metacpan
Version 3.000.005, 2006/02/26
- check_MySQL-database-replication.pl (MySQL database replication)
- Bit::Vector 6.3
- Date::Calc 5.4
- Bundle::DBI
- Bundle::DBD::mysql
- ASNMTAP::Time
- Date::Calc instead of unix data command
- Making ASNMTAP CPAN module perl 5.8.0, 5.8.5 and 5.8.6 compatible
For perl versions before 5.8.5, then you must change into Asnmtap.cnf from 'CAPTUREOUTPUT 1' to 'CAPTUREOUTPUT 0' !!!
- ASNMTAP::Asnmtap::getOptionsType() added
- ASNMTAP CPAN module ASNMTAP::Asnmtap::Plugins::Modem added
All : IO::Handle 1.20
Device::Modem 1.43
Linux or some kind of unix machine:
Device::SerialPort 1.002
Net::Ifconfig::Wrapper 0.05
Windows: Win32::SerialPort 0.19
Win32::API 0.41
Win32::RASE 1.01
Version 3.000.004, 2006/02/12, ASNMTAP CPAN module ASNMTAP::Asnmtap::Plugins::Mail added
lib/ASNMTAP/Asnmtap/Plugins/Modem.pm view on Meta::CPAN
}
if ( $^O eq 'MSWin32' or ( defined $parms{windows} and $parms{windows} ) ) {
eval "use Win32::RASE";
$parms{windows} = 1;
unless ( $parms{port} =~ /^com[1-4]$/ ) {
$$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'Invalid Windows port: '. $parms{port} }, $TYPE{APPEND} );
return ( $ERRORS{UNKNOWN} );
}
} else { # running on Linix
eval "use Net::Ifconfig::Wrapper";
$parms{windows} = 0;
unless ( $parms{port} =~ /^\/dev\/ttyS[0-3]$/ ) {
$$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'Invalid Linux port: '. $parms{port} }, $TYPE{APPEND} );
return ( $ERRORS{UNKNOWN} );
}
}
unless ( $parms{baudrate} =~ /^(?:300|1200|2400|4800|9600|19200|38400|57600|115200)$/ ) {
lib/ASNMTAP/Asnmtap/Plugins/Modem.pod view on Meta::CPAN
optional, when you need to pass parameters to your own custom defined function, this can be done with customArguments.
customArguments: SCALAR, ARRAY, HASH,
REF SCALAR, REF ARRAY, REF HASH
=back
=item windows
optional, scalar value 1 means force to be threated as Windows, 0 if under Linux or some kind of unix machine and undef means that we detect it automatically for you.
=item phonenumber
required, scalar [.0-9]
=item port
port where the modem connects to
if under Linux or some kind of unix machine: /dev/ttyS0, /dev/ttyS1, /dev/ttyS2 or /dev/ttyS3 or windows: com1, com2, com3 or com4
required, scalar, default /dev/ttyS0
=item baudrate
controls the speed of serial communications. However, here you can supply a custom value. Common speed values: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
optional, scalar, default 19200
=item databits
lib/ASNMTAP/Asnmtap/Plugins/Modem.pod view on Meta::CPAN
optional, scalar, default 1
=item timeout
expressed in seconds. After that time, answer returns result also if nothing has been received
optional, scalar, default 30
=item phonebook
when specified, the it means the phonebook name for the Windows RAS connection or if under Linux or some kind of unix machine it means the name for the pppd call connection
optional, scalar, default undef
=item username
the username for the Linux or some kind of unix machine PPP- or Windows RAS connection
optional, scalar, default undef
=item password
the password for the Windows RAS connection
optional, scalar, default undef
=item defaultGateway
if under Linux or some kind of unix machine it means the default gateway
optional, scalar, default undef
=item defaultInterface
if under Linux or some kind of unix machine it means the default network interface
optional, scalar, default undef
=item defaultDelete
if under Linux or some kind of unix machine it means to delete the default gateway
optional, scalar, default 1
=item pppInterface
the name from the ppp interface
optional, scalar, can be ppp0, ppp1, ppp2 or ppp3, default ppp0
=item pppTimeout
lib/ASNMTAP/Asnmtap/Plugins/Modem.pod view on Meta::CPAN
=head1 DEPENDENCIES
=over 4
=item All
IO::Handle
Device::Modem
=item Linux or some kind of unix machine
Device::SerialPort
Net::Ifconfig::Wrapper
=item Windows
Win32::SerialPort
Win32::API
Win32::RASE
lib/ASNMTAP/Asnmtap/Plugins/Nagios.pm view on Meta::CPAN
/irix/i && do { $osType = 'Irix'; last; };
/macos/i && do { $osType = 'MacOS'; last; };
/(?:FreeMiNt|MiNT)/i && do { $osType = 'MiNT'; last; };
/netbsd/i && do { $osType = 'NetBSD'; last; };
/netware/i && do { $osType = 'NetWare'; last; };
/openbsd/i && do { $osType = 'OpenBSD'; last; };
/os2/i && do { $osType = 'OS2'; last; };
/sco/i && do { $osType = 'SCO'; last; };
/solaris/i && do { $osType = 'Solaris'; last; };
/stratus/i && do { $osType = 'Stratus'; last; };
/unix/i && do { $osType = 'Unix'; last; };
/vms/i && do { $osType = 'VMS'; last; };
/mswin32/i && do { $osType = 'Win32'; last; };
}
$_[0]->{_getOptionsValues}->{osType} = $osType;
$_[0]->{_getOptionsValues}->{osVersion} = $osVersion;
my $metric = (exists $_[0]->{_getOptionsArgv}->{metric}) ? $_[0]->{_getOptionsArgv}->{metric} : 'kB';
$_[0]->printUsage ('Invalid metric option: '. $metric) unless ($metric =~ /^k|M|G$/);
$_[0]->{_getOptionsValues}->{metric} = ($metric eq 'M') ? 'MB' : ($metric eq 'G') ? 'GB' : 'kB';
lib/ASNMTAP/Asnmtap/Plugins/Nagios.pod view on Meta::CPAN
Irix
MacOS
MiNT
NetBSD
NetWare
OpenBSD
OS2
SCO
Solaris
Stratus
Unix
VMS
Win32
-m, --metric=<k|M|G>
where k=kB (default), M=MB or G=GB
=item _getOptionsArgs
scalar, the program command line entered options returned values (the equivalent of the assignment)
plugins/snmptt/check_SNMPTT_probe.pl view on Meta::CPAN
} elsif ( $debug ) {
print "\n$id, $eventname, $eventid, $trapoid, $enterprise, $community, $hostname, $agentip, $category, $severity, $uptime, $traptime, $formatline, $system_running_SNMPTT, $trapread\n";
}
unless ( defined $firstTrap ) {
$firstTrap = 1;
my $currentTimeslot = timelocal ( 0, (localtime)[1,2,3,4,5] );
use Date::Manip;
my $epochtime = UnixDate ( ParseDate ( $traptime ), "%s" );
if ($currentTimeslot - $epochtime > $outOffDate) {
my $alert .= ' - Data is out of date!';
$alert .= ' - From: ' .scalar(localtime($epochtime)). ' - Now: ' .scalar(localtime($currentTimeslot)) if ( $debug >= 2 );
$objectPlugins->pluginValues ( { stateValue => $ERRORS{CRITICAL}, alert => $alert }, $TYPE{APPEND} );
} else {
$objectPlugins->pluginValues ( { stateValue => $ERRORS{OK}, alert => 'OK' }, $TYPE{APPEND} );
}
}
plugins/templates/snmptt/snmptt.ini view on Meta::CPAN
#
# SNMPTT v1.2 Configuration File
#
# Linux / Unix
#
[General]
# Name of this system for $H variable. If blank, system name will be the computer's
# hostname via Sys::Hostname.
snmptt_system_name =
# Set to either 'standalone' or 'daemon'
# standalone: snmptt called from snmptrapd.conf
# daemon: snmptrapd.conf calls snmptthandler
( run in 1.010 second using v1.01-cache-2.11-cpan-2398b32b56e )