-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added basic geo IP querying using api.geoiplookup.net.
- Added example queries to look at blocked client stats and stats by country Signed-off-by: Ryan Conrad <[email protected]>
- Loading branch information
Ryan Conrad
authored and
Ryan Conrad
committed
Jun 20, 2018
1 parent
63eccf8
commit a5cc203
Showing
4 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
select cs.IPAddress, | ||
cs.LastFailedLogin, | ||
cs.UnblockDate, | ||
cs.FailedLogins, | ||
cs.Blocked, | ||
cs.FirewallRule, | ||
g.Host, | ||
g.ISP, | ||
g.City, | ||
g.CountryName, | ||
g.Latitude, | ||
g.Longitude | ||
from ClientStatus cs | ||
left join GeoIP g | ||
on g.IPAddress = cs.IPAddress | ||
order by cs.LastFailedLogin desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
select g.CountryName, | ||
sum(Blocks), | ||
sum(LoginFailures) | ||
from ClientStatistics c, GeoIP g | ||
where c.IPAddress = g.IPAddress | ||
group by g.CountryName | ||
order by 2 desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters