0

I am having issue researching the right way to go about a problem. The problem is the syslog-ng file in the salt master server at the moment only enforces unix-stream as follows:

source s_sys {
        file ("/proc/kmsg" program_override("kernel: "));
        unix-stream ("/dev/log");
        internal();
};
source s_remote {
        udp(ip(0.0.0.0) port(514));
};

but now we want the new Centos-7 backup servers to have unix-dgram. So now I have a dilemma either to change this line to unix-dgram and wait to see if highstating with this config will have an issue when salt enforces unix-dgram on all our servers but I would very much like to add both the conditions in the salt config files. I researched a bit but could not find anything related in which both dgram and stream are used in the same config file.

Is there a way to do both?

0

UPDATE: The issue is fixed. It looks something like this:

source s_sys {
   file ("/proc/kmsg" program_override("kernel: ")); 
{%- if syslogng.osfinger == "CentOS Linux-7" %}
   unix-dgram ("/dev/log"); {%- else %}
   unix-stream ("/dev/log"); {%- endif %}
   internal();
   # udp(ip(0.0.0.0) port(514));  };

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.