Created
July 5, 2016 21:58
-
-
Save mark-kubacki/4551289c2c8020d642bea82775f80f73 to your computer and use it in GitHub Desktop.
Newrelic Sysmond unit file for systemd and Docker. Works with CoreOS and --storage-driver "overlay2" and "overlay".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=newrelic-sysmond | |
After=docker.service | |
[Service] | |
ProtectHome=true | |
ProtectSystem=full | |
PIDFile=/run/newrelic-sysmond.pid | |
ExecStartPre=-/bin/bash -c "[[ -x /opt/sbin/nrsysmond ]] || (mkdir -p /opt/sbin; docker pull newrelic/nrsysmond:latest && rsync -au $(docker inspect newrelic/nrsysmond:latest | jq -r '.[0].GraphDriver.Data.UpperDir // .[0].GraphDriver.Data.RootDir')/usr/sbin/nrsysmond /opt/sbin/)" | |
Environment=NRSYSMOND_loglevel=info | |
Environment=NRSYSMOND_hostname=%H | |
Environment=NRSYSMOND_license_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
ExecStart=/opt/sbin/nrsysmond -E -p /run/newrelic-sysmond.pid -l /dev/null | |
KillMode=mixed | |
Type=forking | |
RestartForceExitStatus=1 3 3 | |
SuccessExitStatus=1 3 3 | |
[X-Fleet] | |
Global=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment