Use fqdn as host value

master
Daniel Berteaud 6 years ago
parent 2f988d0177
commit 419c00a1dd
  1. 4
      systemd-journal-gelf

@ -9,7 +9,7 @@ use Compress::Zlib;
use Getopt::Long;
use YAML::Tiny;
use MIME::Base64;
use Net::Domain qw(hostfqdn);
#### Global vars ####
@ -154,7 +154,7 @@ while ( my $entry = <JOURNAL> ){
my $gelf = {
version => 1.1,
short_message => $msg->{MESSAGE},
host => $msg->{_HOSTNAME},
host => hostfqdn(),
timestamp => int ( $msg->{__REALTIME_TIMESTAMP} / ( 1000 * 1000 ) ),
level => $msg->{PRIORITY}
};

Loading…
Cancel
Save