<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Okay. That does explain the error about multiple systemd-journal
      sources. But the bigger issue remains untouched. Why isn't syslog
      reading from the journal? I finally wound up removing systemd all
      together and going back to openrc. But we we can figure out what
      went wrong, then that would be much better.</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 1/24/21 2:14 PM, Balazs Scheidler
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKcfE+ZmWUvY4zHuU==LvgYECKnGU61P0_ZCtFg4YCN9po9bmg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">system () automatically adds systemd-journald(),
        that's why your second such source triggers the error about
        duplicate sources.
        <div dir="auto"><br>
        </div>
        <div dir="auto">With that said, why syslog-ng doesn't get
          messages from systems is a a different issue.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sun, Jan 24, 2021, 08:07
          Dan Egli <a class="moz-txt-link-rfc2396E" href="mailto:dan@newideatest.site"><dan@newideatest.site></a> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>
            <p>I'm trying to setup syslog-ng on a systemd system. But
              even though I have several things writing to syslog,
              syslog-ng doesn't write ANYTHING to the /var/log/messages
              except kernel messages and it's own info. So I searched
              around, and found the systemd-journal() source. So I tried
              it. And I get an error that says syslog-ng can't
              initialize the logger plugin:</p>
            <p><br>
            </p>
            <pre># syslog-ng -F
[2021-01-23T23:25:36.525097] The configuration must not contain more than one systemd-journal() source;
[2021-01-23T23:25:36.525157] Error initializing journal_reader;
[2021-01-23T23:25:36.525173] Error initializing message pipeline; plugin_name='systemd-journal', location='/etc/syslog-ng/syslog-ng.conf:26:5'

</pre>
            Here's the config, basically copied from the <a
              href="http://syslog-ng.com" target="_blank"
              rel="noreferrer" moz-do-not-send="true">syslog-ng.com</a>
            page:<br>
            <br>
            <pre>@version: 3.26
#
# Syslog-ng default configuration file for Gentoo Linux

# <a href="https://bugs.gentoo.org/426814" target="_blank" rel="noreferrer" moz-do-not-send="true">https://bugs.gentoo.org/426814</a>
@include "scl.conf"

options {
        threaded(yes);
        chain_hostnames(no);
        stats_freq(43200);
        mark_freq(3600);
};

source s_journald {

    systemd-journal(prefix(".SDATA.journald."));

};


source src { system(); internal(); file("/proc/kmsg"); };

destination messages { file("/var/log/messages"); };
destination console_all { file("/dev/tty12"); };

log { source(src); destination(messages); };
log { source(s_journald); destination(messages); };
log { source(src); destination(console_all); };</pre>
            <br>
            What am I doing wrong? I am POSITIVE things are sending to
            the syslog sub-system. I have ensured several programs have
            sent something. But without the systemd-journal line
            syslog-ng loads fine, recording /proc/kmsg and syslog-ng
            messages but nothing else.<br>
            <br>
            I am completely stumped here. <br>
          </div>
______________________________________________________________________________<br>
          Member info: <a
            href="https://lists.balabit.hu/mailman/listinfo/syslog-ng"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
          Documentation: <a
            href="http://www.balabit.com/support/documentation/?product=syslog-ng"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
          FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>

</pre>
    </blockquote>
  </body>
</html>