Add fluentd logging configuration for database & services

This commit is contained in:
Andras Bacsai
2023-11-17 11:32:52 +01:00
parent b8252b85b0
commit 57738198ad
7 changed files with 60 additions and 1 deletions

View File

@@ -797,6 +797,16 @@ class Service extends BaseModel
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik($this->uuid, $fqdns, true));
}
}
if ($this->server->isDrainLogActivated()) {
data_set($service, 'logging', [
'driver' => 'fluentd',
'options' => [
'fluentd-address' => "tcp://127.0.0.1:24224",
'fluentd-async' => "true",
'fluentd-sub-second-precision' => "true",
]
]);
}
data_set($service, 'labels', $serviceLabels->toArray());
data_forget($service, 'is_database');
data_set($service, 'restart', RESTART_MODE);