@@ -75,7 +75,7 @@ log_recent_bot_traffic() {
7575 BUCKET=" $1 "
7676
7777 # Get top bot user agent counts in the last minute
78- BOT_TRAFFIC_COUNTS=$( obfi_previous_minute | obfi_top_bots)
78+ BOT_TRAFFIC_COUNTS=$( obfi_in_docker obfi_previous_minute | obfi_top_bots)
7979
8080 # Output like this:
8181 # 1412516 bingbot
@@ -101,9 +101,9 @@ log_recent_bot_traffic() {
101101
102102 # Also log other bots as a single metric
103103 OTHER_BOTS_COUNT=$(
104- obfi_previous_minute | \
104+ obfi_in_docker obfi_previous_minute | \
105105 grep -iE ' \b[a-z_-]+(bot|spider|crawler)' | \
106- grep -viE ' bingbot|claudebot|googlebot|applebot|gptbot|yandex.com/bots|ahrefsbot|amazonbot|petalbot|brightbot|SemanticScholarBot|uptimerobot|seznamebot|OAI-SearchBot|VsuSearchSpider ' | \
106+ obfi_top_bots -v | \
107107 wc -l
108108 )
109109
@@ -113,7 +113,7 @@ log_recent_bot_traffic() {
113113
114114 # And finally, also log non bot traffic
115115 NON_BOT_TRAFFIC_COUNT=$(
116- obfi_previous_minute | \
116+ obfi_in_docker obfi_previous_minute | \
117117 grep -viE ' \b[a-z_-]+(bot|spider|crawler)' | \
118118 wc -l
119119 )
@@ -128,7 +128,7 @@ log_recent_http_statuses() {
128128 BUCKET=" $1 "
129129
130130 # Get top http counts from previous minute
131- HTTP_STATUS_COUNTS=$( obfi_previous_minute | obfi_top_http_statuses)
131+ HTTP_STATUS_COUNTS=$( obfi_in_docker obfi_previous_minute | obfi_top_http_statuses)
132132 # Output like this:
133133 # 60319 " 200
134134 # 55926 " 302
@@ -157,7 +157,7 @@ log_top_ip_counts() {
157157
158158 # Get top IP counts in the last minute
159159 TOP_IP_COUNTS=$(
160- obfi_previous_minute | \
160+ obfi_in_docker obfi_previous_minute | \
161161 obfi_top_ips 25 | \
162162 awk ' {print $1}'
163163 )
0 commit comments