Welcome! Log In Create A New Profile

Advanced

Querying backend/upstream server status

Srebrenko Šehić
July 13, 2010 06:42PM
Hi list,

I've been looking at developing a module that can provide current
backend/upstream server status in a reverse proxy setup.
Is there a way to query all the workers on the current upstreams
status? I just need to know if they are "up" or "down".

The idea is to be able to do something like this:

worker_processes 2;

http {

upstream backend_1 {
server 192.168.0.10:80;
server 192.168.0.11:80;
}

server {
server_name 127.0.0.1;

location /monitor {
upstream_status on;
}
}
}

Then do a curl http://127.0.0.1/monitor and get something like this back:

backend_1;worker_1;192.168.0.10:80;up;
backend_1;worker_2;192.168.0.10:80;up;
backend_1;worker_1;192.168.0.11:80;down;
backend_1;worker_2;192.168.0.11:80;down;

Any hints?

I assume this kind of information must be present somewhere in each
worker, but I just can't seem to figure out how to get to that data.

Thanks,
Srebrenko

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Querying backend/upstream server status

Srebrenko Šehić 4142 July 13, 2010 06:42PM

Re: Querying backend/upstream server status

Weibin Yao 1108 July 13, 2010 10:16PM

Re: Querying backend/upstream server status

Srebrenko Šehić 1161 July 14, 2010 07:02AM

Re: Querying backend/upstream server status

duhoobo 964 July 14, 2010 10:50AM

Re: Querying backend/upstream server status

duhoobo 1277 July 14, 2010 11:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 73
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready