add telegraf.service

This commit is contained in:
UlricQin 2021-12-05 15:39:49 +08:00
parent 5f05e8fcaf
commit 022fef2b9e
3 changed files with 23 additions and 4 deletions

View File

@ -79,7 +79,7 @@ services:
- "server" - "server"
nwebapi: nwebapi:
image: ulric2019/nightingale:0.4 image: ulric2019/nightingale:5.0.0-ga-01
container_name: nwebapi container_name: nwebapi
hostname: nwebapi hostname: nwebapi
restart: always restart: always
@ -107,7 +107,7 @@ services:
- "webapi" - "webapi"
nserver: nserver:
image: ulric2019/nightingale:0.4 image: ulric2019/nightingale:5.0.0-ga-01
container_name: nserver container_name: nserver
hostname: nserver hostname: nserver
restart: always restart: always

View File

@ -5280,8 +5280,7 @@ separator = "_"
# # Read TCP metrics such as established, time wait and sockets counts. # # Read TCP metrics such as established, time wait and sockets counts.
# [[inputs.netstat]] [[inputs.netstat]]
# # no configuration
# # Read per-mount NFS client metrics from /proc/self/mountstats # # Read per-mount NFS client metrics from /proc/self/mountstats

View File

@ -0,0 +1,20 @@
[Unit]
Description="telegraf"
After=network.target
[Service]
Type=simple
ExecStart=/opt/telegraf/usr/bin/telegraf --config etc/telegraf/telegraf.conf --output-filter opentsdb
WorkingDirectory=/opt/telegraf
Restart=on-failure
SuccessExitStatus=0
LimitNOFILE=65536
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=telegraf
[Install]
WantedBy=multi-user.target