This function should be called by an Nginx module during it's initialization to
tell the monitoring module that this variable should be added to the pool for
That's all. The module just continue to do what it wants with its ngx_atomic_t
value, I will do the rest.
I may have some issue because my module has three states: initializing,
registering, running so may be the order of modules may be problematic.
When actually happens the running phase?
At the end of the HTTP request? At regular intervals?
Note that since you don't know when a variable will be updated, you may
miss important changes in the variable.
As an example, in the upstream module if a peer is down, the variable
peer.down will be set to 1, but if *all* the peers are down, then all
the variables are set to 0, for a fast restart in the successive request.
A script should have read access to where nginx.pid is and will do the following