diff --git a/scripts/test/fixture.sh b/scripts/test/fixture.sh index a9ac2a291db960bce4d747aa5847a0a09f165626..fc94e8e7d236902099dbf9fdf768807b5cc18f6b 100755 --- a/scripts/test/fixture.sh +++ b/scripts/test/fixture.sh @@ -72,13 +72,16 @@ create() { # copy telegraf configuration templates cp -f ${repo_root}/scripts/clmc-agent/telegraf.conf ${container_dir}/etc/telegraf/ cp -f ${repo_root}/scripts/clmc-agent/telegraf_output.conf ${container_dir}/etc/telegraf/telegraf.d/ + # copy the 'host' config into all service containers + cp ${repo_root}/src/test/clmctest/services/host/telegraf*.conf ${container_dir}/etc/telegraf/telegraf.d/ + # copy the service-specific config cp ${repo_root}/src/test/clmctest/services/${sf_id}/telegraf*.conf ${container_dir}/etc/telegraf/telegraf.d/ # replace telegraf template with container parameters cmd="/vagrant/scripts/clmc-agent/configure.sh ${location} ${sfc_id} ${sfc_id_instance} ${sf_id} ${sf_id_instance} ${ipendpoint_id} ${sr_id} ${influxdb_url} ${database_name}" lxc-attach -n ${service_name} -- ${cmd} - # start telegraf + # restart telegraf lxc-attach -n ${service_name} -- service telegraf restart fi diff --git a/src/test/clmctest/services/host/telegraf_host.conf b/src/test/clmctest/services/host/telegraf_host.conf index b1fc8ddc55650ade37a074a26ab651d1a6f04c41..a1441e7493d22c7e15b48e1ba46b5439686db108 100644 --- a/src/test/clmctest/services/host/telegraf_host.conf +++ b/src/test/clmctest/services/host/telegraf_host.conf @@ -1,36 +1,3 @@ -## © University of Southampton IT Innovation Centre, 2018 -## -## Copyright in this software belongs to University of Southampton -## IT Innovation Centre of Gamma House, Enterprise Road, -## Chilworth Science Park, Southampton, SO16 7NS, UK. -## -## This software may not be used, sold, licensed, transferred, copied -## or reproduced in whole or in part in any manner or form or in or -## on any media by any person other than in accordance with the terms -## of the Licence Agreement supplied with the software, or otherwise -## without the prior written consent of the copyright owners. -## -## This software is distributed WITHOUT ANY WARRANTY, without even the -## implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -## PURPOSE, except where stated in the Licence Agreement supplied with -## the software. -## -## Created By : Michael Boniface -## Created Date : 20-03-2018 -## Created for Project : FLAME - -############################################################################### -# INPUTS # -############################################################################### -# # Read metrics about network interface usage - [[inputs.net]] -# ## By default, telegraf gathers stats from any up interface (excluding loopback) -# ## Setting interfaces will tell it to gather these explicit interfaces, -# ## regardless of status. -# ## -# # interfaces = ["eth0"] - -# Read metrics about cpu usage [[inputs.cpu]] ## Whether to report per-cpu stats or not percpu = true @@ -39,26 +6,18 @@ ## If true, collect raw CPU time metrics. collect_cpu_time = false ## If true, compute and report the sum of all non-idle CPU states. - #report_active = false - - -# Read metrics about disk usage by mount point + report_active = false [[inputs.disk]] - ## By default, telegraf gather stats for all mountpoints. - ## Setting mountpoints will restrict the stats to the specified mountpoints. + ## By default stats will be gathered for all mount points. + ## Set mount_points will restrict the stats to only the specified mount points. # mount_points = ["/"] - - ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually - ## present on /run, /var/run, /dev/shm or /dev). + ## Ignore mount points by filesystem type. ignore_fs = ["tmpfs", "devtmpfs", "devfs"] - - -# Read metrics about disk IO by device [[inputs.diskio]] ## By default, telegraf will gather stats for all devices including ## disk partitions. ## Setting devices will restrict the stats to the specified devices. - # devices = ["sda", "sdb"] + devices = ["sda1"] ## Uncomment the following line if you need disk serial numbers. # skip_serial_number = false # @@ -78,23 +37,21 @@ ## The typical use case is for LVM volumes, to get the VG/LV name instead of ## the near-meaningless DM-0 name. # name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"] - -# Read metrics about memory usage +[[inputs.kernel]] + # no configuration [[inputs.mem]] # no configuration +[[inputs.processes]] + # no configuration +[[inputs.swap]] + # no configuration +[[inputs.system]] + # no configuration +[[inputs.net]] +[[inputs.netstat]] + # no configuration -# # Influx HTTP write listener +# Influx HTTP write listener [[inputs.http_listener]] ## Address and port to host HTTP listener on service_address = ":8186" - - ## timeouts - read_timeout = "10s" - write_timeout = "10s" - - ## HTTPS - #tls_cert= "/etc/telegraf/cert.pem" - #tls_key = "/etc/telegraf/key.pem" - - ## MTLS - #tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"] \ No newline at end of file diff --git a/src/test/clmctest/services/minio/telegraf_host.conf b/src/test/clmctest/services/minio/telegraf_host.conf deleted file mode 100644 index 12ee06b1c03a66d0e86d3a6d910971a7e18a8567..0000000000000000000000000000000000000000 --- a/src/test/clmctest/services/minio/telegraf_host.conf +++ /dev/null @@ -1,57 +0,0 @@ -[[inputs.cpu]] - ## Whether to report per-cpu stats or not - percpu = true - ## Whether to report total system cpu stats or not - totalcpu = true - ## If true, collect raw CPU time metrics. - collect_cpu_time = false - ## If true, compute and report the sum of all non-idle CPU states. - report_active = false -[[inputs.disk]] - ## By default stats will be gathered for all mount points. - ## Set mount_points will restrict the stats to only the specified mount points. - # mount_points = ["/"] - ## Ignore mount points by filesystem type. - ignore_fs = ["tmpfs", "devtmpfs", "devfs"] -[[inputs.diskio]] - ## By default, telegraf will gather stats for all devices including - ## disk partitions. - ## Setting devices will restrict the stats to the specified devices. - devices = ["sda1"] - ## Uncomment the following line if you need disk serial numbers. - # skip_serial_number = false - # - ## On systems which support it, device metadata can be added in the form of - ## tags. - ## Currently only Linux is supported via udev properties. You can view - ## available properties for a device by running: - ## 'udevadm info -q property -n /dev/sda' - # device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"] - # - ## Using the same metadata source as device_tags, you can also customize the - ## name of the device via templates. - ## The 'name_templates' parameter is a list of templates to try and apply to - ## the device. The template may contain variables in the form of '$PROPERTY' or - ## '${PROPERTY}'. The first template which does not contain any variables not - ## present for the device is used as the device name tag. - ## The typical use case is for LVM volumes, to get the VG/LV name instead of - ## the near-meaningless DM-0 name. - # name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"] -[[inputs.kernel]] - # no configuration -[[inputs.mem]] - # no configuration -[[inputs.processes]] - # no configuration -[[inputs.swap]] - # no configuration -[[inputs.system]] - # no configuration -[[inputs.net]] -[[inputs.netstat]] - # no configuration - -# Influx HTTP write listener -[[inputs.http_listener]] - ## Address and port to host HTTP listener on - service_address = ":8186" \ No newline at end of file diff --git a/src/test/clmctest/services/nginx/telegraf_host.conf b/src/test/clmctest/services/nginx/telegraf_host.conf deleted file mode 100644 index 12ee06b1c03a66d0e86d3a6d910971a7e18a8567..0000000000000000000000000000000000000000 --- a/src/test/clmctest/services/nginx/telegraf_host.conf +++ /dev/null @@ -1,57 +0,0 @@ -[[inputs.cpu]] - ## Whether to report per-cpu stats or not - percpu = true - ## Whether to report total system cpu stats or not - totalcpu = true - ## If true, collect raw CPU time metrics. - collect_cpu_time = false - ## If true, compute and report the sum of all non-idle CPU states. - report_active = false -[[inputs.disk]] - ## By default stats will be gathered for all mount points. - ## Set mount_points will restrict the stats to only the specified mount points. - # mount_points = ["/"] - ## Ignore mount points by filesystem type. - ignore_fs = ["tmpfs", "devtmpfs", "devfs"] -[[inputs.diskio]] - ## By default, telegraf will gather stats for all devices including - ## disk partitions. - ## Setting devices will restrict the stats to the specified devices. - devices = ["sda1"] - ## Uncomment the following line if you need disk serial numbers. - # skip_serial_number = false - # - ## On systems which support it, device metadata can be added in the form of - ## tags. - ## Currently only Linux is supported via udev properties. You can view - ## available properties for a device by running: - ## 'udevadm info -q property -n /dev/sda' - # device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"] - # - ## Using the same metadata source as device_tags, you can also customize the - ## name of the device via templates. - ## The 'name_templates' parameter is a list of templates to try and apply to - ## the device. The template may contain variables in the form of '$PROPERTY' or - ## '${PROPERTY}'. The first template which does not contain any variables not - ## present for the device is used as the device name tag. - ## The typical use case is for LVM volumes, to get the VG/LV name instead of - ## the near-meaningless DM-0 name. - # name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"] -[[inputs.kernel]] - # no configuration -[[inputs.mem]] - # no configuration -[[inputs.processes]] - # no configuration -[[inputs.swap]] - # no configuration -[[inputs.system]] - # no configuration -[[inputs.net]] -[[inputs.netstat]] - # no configuration - -# Influx HTTP write listener -[[inputs.http_listener]] - ## Address and port to host HTTP listener on - service_address = ":8186" \ No newline at end of file