#
# Generated by Chef
#
Module (load="imudp")
input(type="imudp" port="514")
Module (load="omprog")

#$template REMOTE,"/opt/log/remote/%fromhost%/%$YEAR%-%$MONTH%-%$DAY%.log"
template(name="REMOTE" type="string" string="/opt/log/remote/%fromhost%/%$YEAR%-%$MONTH%-%$DAY%.log")
if re_match($fromhost,'^lb.*') then {
    action(type="omprog" binary="/usr/bin/secStart netscaler"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if re_match($fromhost, '^(as|cs|r|br).*') then {
    action(type="omprog" binary="/usr/bin/secStart comware"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if re_match($fromhost, '^(tms|ddm).*') then {
    action(type="omprog" binary="/usr/bin/secStart arbor"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if re_match($fromhost, '^(sms).*') then {
    action(type="omprog" binary="/usr/bin/secStart tippingpt"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if re_match($fromhost, '^(vpn).*') then {
    action(type="omprog" binary="/usr/bin/secStart vpn"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if re_match($fromhost, '(^api.*)|(.+apigee.+)') then {
    action(type="omprog" binary="/usr/bin/secStart apigee"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if re_match($fromhost, '^(fw).*') then {
    action(type="omprog" binary="/usr/bin/secStart firewall"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
} else if $fromhost-ip !='127.0.0.1' then {
    action(type="omprog" binary="/usr/bin/secStart misc"
    template="RSYSLOG_FileFormat")
    action(type="omfile" DynaFile="REMOTE" template="RSYSLOG_FileFormat")
    stop
}
