Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nugget/apache-pgsql-log
Helper tools for piped logging from Apache HTTP Server to a PostgreSQL database
https://github.com/nugget/apache-pgsql-log
Last synced: 3 days ago
JSON representation
Helper tools for piped logging from Apache HTTP Server to a PostgreSQL database
- Host: GitHub
- URL: https://github.com/nugget/apache-pgsql-log
- Owner: nugget
- License: other
- Created: 2011-02-17T15:46:13.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-05-20T16:57:15.000Z (over 13 years ago)
- Last Synced: 2024-05-01T21:59:05.098Z (9 months ago)
- Language: Tcl
- Homepage:
- Size: 102 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Apache Pgsql Log
================This is a facility and related toolbox which is used as a piped log so that your Apache HTTP Server
can log its activity into a PostgreSQL database alongside traditional file logging, or as a total
replacement.Logging to a database has several significant advantages over file-based logging, such as:
* No ambiguity when later processing the logs, no need to parse the data
* Truly typed data (e.g. "inet" field types for logged IP addresses)
* Simpler to collate logs from multiple servers into a single log repositoryRequirements
------------* [PosgreSQL](http://www.postgresql.org/)
* Tcl 8.5 or newer
* Tclx
* [tcllauncher](https://github.com/flightaware/tcllauncher)
* [Tcl Syslog](http://sourceforge.net/projects/tcl-syslog/)Installation
------------1. Create a PostgreSQL database somewhere.
2. Run the `./db/schema.sql` file in the database to create the tables and roles.
3. Copy the included config.tcl.sample to config.tcl and edit to suit your environment.
4. Install the app `sudo make install`Configuration
-------------If you want every vhost to be logged to the same database, you only need a single instance of
apache-pg-sql for the server. If you want to log each vhost differently, you'll need to add a
CustomLog entry for those vhosts independently.For a single log, comment out every CustomLog configuration entry in your Apache config. This
includes the base httpd.conf and any vhost include files that may exist.Place the contents of the `sample.conf` file into your main Apache configuration file.
Restart Apache
Now What?
---------Apache Pgsql Log also provides a workalike to `tail -f` which allows you to watch the logs in real
time on stdout of a terminal window. Simply run:`apache_pg_log tail`