ubuntu - Email error message using crashmail with supervisor -


i have server supervisor running eventlistener, on event when process crashes, managed crashmail send email me. email content states "process adnode04 in group adnode04 exited unexpectedly (pid 1255) state running".

i want crashmail able take content last 10-20 lines of log file , email me contents. able that?

absolutely, have fork crashmail yourself.

the message around line 112. can use xml-rpc api call tailprocessstderrlog.

so you'd add like:

rpc = childutils.getrpcinterface( os.environ ) log = rpc.supervisor.tailprocessstderrlog( %(groupname):'%(processname)' % pheaders, 16000 ) msg += '\nlog:\n%s' % log['bytes'] 

the above simple proof-of-concept, untested , contains mistake. let me know how goes.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -