fix export of jsons
This commit is contained in:
@@ -48,10 +48,8 @@ scrape_interval_minutes = 15
|
|||||||
# carry one. ZIP files themselves are never written to disk. Disabled by
|
# carry one. ZIP files themselves are never written to disk. Disabled by
|
||||||
# default, since the exporter is designed to be stateless (see README.md).
|
# default, since the exporter is designed to be stateless (see README.md).
|
||||||
persist_raw_json = False
|
persist_raw_json = False
|
||||||
# Under the systemd unit, StateDirectory=vw-eu-data-act-exporter makes
|
# Under the systemd unit enable ProtectSystem=strict if exporting of jsons is not needed
|
||||||
# systemd export $STATE_DIRECTORY (an already-created, correctly-owned
|
persist_raw_json_dir = "raw_json"
|
||||||
# directory) - fall back to a relative path for ad-hoc/local runs.
|
|
||||||
persist_raw_json_dir = os.environ.get("STATE_DIRECTORY", "./raw_json")
|
|
||||||
|
|
||||||
# --- Logging ---------------------------------------------------------------
|
# --- Logging ---------------------------------------------------------------
|
||||||
log_level = "INFO"
|
log_level = "INFO"
|
||||||
|
|||||||
@@ -13,15 +13,8 @@ Restart=on-failure
|
|||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
|
||||||
# Hardening
|
# Hardening
|
||||||
# StateDirectory is created automatically (with correct ownership) before
|
|
||||||
# the service starts and is writable under ProtectSystem=strict without a
|
|
||||||
# ReadWritePaths= entry - systemd exposes its absolute path via
|
|
||||||
# $STATE_DIRECTORY, which config.py picks up for persist_raw_json_dir.
|
|
||||||
# Unlike ReadWritePaths=, this does not require the directory to already
|
|
||||||
# exist on disk.
|
|
||||||
StateDirectory=vw-eu-data-act-exporter
|
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
ProtectSystem=strict
|
#ProtectSystem=strict #Enable this if exporting jsons is not needed
|
||||||
ProtectHome=true
|
ProtectHome=true
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
PrivateDevices=true
|
PrivateDevices=true
|
||||||
@@ -30,5 +23,9 @@ ProtectKernelModules=true
|
|||||||
ProtectControlGroups=true
|
ProtectControlGroups=true
|
||||||
RestrictSUIDSGID=true
|
RestrictSUIDSGID=true
|
||||||
|
|
||||||
|
# Resource limits
|
||||||
|
MemoryMax=256M
|
||||||
|
CPUQuota=10%
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user