$IncludeConfig diag-common.conf
template(name="ips" type="string" string="%$.ips%\n")

template(name="paths" type="string" string="%$!fragments% %$!user%\n")
template(name="numbers" type="string" string="nos: %$!some_nos%\n")

module(load="../plugins/mmnormalize/.libs/mmnormalize")
module(load="../plugins/imptcp/.libs/imptcp")
input(type="imptcp" port="13514")

action(type="mmnormalize" rulebase="testsuites/mmnormalize_tokenized.rulebase")
if ( $!only_ips != "" ) then {
  set $.ips = $!only_ips;
  action(type="omfile" file="./rsyslog.out.log" template="ips")
} else if ( $!local_ips != "" ) then {
  set $.ips = $!local_ips;
  action(type="omfile" file="./rsyslog.out.log" template="ips")
} else if ( $!external_ips != "" ) then {
  set $.ips = $!external_ips;
  action(type="omfile" file="./rsyslog.out.log" template="ips")
} else if ( $!some_nos != "" ) then { 
  action(type="omfile" file="./rsyslog.out.log" template="numbers")
} else {
  action(type="omfile" file="./rsyslog.out.log" template="paths")
}
