diff --git a/README.md b/README.md index d465f9a..65ec49f 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,12 @@ It will automatically parse the time from the log file so you don't have to worr 2. Set a cron job for the analyzer to run in any interval you like. I recommend once every hour. eg: ```0 * * * * cd /var/www/pictsharestats;php analyze.php``` 3. Rename example.config.inc.php to config.inc.php +## Use InfluxDB for reporting + +With the lates update you can specify an influxDB host so you can send the analyzed data to a remote server. This can be useful if you like neat dashboards or have multiple (caching) proxies in front of your PictShare instance. Configure your InfluxDB host to accept UDP requests on the port you can specify in the config.inc.php file. + +Pro tip: If you start the analyze.php script with the parameter "onlyinflux" like this: ```php analyze.php onlyinflux``` it will only upload the stats to influx and not to the pictshare analyzer dashboard. You can even make a crontab that analyzes your logs every 1 hour (without the onlyinflux option) and also create a crontab that runs every 10 minutes with the onlyinflux option so your influxdb will have newer data than the dashboard. + ## Update ```bash @@ -34,4 +40,6 @@ After each update make sure your config.inc.php has all values defined in exampl ### Q: What if my pictshare instance has multiple reverse proxy gateways? How can I analyze the logs from separate log files The way the anaylzer is designed it doesn't rely on line numbers so you can just make a script that transfers all your log files and combines them into one file. -This file can then be analyzed by the tool and it will still analyze it correctly \ No newline at end of file +This file can then be analyzed by the tool and it will still analyze it correctly + +Alternatively you can use the new [InfluxDB](https://influxdata.com) logging feature where the analyzed log file is sent to an InfluxDB and you can analyze it from there.