Feature requestED: monitoring Nginx from the outside

Manlio Perillo manlio_perillo at libero.it
Fri May 2 12:52:39 MSD 2008

François Battail ha scritto:
> Le jeudi 01 mai 2008 à 11:39 +0200, Manlio Perillo a écrit :
>> Each variable will be correct, but since you are writing the value to a 
>> shared memory location not atomically, the variable as read by the 
>> client will not be correct.
> Yes, I'm aware of this, but at this time I don't know which system calls
> to use to be compatible with other OSes, so assume there will be a
> critical section (for example a mutex/spin lock in shared memory) and
> that the script must use it prior reading data.

The problem with this is that the script can arbitrarily block Nginx if 
it holds the lock for too much time.

>> Moreover it really does not make sense to write in a shared memory if 
>> you want to support monitoring tools!
>> Just write a module like the stub_status module!
> Sorry, but I do not understand what you mean. I just want to provide
> something like /proc (on Linux) which is used by many monitoring tools.

Ok, but I think that providing a file system interface is not the better 

If you want to monitor global variables, then you can use the 
stub_status module (maybe adding new global shared variables).

If you want to monitor things like gzip compression ratio, then just 
implement a custom variable $gzip_ratio that the user can use in the log 

 > [...]

Regards  Manlio Perilo

More information about the nginx mailing list