[rsyslog-notify] Forum Thread: can variables be used to hold IP addresses? - (Mode 'edit_topic')

noreply at adiscon.com noreply at adiscon.com
Sun Mar 22 17:27:13 CET 2015


User: hhm 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25345#p25345

Message: 
----------
Hi all,
More foolishness.  :-) I am trying to use variables to capture IP addresses
of remote forwarding targets. One goal is to use these variables for
load-balancing scenarios, but it might be a nice organizational trick in
the configuration files.

Early in the config I put this
[code:30rwom5e]set $/ipaddr = "10.0.0.1";[/code:30rwom5e]

Later I tried
[code:30rwom5e]action(type="omfwd"
#       Target="10.0.0.1"
       Target="$/ipaddr"
       Port="514"
       Protocol="udp"
	)[/code:30rwom5e]

The "rsyslog -N1" config check passed, but [u:30rwom5e]no
worko[/u:30rwom5e]. I also tried variants of including "%" chars, and
without quotes (which failed config test).

Should this have worked? Is there some config/syntax magic I missed? Or am
I mis-using a feature?

thx
  hunter


More information about the rsyslog-notify mailing list