summaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/macos
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2019-07-24 16:17:46 +0200
committerDimitrios Apostolou <jimis@qt.io>2019-09-27 08:42:31 +0200
commitfbe3a8d84e943b8e1ff89389bc6af9e09532722a (patch)
tree16feb9af6e1c6983e6a0c186ce1fcc6937d333c0 /coin/provisioning/common/macos
parent0a0ec7ffe33d8d646ad700b2b7b26541ee910420 (diff)
Install telegraf on all provisioned VMs
Install binaries as early as possible in the provisioning process, and start them, in order to monitor provisioning too. To achieve this, some OS auto-detection logic is introduced in shell script common.sourced.sh. The script can be sourced and used in all kind of other generic scripts. ioping is also installed from custom-compiled binaries in order to monitor the disk latency of the VMs. Reason we don't use ioping from the repositories, is that the units differ between ioping versions (new ioping reports latencies in nanoseconds, old in microseconds). Fixes: QTQAINFRA-3092 Change-Id: I9d9afb791955725d4bd0b32dae97dfc0bd4a76a3 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin/provisioning/common/macos')
-rw-r--r--coin/provisioning/common/macos/telegraf-coin.conf51
1 files changed, 51 insertions, 0 deletions
diff --git a/coin/provisioning/common/macos/telegraf-coin.conf b/coin/provisioning/common/macos/telegraf-coin.conf
new file mode 100644
index 00000000..24440a05
--- /dev/null
+++ b/coin/provisioning/common/macos/telegraf-coin.conf
@@ -0,0 +1,51 @@
+[global_tags]
+[agent]
+ interval = "10s"
+ round_interval = true
+ metric_batch_size = 100
+ metric_buffer_limit = 10000
+ collection_jitter = "0s"
+ flush_interval = "10s"
+ flush_jitter = "5s"
+ precision = ""
+ logfile = "/var/log/telegraf-coin.log"
+ hostname = "$COIN_UNIQUE_JOB_ID"
+ omit_hostname = false
+[[outputs.influxdb]]
+ urls= ["https://qtinfluxdb01.intra.qt.io:8086"]
+ insecure_skip_verify = true
+ database = "coin_vms"
+ skip_database_creation = true
+ username = "coin_vms_writer"
+ password = "COIN_VMS_WRITER_PASS"
+#[[inputs.cpu]] # linux-only
+# percpu = true
+# totalcpu = true
+# collect_cpu_time = false
+# report_active = false
+[[inputs.disk]]
+ ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
+#[[inputs.diskio]] # linux-only
+[[inputs.kernel]]
+[[inputs.mem]]
+[[inputs.processes]]
+[[inputs.swap]]
+[[inputs.system]]
+#[[inputs.kernel_vmstat]] # linux-only
+[[inputs.netstat]]
+
+
+# Monitor Coin process
+[[inputs.procstat]]
+ exe = "coin-"
+ # Buggy on macOS if using the "native" pid_finder, see:
+ # https://github.com/influxdata/telegraf/issues/6265
+ # Tested 1.12.1 version that "native" pid_finder has been fixed,
+ # but it is slow and times out frequently
+ pid_finder = "pgrep"
+
+
+# Monitor I/O latency
+[[inputs.exec]]
+ data_format = "influx"
+ commands = [ "/usr/bin/telegraf-ioping.sh /" ]