thinkst / canarytokens

Canarytokens helps track activity and actions on your network.
http://canarytokens.org
Other
1.76k stars 258 forks source link

Modify ipinfo 503 Response handling #595

Closed emmanuel-thinkst closed 1 month ago

emmanuel-thinkst commented 1 month ago

Proposed changes

To get the geo information of an IP address a query is made to the http://ipinfo.io service.

We log an error for any error response from this service. Including a 503 status-code response. This means if the http://ipinfo.io service is unavailable, we can get a flood of errors logged.

If we have alarms set to alert us of any logged errors, a lot of noise gets created when the http://ipinfo.io service is unavailable.

Furthermore if the http://ipinfo.io service is unavailable, there isn't much we can do besides to wait for it to be available.

With these changes, a 503 status-code response from the http://ipinfo.io service is logged as an INFO level log rather than an ERROR level log.

Types of changes

What types of changes does your code introduce to this repository? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.