I am currently operating OPS3.3.0.8 (PHP7.4).
Is it possible to exclude specific IP addresses from the aggregation logic of OPS preprint statistics plugin?
On our site, we would like to exclude IPs for operation monitoring, staff confirmation IPs, robot access IPs, etc.
Please let me know if you have any tips or advice.
The usage stats plugin already filters robots. The list is in the OPS folder lib/pkp/lib/counterBots/ i.e. for the OPS stable branch it is this list here GitHub - atmire/COUNTER-Robots at 7134f6dbc157ecbf44c8f6829f13b4f873fdd805.
For excluding other IP addresses from logging or aggregation there is unfortunately no ‘easy’ way at the moment - you would need to change the code If you would like to do that you could either 1) not log those events or 2) not consider them for the aggregation.
1)
This is the option to chose if you hash the IPs.
You would need something like:
Thank you for your advice.
I understand that we have to touch inside the source code.
Changing the source code is a little risky, so we’ll wait for the next package.
We currently exclude specific IPs in a different way. It’s a way to exclude specific IPs from the stats log file in our shell script before running the task of OPS stats.
As a result, we are currently able to exclude IPs without any problems, so we would like to operate with this method for the time being.
Thank you for your continued support.
The IPs in the usage_events log of OPS are not currently hashed, so they can be filtered out without any problems.
In order to execute statistical processing more reliably, you should disable the Acron plugin and schedule statistical tasks with crontab, including pre-processing and post-processing.