[rsyslog-notify] Forum Thread: argument to omprog using variable - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Mon Sep 12 21:08:26 CEST 2016


User: PaT_TrickS 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26930#p26930

Message: 
----------
Hi everyone, 

Not sure if this is possible to do it, but I would like to start a python
script that require argument by using omprog module.
I have created this config and I can confirm that the action working when
removing the variable part (--device $.xyz)

Here is the part of my config that don't work because variable declaration
don't work
when I use the variable in omprog, the executed command is :
/opt/Script/logalert.py --runas rancid --device $.xyz

[code:efyvwkkk]
module(load="omprog")

template(name="extract" type="string" string="%hostname%")
set $.xyz = exec_template("extract");

if ($msg contains "%SYS-5-CONFIG_I: Configured") then
 action(type="omprog"
 binary="/opt/Script/logalert.py --runas rancid --device $.xyz"
 )
[/code:efyvwkkk]

Does create an action launched by omprog can use a variable ?
Best Regards


More information about the rsyslog-notify mailing list