rb:tophitsonwebsite
                Differences
This shows you the differences between two versions of the page.
| rb:tophitsonwebsite [18/02/2020 10:37] – created - external edit 127.0.0.1 | rb:tophitsonwebsite [30/07/2025 09:54] (current) – andrew | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Check for top ipaddresses hitting | + | ===== Check for top ipaddresses hitting | 
| + | |||
| + | Nagios check for too many requests from one ip address. | ||
| + | This may give a false positive if users are behind a proxy server with one internet facing ipaddress for many users. | ||
| + | Note the excluded list of ipaddresses. This should probably not be embedded in the code. v2 will sort this. Sometime.... | ||
| <code bash> | <code bash> | ||
| #!/bin/bash | #!/bin/bash | ||
| - | # | + | # | 
| - | #Check for excessive hits on Expose | + | #Check for excessive hits on website | 
| STATE_OK=0 | STATE_OK=0 | ||
| Line 22: | Line 27: | ||
| - | HITS=`echo ${IPADDRESS}|awk '{ print $1 }'` | + | HITS=$(echo ${IPADDRESS}|awk '{ print $1 }') | 
| - | SOURCE=`echo ${IPADDRESS}|awk '{ print $2 }'` | + | SOURCE=$(echo ${IPADDRESS}|awk '{ print $2 }') | 
| if [[ $HITS -ge 1800 ]] | if [[ $HITS -ge 1800 ]] | ||
| then | then | ||
rb/tophitsonwebsite.1582022251.txt.gz · Last modified:  by 127.0.0.1
                
                