-
Notifications
You must be signed in to change notification settings - Fork 1
/
telegraf.sh
61 lines (50 loc) · 1.26 KB
/
telegraf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cat <<EOF | sudo tee /etc/apt/sources.list.d/influxdata.list
deb https://repos.influxdata.com/ubuntu bionic stable
EOF
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
apt-get update
apt-get -y install telegraf
systemctl restart telegraf
systemctl enable --now telegraf
systemctl status telegraf
/etc/telegraf/telegraf.conf
----------------------
# Global Agent Configuration
[agent]
hostname = "near"
flush_interval = "15s"
interval = "15s"
# Input Plugins
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
[[inputs.io]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.system]]
[[inputs.swap]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.kernel]]
# Output Plugin InfluxDB
[[outputs.influxdb]]
database = "telegraf"
urls = [ "http://IP:8086" ]
username = ""
password = ""
#to use docker
#--label="docker.group=nuw-st" add this when doing docker run
#[[inputs.docker]]
# endpoint = "unix:///var/run/docker.sock"
# gather_services = false
# container_name_include = []
# container_name_exclude = []
# timeout = "5s"
# docker_label_include = ["nuw-st"]
# docker_label_exclude = []
# perdevice = true
# total = false