monitor upstream IP addr changes without using nginx's resolver

itpp2012 nginx-forum at
Fri Jan 16 19:59:35 UTC 2015

kunalvjti Wrote:
> Sorry am new to Lua but can you plz explain how this upstream status &
> control will help with this issue. How can i query for the upstream ip

Use the ngxlua --add option
( or openresty, then add
replace the .c file from my archive and compile.

In the same archive you will find an example full working nginx config file
and 2 lua files giving you upstream access via a GUI or via Curl.

> after every certain time interval and reconfigure nginx if there's a
> change detected ? 

This can be done in Lua or you can let an external monitoring tool trigger a
script firing a curl command.

> This should be OS & implementation independent. How to make this work
> everywhere ? 

What I've made so far works for any OS.

Posted at Nginx Forum:,255961,256150#msg-256150

More information about the nginx mailing list