Monitoring fails on: Apache is functioning normally

Freddy

Verified User
Joined
Apr 14, 2016
Messages
125
We are monitoring our DirectAdmin servers to check if they are up and running. One of the tests is a simple HTTP call to the IP address of the server and check the content of the reply. This is a very simple test because the content should always be "Apache is functioning normally". But there seems to be a catch because some servers answer with "Niginx is functioning normally". Our servers are running on Nginx_apache webserver so I can understand why Nginx is the one to respond. But the strange thing is that this answer sometimes changes over time. Like this morning where 3 of our servers changed the content from "Nginx" to "Apache".

The DirectAdmin system.log file shows me the following:
Code:
2022:06:09-06:25:51: signal HUP received. Reloading config file...
2022:06:09-06:25:51: directadmin reloaded
2022:06:09-06:25:51: Config file reloaded
2022:06:09-06:25:59: signal HUP received. Reloading config file...
2022:06:09-06:25:59: directadmin reloaded
2022:06:09-06:25:59: Config file reloaded
2022:06:09-06:25:59: signal HUP received. Reloading config file...
2022:06:09-06:25:59: directadmin reloaded
2022:06:09-06:25:59: Config file reloaded
2022:06:09-06:26:00: ips.conf rewritten
2022:06:09-06:26:35: nginx reloaded
2022:06:09-06:26:35: php-fpm73 reloaded
2022:06:09-06:26:35: php-fpm81 reloaded
2022:06:09-06:26:36: httpd reloaded

Ok, so the server reloaded its configuration. This probably happened due to an automatic update. But what changed in that configuration?
 
This morning 3 servers changed their reply from "Apache is functioning normally" to "Nginx is functioning normally". I still wonder what causes this change in the reply. It must have something to do with an update in the software or configuration, but I didn't change anything. These changes are caused but the DirectAdmin auto-update and I would really like to know how and why because our monitoring software thinks these servers are down while they are not.
 
disable auto_updates, check forum for news/bugs in new updates and update it manually.
 
disable auto_updates, check forum for news/bugs in new updates and update it manually.
Why would this be bugs if everything works normally. The only thing that seems to change is the webserver that answers the request.
 
I don't tell that this current situation is "bug", I'm about fresh releases with fresh bugs that usually fixed during 1-3 days, that's why I prefer delayed (manual) updates.
answer can be changed when confs rewrited and temporarily service unavailable. why not monitor some fixed page answer?
 
why not monitor some fixed page answer?
I assumed that this was a fixed page answer. :) I mean, why would the answer ever change? In a Nginx_apache configuration it is always the same webserver that should answer your request right? Until it doesn't of course, like now.
 
I mean if you have index.html for example with answer "server 234 works fine" - mo matter who returns it nginx/or apache.
Or correct way - monitor it with nagios/zabbix that checks total webserver health.
 
I mean if you have index.html for example with answer "server 234 works fine" - mo matter who returns it nginx/or apache.
Or correct way - monitor it with nagios/zabbix that checks total webserver health.
I understand what you mean. But I still would like to know why a Nginx_apache setup sometimes changes from Nginx first to Apache first or the other way around. It doesn't seem logical.
 
try set correct webserver by ./build set
and see what it show in "changed from .."
 
strange, check directadmin.conf and options.conf - maybe they have some different setings compared to not affected servers.
 
Meanwhile all my servers have changed from Apache to Nginx to return the default page. This must have something to do with an update that changes something in the Nginx_apache configuration. Not all of my servers update at the same time so that is why not all of them fail at the same time.

I will adapt my monitoring to check for an index.html file like @Zhenyapan suggested but I certainly think there is something wrong here.
 
Back
Top