monitoring friendly applications
Imbaud Pierre
pierre.imbaud at gmail.com
Wed May 20 05:34:53 EDT 2009
I have A LOT of batch applications to monitor, on linux machines, mostly
written in python.
I have to know:
- which are active, at a given moment?
- when did the last run occur? How long did it last?
- for some daemons: are they stuck? generally, waiting for i/o, or lost
in some C call.
I could do this (I partly did, btw) thru external processes tools. But
most processes are python programs, making slight changes is not a
problem. Thats why I think a python library could help me here; let us
call it mfa (for monitor friendly application); then one call to
mfa.in() at start (or at import?), mfa.out() at exit (maybe even on
exception?), and possibly mfa.loop(), for loop managed daemons. the
library would open a pipe, or a flow (to a file, a centralizing process,
a database, a log), and every call make a dated entry. Ideally, the
application should not be aware of the implementation, especially the
repository being a file or a db.
Another aspect of process management can be endorsed by the library:
sometimes only one instance of the process should be active, then
withdraw if already running.
Not a lot of code to write, but careful design, to keep things simple,
reliable, only add a low overhead, etc.
By any chance, does something like this exist? Would someone be
interested with this development?
More information about the Python-list
mailing list