| 1 | [Unit] |
| 2 | Description=Ship VPS logs to Snow Globe |
| 3 | Wants=network-online.target |
| 4 | After=network-online.target |
| 5 | |
| 6 | [Service] |
| 7 | LoadCredential=token:/etc/snowglobe-ingest.token |
| 8 | ExecStart=/usr/local/bin/vlagent -httpListenAddr=127.0.0.1:9429 -tmpDataPath=/var/lib/vlagent \ |
| 9 | -fileCollector.glob=/home/clo/.pm2/logs/*.log \ |
| 10 | -remoteWrite.url=https://ingest.paperclover.net/insert/jsonline -remoteWrite.format=jsonline \ |
| 11 | -remoteWrite.bearerTokenFile=%d/token -remoteWrite.maxDiskUsagePerURL=1GB |
| 12 | StateDirectory=vlagent |
| 13 | Restart=always |
| 14 | RestartSec=5 |
| 15 | NoNewPrivileges=true |
| 16 | ProtectSystem=strict |
| 17 | ProtectHome=read-only |
| 18 | PrivateTmp=true |
| 19 | PrivateDevices=true |
| 20 | MemoryMax=256M |
| 21 | |
| 22 | [Install] |
| 23 | WantedBy=multi-user.target |