* Fix issue #13146

fixed issue #13146 - Syslog :: syslog_xlate does not work with hostnames with dots

* Update syslog.php
This commit is contained in:
Valery Kartel
2021-08-19 18:31:32 +03:00
committed by GitHub
parent f0f0a05dd1
commit 4609da6db2

View File

@@ -53,8 +53,9 @@ function process_syslog($entry, $update)
}
$entry['host'] = preg_replace('/^::ffff:/', '', $entry['host']);
if ($new_host = Config::get("syslog_xlate.{$entry['host']}")) {
$entry['host'] = $new_host;
$syslog_xlate = Config::get('syslog_xlate');
if (! empty($syslog_xlate[$entry['host']])) {
$entry['host'] = $syslog_xlate[$entry['host']];
}
$entry['device_id'] = get_cache($entry['host'], 'device_id');
if ($entry['device_id']) {