Skip to content
Snippets Groups Projects
Commit 474f5e1f authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

obsah README.wardenWatchdog presunut do README

parent f39b904a
No related branches found
No related tags found
No related merge requests found
+----------------------------+
| README - Warden Watchdog |
+----------------------------+
Content
A. Overall Information
B. Dependencies
C. Configuration file
D. Application run
--------------------------------------------------------------------------------
A. Overall Information
Warden Watchdog is a simple script for check of an Warden server DB. You can
create various SQL queries (checks) for an example for events from wrong IPs,
for events with incomplete description or for long quiet reporting clients.
Then you can run watchdog by hand or a repeatedly via Cron.
If one or more events are found by a check, than predefined information
email is sent to a person, who is responsible for a client. You can also set
a different recipient of a notification email for each check with a setting
'contact' field in a configuration file.
--------------------------------------------------------------------------------
B. Installation Dependencies
1. Applications:
Perl >= 5.10.1
MySQL >= 5.1.63
Apache >= 2.2.14
2. Perl modules:
DBI >= 1.612
DBD::mysql >= 4.016
DateTime >= 0.61
Getopt::Long >= 1.06
Email::Simple >= 2.100
Sys::Hostname >= 1.11
FindBin >= 1.50
--------------------------------------------------------------------------------
C. Configuration file
Each configuration file for a Warden Watchdog has four important groups of
settings. First group is clear and contains parameters such as path to Warden
server configuration file, notification email subject and a email server
configuration. Second group called SQL preconditions is an array containing
SQL queries which can be executed before Warden DB check. Last, fourth, group
called SQL postconditions is also an array which can contains SQL queries
useful for a Warden DB clean up after a DB check.
The second group in a configuration file is a different. It is an array of
hashes with a following structure and each one performs one check. In a
query is possible to use a '\$date' variable, which will be expanded by a
Watchdog on a today's date.
@sql_queries = (
{
query => '<SQL query (check) on Warden DB>';
text => 'Text of notification email for this DB check';
contact => '<email address>' # override contact from 'requestor' column
}
)
--------------------------------------------------------------------------------
D. Application run
You will need just a prepared configuration file and a count of days back
from now to the past. Warden database check from config will be then run in
this defined time interval.
USAGE:
./wardenWatchdog.pl -c /path/WardenWatchdog.conf -i 7
CRON USAGE:
33 00 * * * /full/path/watchdog/wardenWatchdog.pl -c /path/WardenWatchdog.conf -i 7 >> err.txt
--------------------------------------------------------------------------------
Copyright (C) 2011-2013 Cesnet z.s.p.o
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment