NAME App::MonM - Simple monitoring tool VERSION Version 1.09 SYNOPSIS # monm checkit # monm report # monm show DESCRIPTION Simple monitoring tool FEATURES Checking availability of sites (http/https) Checking of database health (DBI) Checking internal and external counters using system commands and tools (command) Supports SMTP, POP3, FTP, SSH protocols, and etc. Interface for SMS sending Easy installation and configuration A small number of system dependencies SYSTEM REQUIREMENTS Perl v5.16+ libwww <https://github.com/libwww-perl/libwww-perl> libnet <https://metacpan.org/dist/libnet> Email::MIME <https://github.com/rjbs/Email-MIME> Net-SNMP <https://net-snmp.sourceforge.io/> 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. Net-SNMP can be found at https://net-snmp.sourceforge.io/ INSTALLATION # sudo cpan install App::MonM ...and then: # sudo monm configure CONFIGURATION By default configuration file located in /etc/monm directory 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 GENERAL DIRECTIVES DaemonUser, DaemonGroup DaemonUser monmu DaemonGroup monmu Defines a username and groupname for daemon working Default: monmu Expires 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 3m -- 3 minutes ago(!) Default: 1d (1 day) Interval Interval 20 Defines worker interval. This interval determines how often the cycle of checks will be started. Default: 20 LogEnable LogEnable on Activate or deactivate the logging: on/off (yes/no) Default: off LogFile LogFile /var/log/monm.log Defines path to custom log file Default: use syslog LogIdent LogIdent myProgramName Defines LogIdent string. We not recommended use it Default: none LogLevel LogLevel warning Defines log level Allowed levels: debug, info, notice, warning, error, crit, alert, emerg, fatal, except Default: debug Workers Workers 3 Defines workers number Default: 3 USER AND GROUP DIRECTIVES Group 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) User 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 CHANNEL DIRECTIVES See "CONFIGURATION DIRECTIVES" in App::MonM::Channel CHECKIT DIRECTIVES See "CONFIGURATION DIRECTIVES" in App::MonM::Checkit CRONTAB 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 INTERNAL METHODS again The CTK method for classes extension. For internal use only! See "again" in CTK notifier my $notifier = $app->notifier; Returns the Notifier object notify $app->notify(); Sends notifications raise return $app->raise("Red message"); Sends message to STDERR and returns 0 store my $store = $app->store(); Returns store object trigger my @errors = $app->trigger(); Runs triggers HISTORY See Changes file TO DO See TODO file SEE ALSO CTK, Email::MIME AUTHOR Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org> COPYRIGHT Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved LICENSE 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/