-1

I have 2 sets of logs. Each is going to their own syslog server. But the source of the logs is the same - a palo alto prisma vpn.

For whatever reason, Syslog-Server A (the oldest source) writes the logs like this (in bold):

Nov 22 15:08:03 34 456

But my newest Syslog Server, B, writes the logs like this (in bold):

Nov 22 15:08:03 34.0.0.1 456

This is a problem. Because, on each syslog-ng server, we have a Splunk Universal Forwarder that forwards the logs to an index. We use the Palo Tech Add-On to parse the data.

It appears the TA is expected to parse the incoming data with this field:

Nov 22 15:08:03 34 456

Any other way breaks parsing. I have my new syslog-ng file (for the new server - B) written as below:

@version:3.31
@include "scl.conf"

options {
    flush_lines (0);
    time_reopen (10);
    log_fifo_size (1000);
    chain_hostnames (off);
    use_dns (no);  #was yes
    use_fqdn (no); #was yes
    create_dirs (no);
    keep_hostname (no); #was yes
};

source vpn_encrypted_log_traffic {
  network(
    ip(0.0.0.0)
    port(6514)
    transport("tls")
    tls(
      cert-file("/etc/syslog-ng/certs/prv.cer")
      key-file("/etc/syslog-ng/certs/prv.key")
      peer_verify(optional-untrusted)
    )
  );
};

destination prisma{ file("/directory/log.log") create_dir(yes) ); }

log { source(vpn_encrypted_log_traffic); destination(prisma); };

And the old syslog server (A) just has this:

@version:3.5
@include "scl.conf"

options {
    time-reap (30);
    keep_hostname (no); #was yes
};

source vpn_encrypted_log_traffic {
  network(
    ip(0.0.0.0)
    port(6514)
    transport("tls")
    tls(
      cert-file("/etc/syslog-ng/certs/prv.cer")
      key-file("/etc/syslog-ng/certs/prv.key")
      peer_verify(optional-untrusted)
    )
  );
};

destination prisma{ file("/directory/log.log") create_dir(yes) ); }

log { source(vpn_encrypted_log_traffic); destination(prisma); };

I can only think the problem exists in Prisma. But the configs look 1-to-1 to me.

  • 1
    Maybe I need new glasses, but the configs look *very* different to me. The versions are different and the new server has many more options specified. Those differences may be insignificant, I'd start by making both servers as identical as possible. – RichG Nov 23 '21 at 00:57
  • `34.0.0.1` is the hostname/IP address part of a BSD syslog message. I don't know how `34` ended up being `34.0.0.1`, but `use_dns(no); keep_hostname(no);` means this part of the message will be replaced with server B's IP address. – MrAnno Nov 28 '21 at 14:10

1 Answers1

0

34.0.0.1 is the hostname/IP address part of a BSD syslog message.

use_dns(no); keep_hostname(no); means this part of the message will be replaced with server B's IP address.

keep_hostname(yes) can be used to leave the hostname intact.

MrAnno
  • 754
  • 5
  • 17