0

I am new to syslog-ng and was trying to fix the issue of an error which arises due to uniqueness of the persist names in syslog-ng, I see the below error in my syslog

err Error checking the uniqueness of the persist names, please override it with persist-name option. Shutting down.; persist_name='afsocket_dd.(dgram,10.120.21.10:514)', location='/etc/syslog-ng/syslog-ng.conf:81:26'

The current syslog-ng.conf is as below, I did a search in google and found we need to add persist-name() in order to make it unique, but with my understanding each if the destination is already unique, with the below syslog-ng.conf, I get the error when the IP address are same, destination d_tempask_1 and destination d_temst_1 have the same IP address. But if I provide a different IP address I don't see the error. Could anybody provide some insight as to how to handle same IP address.

source s_syslogng { file ("/proc/kmsg" program_override("kernel: ")); unix-stream ("/run/systemd/journal/syslog" max-connections(200)); };

source s_internal { internal(); };

filter f_test1 { message("__test1"); };

destination d_test1_1 { udp ( "192.168.202.119" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_test1); destination(d_test1_1); };

filter f_tempask { message("__tempask"); };

destination d_tempask_1 { udp ( "10.120.21.10" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_tempask); destination(d_tempask_1); };

filter f_temst { message("__temst"); };

destination d_temst_1 { udp ( "10.120.21.10" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_temst); destination(d_temst_1); };

filter f_dir { message("__dir"); };

destination d_dir_1 { udp ( "10.35.183.11" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_dir); destination(d_dir_1); };

tried with persist-name(), but even that still throws the error even if IP address is different or same

syslog-ng.conf with persist-name()

source s_syslogng { file ("/proc/kmsg" program_override("kernel: ")); unix-stream ("/run/systemd/journal/syslog" max-connections(200)); };

source s_internal { internal(); };

filter f_test1 { message("__test1"); };

destination d_test1_1 { persist-name(test1_1) udp ( "192.168.202.119" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_test1); destination(d_test1_1); };

filter f_tempask { message("__tempask"); };

destination d_tempask_1 { persist-name(tempask_1) udp ( "10.120.21.11" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_tempask); destination(d_tempask_1); };

filter f_temst { message("__temst"); };

destination d_temst_1 { persist-name(temst_1) udp ( "10.120.21.10" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_temst); destination(d_temst_1); };

filter f_dir { message("__dir"); };

destination d_dir_1 { persist-name(dir_1) udp ( "10.35.183.11" port(514) template("<$PRI>$DATE local0 infoblox Outbound[]: debug $MSGONLY\n") template_escape(no) ); };

log { source(s_syslogng); filter(f_dir); destination(d_dir_1); };

Any input will be very help full.

1 Answer 1

1

The persist-name() option should go inside the destination's declaration:

udp("10.120.21.10" port(514) persist-name("temst_1"));
2
  • Still facing the same error in syslog Commented Dec 12, 2022 at 13:36
  • Make sure you use different persist names for each destinations with the same IP+port. Commented Dec 15, 2022 at 2:27

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.