Recently while looking through my site’s traffic report from the past few months I noticed an unusual spike. I use SmarterStats by SmarterTools which is a web based enterprise analytics tool and is free for one domain. After looking through a few other reports I came to realize that the spike I was seeing was caused by my site monitoring tool UptimeRobot. I didn’t want that activity to skew my stats so I decided to remove their IP address from the reports.
Using Logparser to find IP addresses by userAgent
UptimeRobot’s monitoring services use a range of IP addresses so I decided to use Log Parser to double check my logs to see which IPs of theirs where showing up. Here’s the query I used.
logparser -i:iisw3c "SELECT c-ip, count(*) as [count] INTO ip.txt FROM C:\wwwlogs\W3SVC1\*.log where index_of(cs(user-agent),'uptimerobot') >1 GROUP BY c-ip ORDER BY count(*)"
Add a Log Processing Rule
Log Parser quickly identified the IPs I wanted to exclude. Fortunately SmarterStats makes it easy to exclude a variety of data from your reports. After logging into your Stats report click on Settings and then Log Processing Rules.
Click Add from the menu and select Log Processing Rule. The Import Filter window will open and you can configure what you need to exclude or include.
To exclude the UptimeRobot IP addresses I enter the ranges 188.8.131.52 – 184.108.40.206 and 220.127.116.11 – 18.104.22.168. Their service uses a variety of IP addresses depending on where you are in the world. You can read more about that here.
After you have added the metrics that you want to filter from your logs you should clikc the Reprocess button. Depending on how many months or years of data you have in your logs it will take anywhere from a few minutes to a few hours. You will be able to monitor the import process from your report dashboard.
SmarterStats by SmarterTools is a comprehensive web analytics tool. Periodically you may need to exclude data from your stats reports such activity from site monitoring services like UptimeRobot. Thanks for reading!