Use fqdn as host value

This commit is contained in:
Daniel Berteaud 2019-03-27 22:32:04 +01:00
parent 2f988d0177
commit 419c00a1dd
1 changed files with 2 additions and 2 deletions

View File

@ -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}
};