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 - setup SSH keys: - On the central machine, generate an authentication key using ssh-keygen. Since this is for unattended operation, use a blank passphrase. - Append the newly-created identity.pub file to ~root/.ssh/authorized_keys on the remote machine(s). - Some new SSH v2 implementation accept v2 style keys only. Use the -t option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to ~root/.ssh/authorized_keys2 on the remote machine(s). - You may need to set PermitRootLogin without-password (meaning with keys only) in your sshd_config file on the remote machine(s). - 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 > AND logmachine = "icecast.machine"; where is the UNIX timestamp when you last rotated your logs, and icecast.machine is the machine in question.