Skip to content

unifi_console: add @smart_retry decoration to status() method to avoid 401 errors#2566

Merged
abruneau merged 1 commit into
DataDog:masterfrom
aadlung:master
Dec 16, 2024
Merged

unifi_console: add @smart_retry decoration to status() method to avoid 401 errors#2566
abruneau merged 1 commit into
DataDog:masterfrom
aadlung:master

Conversation

@aadlung
Copy link
Copy Markdown
Contributor

@aadlung aadlung commented Dec 13, 2024

What does this PR do?

The Unifi integration uses the API to connect to the auth/login endpoint and then uses the persist_connections feature to store the cookies and send them with further requests.
For some reason, after some time this seems to expire and it leads to 401 errors.

Motivation

I received a custom build from Datadog support which included this fix. I tested it and it looks fine for me to add to the actual unifi_console check.

Review checklist

  • PR has a meaningful title or PR has the no-changelog label attached
  • Feature or bugfix has tests

This fixes the issue #2558

@aadlung aadlung requested a review from abruneau as a code owner December 13, 2024 09:07
@abruneau abruneau added this pull request to the merge queue Dec 16, 2024
Merged via the queue into DataDog:master with commit f5fa691 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants