Can't enable Security Threat Tool

I’ve just built a PMM2 monitor using the docker image. I’ve set 4392h (183 days) of retention using the -e DATA_RETENTION variable in the docker run, but when I attempt to enable the security threat tool I get the error: Data retention for queries is set via DATA_RETENTION environment variable.

I’m not changing the data retention value in that form.

Any ideas how to ignore the error, or otherwise enable the STT?

Hmmm…I wonder if there’s a collision between doing it via env var vs the UI. I’m going to spin up a lab box real quick and see if I can reproduce it…

Just curious, did the UI pick up the same value in days that you set via env? Are you able to flip the toggle for STT on and get the error on save or not even flip the toggle?

1 Like

Yep, looks like a bug where setting data retention on CLI is interfering. Would you mind reporting this via against the PMM project (I can too but you won’t be notified when it’s fixed if I do).

I can confirm it works as expected if you drop your existing container and set the retention value through the UI so that could work as a workaround for now to get Security Threat Tool enabled.

1 Like

I could flip the toggle but applying/saving generated the error.
I had the retention period set in hours in the env which accurately reflected the number of days shown in the UI.

I’ll raise a bug report.

1 Like

I saw the exact same behavior in my test so will be easy to reproduce in QA and hopefully resolve in the next release. Appreciate you letting us know AND filling out a bug report!