summaryrefslogtreecommitdiff
path: root/README
blob: 5a4f75e19daf961aaef2c8098d3129e7c98d4a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
icelog

Copyright (c) 2002 Ivan Kohler
All rights reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.

ivan-icelog@420.am

iceaccessd/iceaccess_server is a client/server program for collecting logging
data from multiple, possibly remote icecast servers in a central SQL database.

icecounter.cgi is a CGI to query the SQL database and displaytotal elapsed
minutes (live vs. archived) for a single customer or all customers, total or
broken down by month.

create-Pg.sql and create-mysql.sql contain the SQL to create the
required table.

To use:

  - create the database table as defined in create-Pg.sql or create-mysql.sql
  - copy iceaccessd to /usr/local/bin/iceaccessd on the icecast server(s)
  - chmod a+rx /usr/local/bin/iceaccessd on the icecast server(s)
  - set the parameters in icelog.conf and copy it to /etc/icelog.conf
  - on the central database machine, run:
    	iceaccess_server icecast.machine /path/to/icecast/access.log 0
    for each remote icecast.machine
  - on each icecast.machine, after rotating your icecast access.log, HUP the
    iceaccessd process
  - if the central database machine goes down, you can restart the parsing from
    a particular position in the logfile using the command:
    	iceaccess_server icecast.machine /path/to/icecast/access.log position
    You can ask the database for the position log parsing left off at with
    a query like:
    	SELECT MAX(logpos) FROM icelog
    	  WHERE logdate > <timestamp> AND logmachine = "icecast.machine";
    where <timestamp> is the UNIX timestamp when you last rotated your logs,
    and icecast.machine is the machine in question.