App::MonM - Simple monitoring tool
Version 1.09
# monm checkit # monm report # monm show
Simple monitoring tool
To use this module in full powerful, you must have Net-SNMP installed on your system. More specifically you need the Perl modules that come with it.
DO NOT INSTALL SNMP or Net::SNMP from CPAN!
The SNMP module is matched to an install of net-snmp, and must be installed from the net-snmp source tree.
The Perl module SNMP is found inside the net-snmp distribution. Go to the perl/ directory of the distribution to install it, or run ./configure --with-perl-modules from the top directory of the net-snmp distribution.
SNMP
./configure --with-perl-modules
Net-SNMP can be found at https://net-snmp.sourceforge.io/
# sudo cpan install App::MonM
...and then:
# sudo monm configure
By default configuration file located in /etc/monm directory
/etc/monm
NOTE: each configuration option (directive) detailed describes in monm.conf file, see also conf.d/checkit-foo.conf.sample file for example of MonM checkit configuration
monm.conf
conf.d/checkit-foo.conf.sample
DaemonUser monmu DaemonGroup monmu
Defines a username and groupname for daemon working
Default: monmu
Expires 1d
Defines the lifetime of a record in the database. After this time, the record from the database will be deleted automatically.
Format for time can be in any of the following forms:
20 -- in 20 seconds 180s -- in 180 seconds 2m -- in 2 minutes 12h -- in 12 hours 1d -- in 1 day 3M -- in 3 months 2y -- in 2 years
Default: 1d (1 day)
Interval 20
Defines worker interval. This interval determines how often the cycle of checks will be started.
Default: 20
LogEnable on
Activate or deactivate the logging: on/off (yes/no)
Default: off
LogFile /var/log/monm.log
Defines path to custom log file
Default: use syslog
LogIdent myProgramName
Defines LogIdent string. We not recommended use it
Default: none
LogLevel warning
Defines log level
Allowed levels: debug, info, notice, warning, error, crit, alert, emerg, fatal, except
Default: debug
Workers 3
Defines workers number
Default: 3
The "Group" section combines several users into named groups. This allows you to reduce the lists of recipients of notifications
<Group Foo> Enable on User Bob, Alice User Ted </Group>
Each group has a status - enabled/disabled (see Enable directive)
The User section allows you to define the user name and settings.
<User Bob> Enable on At Sun[off];Mon-Thu[08:30-12:30,13:30-18:00];Fri[10:00-20:30];Sat[off] <Channel SendMail> To bob@example.com </Channel> <Channel SMSGW> To +1-424-254-5301 At Mon-Fri[08:30-18:30] </Channel> </User>
Each user has a status - enabled/disabled (see Enable directive). User settings are disabled by default. User settings contains channel sections, the settings of which are taken either from globally defined channel sections or from those defines within the scope of this user only
See "CONFIGURATION DIRECTIVES" in App::MonM::Channel
See "CONFIGURATION DIRECTIVES" in App::MonM::Checkit
To automatically launch the program, you can using standard scheduling tools, such as crontab
* * * * * monm checkit >/dev/null 2>>/var/log/monm-error.log
For daily reporting:
0 8 * * * monm report >/dev/null 2>>/var/log/monm-error.log
The CTK method for classes extension. For internal use only!
See "again" in CTK
my $notifier = $app->notifier;
Returns the Notifier object
$app->notify();
Sends notifications
return $app->raise("Red message");
Sends message to STDERR and returns 0
my $store = $app->store();
Returns store object
my @errors = $app->trigger();
Runs triggers
See Changes file
Changes
See TODO file
TODO
CTK, Email::MIME
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE file and https://dev.perl.org/licenses/
LICENSE
To install App::MonM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MonM
CPAN shell
perl -MCPAN -e shell install App::MonM
For more information on module installation, please visit the detailed CPAN module installation guide.