[Unit]
Description=Performance Metrics Archive Logger
Documentation=man:pmlogger(1)
After=network-online.target pmcd.service
Before=pmlogger_farm.service pmlogger_check.timer pmlogger_daily.timer
BindsTo=pmlogger_farm.service pmlogger_check.timer pmlogger_daily.timer
Wants=pmcd.service

[Service]
Type=notify
NotifyAccess=all
# The pmlogger service manages the primary pmlogger (only)
Environment="PMLOGGER_CHECK_PARAMS=--only-primary"
EnvironmentFile=-/etc/sysconfig/pmlogger
TimeoutStartSec=120
TimeoutStopSec=120
Restart=always
ExecStart=/etc/pcp/pmlogger/rc start-systemd
ExecStop=/etc/pcp/pmlogger/rc stop-systemd
PIDFile=/run/pcp/pmlogger.pid
Group=pcp
User=pcp

[Install]
WantedBy=multi-user.target
