[rsyslog-notify] Forum Thread: execute python gui app via omprog event - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Thu Aug 28 01:55:48 CEST 2014


User: localyodel 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24889#p24889

Message: 
----------
Hello,  

I have rsyslog up and running and am successfully using omprog to execute
external scripts.  However I'm having problems running a wxpython gui app
in the same manner.  It runs fine if executed from the command line and
also appears to run when an event filter is triggered in the config but the
process dies shortly after without ever opening the gui interface.  The
script simply plays a .wav file in a loop until a "silence" button is
pushed.  I've tried wrapping the script in a few different variations of a
shell script that exports DISPLAY=:0 but no luck.  Has anyone had any luck
running an external gui app with omprog?  I'm running Ubuntu 14.04 LTS and
here's what I think is the pertinent debug info:

[code:1nfwjic2]
2525.087939521:7f95395bb700: rainerscript: var
'$rawmsg': '<190>2014-08-27T16:35:28.554922-07:00
crackerbarrel apache2: ::1 - -
[27/Aug/2014:16:35:26 -0700] "GET /thispagenothere
HTTP/1.1" 404 528 "-" "Wget/1.13.4 (linux-gnu)"'
2525.087949089:7f95395bb700: batch: item 0: expr
eval: 1
2525.087968644:7f95395bb700: scriptExec: batch of 1
elements, active 0x7f952c0008e0, active[0]:1
2525.087975908:7f95395bb700:     ACTION 0xeec3c0
[omprog:action(type="omprog" ...)]
2525.087993717:7f95395bb700: RRRR: execAct
[omprog]: batch of 1 elements, active 0x7f952c0008e0
2525.088002587:7f95395bb700: Called action(NotAllMark),
processing batch[0] via 'omprog'
2525.088009991:7f95395bb700: Called action(Batch), logging to
omprog
2525.088019908:7f95395bb700: submitBatch: enter, nElem 1
2525.088027381:7f95395bb700: tryDoAction 0xeec3c0, pnElem 1,
nElem 1
2525.088034714:7f95395bb700: Action 0xeec3c0 transitioned to
state: itx
2525.088041768:7f95395bb700: entering actionCalldoAction(),
state: itx
2525.088065445:7f95395bb700: executing program
'/home/jcopeland/pyrsyslogack/silence_alarm.py'
2525.088552518:7f95395bb700: child has pid 2966
2525.088604201:7f95395bb700: Action 0xeec3c0 transitioned to
state: rdy
2525.088613978:7f95395bb700: action 0xeec3c0 call returned 0
2525.088647991:7f95395bb700: ruleset.ProcessMsg() returns 0
2525.088657210:7f95395bb700: regular consumer finished, iret=0,
szlog 0 sz phys 1
2525.088686544:7f95395bb700: DeleteProcessedBatch: we
deleted 1 objects and enqueued 0 objects
2525.088695204:7f95395bb700: doDeleteBatch: delete batch
from store, new sizes: log 0, phys 0
2525.088703655:7f95395bb700: regular consumer finished, iret=4,
szlog 0 sz phys 0
2525.088710988:7f95395bb700: main Q:Reg/w0: worker
IDLE, waiting for work.
[/code:1nfwjic2]

Any insight would be appreciated.

Jason


More information about the rsyslog-notify mailing list