Merge pull request #326068 from phozzy/Feat/Add-syslog-capabilities-4-opentelemetry-collector
Feat/add syslog capabilities 4 opentelemetry collector
This commit is contained in:
commit
a307e5d76b
@ -7,7 +7,8 @@ let
|
||||
opentelemetry-collector = cfg.package;
|
||||
|
||||
settingsFormat = pkgs.formats.yaml { };
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.opentelemetry-collector = {
|
||||
enable = mkEnableOption "Opentelemetry Collector";
|
||||
|
||||
@ -48,8 +49,10 @@ in {
|
||||
description = "Opentelemetry Collector Service Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = let
|
||||
conf = if cfg.configFile == null
|
||||
serviceConfig =
|
||||
let
|
||||
conf =
|
||||
if cfg.configFile == null
|
||||
then settingsFormat.generate "config.yaml" cfg.settings
|
||||
else cfg.configFile;
|
||||
in
|
||||
@ -60,8 +63,12 @@ in {
|
||||
ProtectSystem = "full";
|
||||
DevicePolicy = "closed";
|
||||
NoNewPrivileges = true;
|
||||
WorkingDirectory = "/var/lib/opentelemetry-collector";
|
||||
WorkingDirectory = "%S/opentelemetry-collector";
|
||||
StateDirectory = "opentelemetry-collector";
|
||||
SupplementaryGroups = [
|
||||
# allow to read the systemd journal for opentelemetry-collector
|
||||
"systemd-journal"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user