| 1 | [Unit] |
| 2 | Description=Ship VPS metrics to Snow Globe |
| 3 | Wants=network-online.target |
| 4 | After=network-online.target |
| 5 | |
| 6 | [Service] |
| 7 | DynamicUser=true |
| 8 | LoadCredential=token:/etc/snowglobe-ingest.token |
| 9 | ExecStart=/usr/local/bin/vmagent -httpListenAddr=127.0.0.1:8429 \ |
| 10 | -promscrape.config=/usr/local/lib/snowglobe-agents/vmagent.yml \ |
| 11 | -remoteWrite.url=https://ingest.paperclover.net/api/v1/write -remoteWrite.label=host=usw-server-1 \ |
| 12 | -remoteWrite.bearerTokenFile=%d/token \ |
| 13 | -remoteWrite.tmpDataPath=/var/lib/vmagent -remoteWrite.maxDiskUsagePerURL=1GB |
| 14 | StateDirectory=vmagent |
| 15 | Restart=always |
| 16 | RestartSec=5 |
| 17 | NoNewPrivileges=true |
| 18 | ProtectSystem=strict |
| 19 | ProtectHome=true |
| 20 | PrivateTmp=true |
| 21 | PrivateDevices=true |
| 22 | MemoryMax=256M |
| 23 | |
| 24 | [Install] |
| 25 | WantedBy=multi-user.target |