Skip to content

Commit

Permalink
updated readme for influx support
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed May 15, 2016
1 parent f67a74e commit cf4557e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Expand Up @@ -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
Expand All @@ -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
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.

0 comments on commit cf4557e

Please sign in to comment.