I’m sorry if this has been asked elsewhere. I assumed it would be a common question, but have trawled the interwebs, and failed to find anything.
I have a Raspberry Pi with Apache and Nextcloud installed. I created a certificate with LetsEncrypt and, as advised by sslLabs, set Apache to redirect all http requests to https. I am now getting lots of alerts from web_log_1m_redirects and web_log_1m_successful.
My understanding is that Netdata queries http://raspberrypi/server-status every second, gets a 301 redirect, and then queries the https server. So, with no other traffic, ND is creating 120 requests per min, 60 redirects and 60 successful, and thus the 1m_redirects alert triggers because the ratio is over is 20%, and the 1m_successful triggers because the ratio is under 85%.
I assume the health.d/web_log.conf file is trying to account for this issue, since it specifically won’t trigger anything until $1m_requests > 120, but natural variations mean it creeps over that number fairly regularly. Naively, my initial thought was that I could just nudge that number up to 123, but as soon as I attach a client to Nextcloud, I’m over 123 all the time, and I’ve only improved the ratios by a few %.
I’ve spent a bit of time looking into rewriting the conf file so that it subtracts 60 from both numbers before doing its calculations. I think this is a reasonable approach, but I worked out I wasn’t going to have the experience to test it properly, which is unsatisfactory.
I considered trying to get ND to treat 301 as successful, but that’s not ideal.
What I’d like at this point, but what I’m completely failing to find, is a way of getting ND to ignore http, and just use https. Is this possible?
Any help greatly appreciated! Many thanks in advance,