doc
[icelog.git] / README
1 icelog
2
3 Copyright (c) 2002 Ivan Kohler
4 All rights reserved.
5 This program is free software; you can redistribute it and/or modify it under
6 the same terms as Perl itself.
7
8 ivan-icelog@420.am
9
10 iceaccessd/iceaccess_server is a client/server program for collecting logging
11 data from multiple, possibly remote icecast servers in a central SQL database.
12
13 icecounter.cgi is a CGI to query the SQL database and displaytotal elapsed
14 minutes (live vs. archived) for a single customer or all customers, total or
15 broken down by month.
16
17 create-Pg.sql and create-mysql.sql contain the SQL to create the
18 required table.
19
20 To use:
21
22   - create the database table as defined in create-Pg.sql or create-mysql.sql
23   - copy iceaccessd to /usr/local/bin/iceaccessd on the icecast server(s)
24   - chmod a+rx /usr/local/bin/iceaccessd on the icecast server(s)
25   - set the parameters in icelog.conf and copy it to /etc/icelog.conf
26   - setup SSH keys:
27     - On the central machine, generate an authentication key using ssh-keygen.
28       Since this is for unattended operation, use a blank passphrase. 
29     - Append the newly-created identity.pub file to ~root/.ssh/authorized_keys
30       on the remote machine(s). 
31     - Some new SSH v2 implementation accept v2 style keys only. Use the -t
32       option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to
33       ~root/.ssh/authorized_keys2 on the remote machine(s). 
34     - You may need to set PermitRootLogin without-password (meaning with keys
35       only) in your sshd_config file on the remote machine(s).
36   - on the central database machine, run:
37         iceaccess_server icecast.machine /path/to/icecast/access.log 0
38     for each remote icecast.machine
39   - on each icecast.machine, after rotating your icecast access.log, HUP the
40     iceaccessd process
41   - if the central database machine goes down, you can restart the parsing from
42     a particular position in the logfile using the command:
43         iceaccess_server icecast.machine /path/to/icecast/access.log position
44     You can ask the database for the position log parsing left off at with
45     a query like:
46         SELECT MAX(logpos) FROM icelog
47           WHERE logdate > <timestamp> AND logmachine = "icecast.machine";
48     where <timestamp> is the UNIX timestamp when you last rotated your logs,
49     and icecast.machine is the machine in question.
50