************************************************************************ IP-Accounting Grapher v0.03 Adriaan Peeters ************************************************************************ This phpscript outputs IP-Accounting information collected by Linux IP accounting on a hourly, daily and monthly basis. It can also display a png image of a selected month in mrtg-like style. WARNING: This script makes extensive use of advanced php4 functionality. It may not work on your php installation. Requirements: - PostgreSQL: http://www.postgresql.org/ or - MySQL: http://www.mysql.com/ - Linux ip accounting: http://sourceforge.net/projects/ipac-ng/ and http://www.comlink.apc.org/~moritz/ipac.html - Php4 with xslt support (configure --with-sablot): http://www.php.net/ - Sablotron 0.90 (See Problems below) You should use ipac-ng, it contains support for logging ipac data to PostgreSQL or MySQL. I chose to use this requirement, because the default version stores it's data in textfiles, and fetching data for one IAG page took about 3seconds on a fast cpu. Install: Make sure you have installed all required software, and test them all individually. Then untar the contents of this tarball to a directory in your apache documenttree. Configure: Change the db_* variables at the top of config.php. That's all, when you access the page, you should get a nice output :) Test: To test your setup open the following url in your webbrowser: http://hostname/iag/?host=ipac-hostname You can test the png output image via: http://hostname/iag/gb.php?host=ipac-hostname Additional parameters for gb.php are (this is an example) http://hostname/iag/gb.php?host=ipac-hostname&month=3&year=2003 You can get a list of targets via: http://hostname/iag/?type=list Problems: The current version seems to work with sablotron 0.90, but crashes on 0.95 :( I havn't been able to find a solution for this, if you know one, please let me know. Advice, help: Please feel free to contact me with suggestions, questions regarding this script. Adriaan Peeters Acknowledgements: The basic output design for this script is highly inspired on IOG, a program by James Dogopoulos - http://www.dynw.com/iog/ The code however is completely different :) I used this design because it's clear and easy to use, feel free to make other designs and send them to me, i'll include them in the next release. (Some xslt knowledge is required to make changes :) The code for gb.php is originally developped by Vincent Houwert and Marcel Leicher. Extensive changes were made to the original code which you can find at http://gbgraph.menthenberg.nl/