CENTRAL_LOGSERVER edited online with Bitbucket

This commit is contained in:
Justin Hammond 2019-04-18 06:48:32 +08:00
parent 439e90e0e7
commit ae9c7ce995

View file

@ -1,33 +1,34 @@
Centralised logserver scripts Centralised logserver scripts
Johan Allard, CSC Australia 2004-08-27, jallard2@csc.com.au Justin Hammond, CSC Singapore 2004-08-27, jhammond24@csc.com
Johan Allard, CSC Australia 2004-08-27, jallard2@csc.com.au
About
===== About
These scripts tie logwatch together with PostgreSQL to generate summary =====
information that will be stored in the database from syslog data stored in These scripts tie logwatch together with PostgreSQL to generate summary
the database. information that will be stored in the database from syslog data stored in
the database.
Running the script
================== Running the script
To run the script type /etc/log.d/bin/parselog.sh systemname datespec ==================
systemname: the name of the system to parse logdata from, ex: clf To run the script type /etc/log.d/bin/parselog.sh systemname datespec
datespec: the datespec is a dateformat that PostgreSQL understands, or you systemname: the name of the system to parse logdata from, ex: clf
can use the keywords today, yesterday or all. If omitted, all is used. datespec: the datespec is a dateformat that PostgreSQL understands, or you
can use the keywords today, yesterday or all. If omitted, all is used.
How the script works
==================== How the script works
The script will take the syslog data from the database (for the specified ====================
host and for the specified datespec) and put it in The script will take the syslog data from the database (for the specified
/var/tmp/var/log. The logwatch script is then run and the output is then host and for the specified datespec) and put it in
stored in the database in the syslog_tsummary table. The output in /var/tmp/var/log. The logwatch script is then run and the output is then
/var/tmp/var/log is then deleted. stored in the database in the syslog_tsummary table. The output in
/var/tmp/var/log is then deleted.
Adding a new host type
====================== Adding a new host type
The only specified host type, as of this writing, is linux. To add, say ======================
solaris, add a row in the syslog_tpremadetype for "Solaris Host" with the The only specified host type, as of this writing, is linux. To add, say
logwatch_cmd set to solaris. Then copy the contents from solaris, add a row in the syslog_tpremadetype for "Solaris Host" with the
/etc/log.d/configs/linux to /etc/log.d/configs/solaris and edit the contents logwatch_cmd set to solaris. Then copy the contents from
of the directories below /etc/log.d/configs/solaris to match what you want /etc/log.d/configs/linux to /etc/log.d/configs/solaris and edit the contents
to look for in the solaris logfiles. of the directories below /etc/log.d/configs/solaris to match what you want
to look for in the solaris logfiles.