diff --git a/Vagrantfile b/Vagrantfile index 6f3f4c4e35cb2056473a8b8b0a57de8160f7bb2f..9ee4a832c6de50a8c6a4e7b7d9514ce0fc6b5244 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -87,14 +87,23 @@ Vagrant.configure("2") do |config| puts "Instance name #{instance_name}:" case instance_name when 'clmc-service' - # instance_config.vm.provision :shell, :path => "scripts/clmc-service/install.sh" + instance_config.vm.provision :shell, :path => "scripts/clmc-service/install.sh" instance_config.vm.provision :shell, :path => "test/services/pytest/install.sh" else # specific service install instance_config.vm.provision :shell, :path => "test/services/#{host["service_name"]}/install.sh", env: {"REPO_ROOT" => "/vagrant"} # CLMC agent install - instance_config.vm.provision :shell, :path => "scripts/clmc-agent/install.sh", :args => "/vagrant/scripts/clmc-agent/telegraf_template.conf /vagrant/test/services/#{host["service_name"]}/telegraf_#{host["service_name"]}.conf #{host["location"]} #{host["sfc_id"]} #{host["sfc_id_instance"]} #{host["sf_id"]} #{host["sf_id_instance"]} #{host["ipendpoint_id"]} #{host["influxdb_url"]} #{host["database_name"]}" + instance_config.vm.provision :shell, :path => "scripts/clmc-agent/install.sh" + + # CLMC agent service specific input configuration + instance_config.vm.provision :shell, inline: "cp /vagrant/test/services/#{host["service_name"]}/telegraf_#{host["service_name"]}.conf /etc/telegraf/telegraf.d/" + + # CLMC agent general and output configuration + instance_config.vm.provision :shell, :path => "scripts/clmc-agent/configure.sh", :args => "/vagrant/scripts/clmc-agent/telegraf.conf /vagrant/scripts/clmc-agent/telegraf_output.conf #{host["location"]} #{host["sfc_id"]} #{host["sfc_id_instance"]} #{host["sf_id"]} #{host["sf_id_instance"]} #{host["ipendpoint_id"]} #{host["influxdb_url"]} #{host["database_name"]}" + + # CLMC start agent + instance_config.vm.provision :shell, inline: "systemctl start telegraf" end diff --git a/scripts/clmc-agent/configure.sh b/scripts/clmc-agent/configure.sh new file mode 100644 index 0000000000000000000000000000000000000000..59e84278feb16167d0d45a1d5057e770038fe83d --- /dev/null +++ b/scripts/clmc-agent/configure.sh @@ -0,0 +1,108 @@ +#!/bin/bash +#///////////////////////////////////////////////////////////////////////// +#// +#// (c) University of Southampton IT Innovation Centre, 2017 +#// +#// 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 : 13/12/2017 +#// Created for Project : FLAME +#// +#///////////////////////////////////////////////////////////////////////// + +# Force fail on command fail +set -euo pipefail + +echo "Configuring Telegraf agent general and output configuration" + +# Get command line parameters +if [ "$#" -ne 10 ]; then + echo "Error: illegal number of arguments: "$# + echo "Usage: config.sh TELEGRAF_GENERAL_CONF_FILE TELEGRAF_OUTPUT_CONF_FILE LOCATION SFC_ID SFC_ID_INSTANCE SF_ID SF_ID_INSTANCE IP_ENDPOINT_ID INFLUXDB_URL DATABASE_NAME" + exit +fi + +TELEGRAF_GENERAL_CONF_FILE=$1 +TELEGRAF_OUTPUT_CONF_FILE=$2 +LOCATION=$3 +SFC_ID=$4 +SFC_ID_INSTANCE=$5 +SF_ID=$6 +SF_ID_INSTANCE=$7 +IP_ENDPOINT_ID=$8 +INFLUXDB_URL=$9 +DATABASE_NAME=${10} + +TELEGRAF_CONF_DIR="/etc/telegraf" +TELEGRAF_CONF_FILE="$TELEGRAF_CONF_DIR/telegraf.conf" +TELEGRAF_INCLUDE_CONF_DIR="/etc/telegraf/telegraf.d" +TELEGRAF_OUTPUT_FILE="$TELEGRAF_INCLUDE_CONF_DIR/telegraf_output.conf" + +echo "Checking Telegraf installation" + +# Check the configuration files provided exist + +echo "TELEGRAF_GENERAL_CONF_FILE: "$TELEGRAF_GENERAL_CONF_FILE +if [ ! -f $TELEGRAF_GENERAL_CONF_FILE ]; then + echo "Error: Telegraf conf template file not found: "$TELEGRAF_GENERAL_CONF_FILE + exit +fi + +echo "TELEGRAF_OUTPUT_CONF_FILE: "$TELEGRAF_OUTPUT_CONF_FILE +if [ ! -f $TELEGRAF_OUTPUT_CONF_FILE ]; then + echo "Error: Telegraf output conf specific file not found: "$TELEGRAF_OUTPUT_CONF_FILE + exit +fi + +# Check the target telegraf directory exists +if [ ! -d "$TELEGRAF_CONF_DIR" ]; then + echo "Error: Telegraf conf directory does not exist on target machine. Check that telegraf is installed "$TELEGRAF_CONF_DIR + exit +fi + +# Check the target telegraf directory exists +if [ ! -d $TELEGRAF_INCLUDE_CONF_DIR ]; then + echo "Error: Telegraf conf include directory does not exist on target machine. Check that telegraf is installed "$TELEGRAF_INCLUDE_CONF_DIR + exit +fi + +echo "Copying configuration" + +# Copy configuration +echo "Telegraf general config file: " $TELEGRAF_GENERAL_CONF_FILE +cp $TELEGRAF_GENERAL_CONF_FILE $TELEGRAF_CONF_FILE + +echo "Telegraf output config file: " $TELEGRAF_OUTPUT_CONF_FILE +cp $TELEGRAF_OUTPUT_CONF_FILE $TELEGRAF_OUTPUT_FILE + +# Replace template parameters on general configuration +sed -i 's/$LOCATION/'$LOCATION'/g' $TELEGRAF_CONF_FILE +sed -i 's/$SFC_ID/'$SFC_ID'/g' $TELEGRAF_CONF_FILE +sed -i 's/$SFC_ID_INSTANCE/'$SFC_ID_INSTANCE'/g' $TELEGRAF_CONF_FILE +sed -i 's/$SF_ID/'$SF_ID'/g' /etc/telegraf/telegraf.conf +sed -i 's/$SF_ID_INSTANCE}}/'$SF_ID_INSTANCE'/g' $TELEGRAF_CONF_FILE +sed -i 's/$IP_ENDPOINT_ID/'$IP_ENDPOINT_ID'/g' $TELEGRAF_CONF_FILE + +# Replace parameters on output configuration +echo "INFLUXDB_URL: " $INFLUXDB_URL +echo "DATABASE_NAME: " $DATABASE_NAME + +sed -i 's|$INFLUXDB_URL|'$INFLUXDB_URL'|g' $TELEGRAF_OUTPUT_FILE +sed -i 's/$DATABASE_NAME/'$DATABASE_NAME'/g' $TELEGRAF_OUTPUT_FILE + +# Start telegraf +systemctl restart telegraf diff --git a/scripts/clmc-agent/install.sh b/scripts/clmc-agent/install.sh index 981ffc2391bfe530a0a3df5271ab2cbc7ed4769d..21d46b1d0918836ec3c94c20d76fdf9bf3407408 100755 --- a/scripts/clmc-agent/install.sh +++ b/scripts/clmc-agent/install.sh @@ -27,29 +27,9 @@ # Force fail on command fail set -euo pipefail -# Install telegraf -if [ "$#" -ne 10 ]; then - echo "Error: illegal number of arguments: "$# - echo "Usage: install-clmc-agent.sh TELEGRAF_GENERAL_CONF_FILE TELEGRAF_SERVICE_CONF_FILE LOCATION SFC_ID SFC_ID_INSTANCE SF_ID SF_ID_INSTANCE IP_ENDPOINT_ID INFLUXDB_URL DATABASE_NAME" - exit -fi - -TELEGRAF_GENERAL_CONF_FILE=$1 -TELEGRAF_SERVICE_CONF_FILE=$2 -LOCATION=$3 -SFC_ID=$4 -SFC_ID_INSTANCE=$5 -SF_ID=$6 -SF_ID_INSTANCE=$7 -IP_ENDPOINT_ID=$8 -INFLUXDB_URL=$9 -DATABASE_NAME=${10} - -if [ ! -f $TELEGRAF_GENERAL_CONF_FILE ]; then - echo "Error: Telegraf conf template file not found: "$TELEGRAF_GENERAL_CONF_FILE - exit -fi +echo "Configuring Telegraf agent" +# Install telegraf wget https://dl.influxdata.com/telegraf/releases/telegraf_1.3.2-1_amd64.deb sha1sum telegraf_1.3.2-1_amd64.deb | grep '73794cc2986fef7c81cfff8bc638cd84d6629da8' &> /dev/null if [ $? == 1 ]; then @@ -58,29 +38,3 @@ if [ $? == 1 ]; then fi dpkg -i telegraf_1.3.2-1_amd64.deb -# Copy configuration -echo "Telegraf general config file: " $TELEGRAF_GENERAL_CONF_FILE -cp $TELEGRAF_GENERAL_CONF_FILE /etc/telegraf/telegraf.conf - -if [ ! -f $TELEGRAF_SERVICE_CONF_FILE ]; then - echo "Warning: Telegraf conf service specific file not found: "$TELEGRAF_SERVICE_CONF_FILE -else - echo "Telegraf service config file: " $TELEGRAF_SERVICE_CONF_FILE - cp $TELEGRAF_SERVICE_CONF_FILE /etc/telegraf/telegraf.d/ -fi - -echo "INFLUXDB_URL: " $INFLUXDB_URL -echo "DATABASE_NAME: " $DATABASE_NAME - -# Replace template parameters -sed -i 's/{{LOCATION}}/'$LOCATION'/g' /etc/telegraf/telegraf.conf -sed -i 's/{{SFC_ID}}/'$SFC_ID'/g' /etc/telegraf/telegraf.conf -sed -i 's/{{SFC_ID_INSTANCE}}/'$SFC_ID_INSTANCE'/g' /etc/telegraf/telegraf.conf -sed -i 's/{{SF_ID}}/'$SF_ID'/g' /etc/telegraf/telegraf.conf -sed -i 's/{{SF_ID_INSTANCE}}/'$SF_ID_INSTANCE'/g' /etc/telegraf/telegraf.conf -sed -i 's/{{IP_ENDPOINT_ID}}/'$IP_ENDPOINT_ID'/g' /etc/telegraf/telegraf.conf -sed -i 's|{{INFLUXDB_URL}}|'$INFLUXDB_URL'|g' /etc/telegraf/telegraf.conf -sed -i 's/{{DATABASE_NAME}}/'$DATABASE_NAME'/g' /etc/telegraf/telegraf.conf - -# Start telegraf -systemctl start telegraf \ No newline at end of file diff --git a/scripts/clmc-agent/telegraf.conf b/scripts/clmc-agent/telegraf.conf new file mode 100644 index 0000000000000000000000000000000000000000..afe301ea820079c8b47d61d7034d527f2e8ce0d0 --- /dev/null +++ b/scripts/clmc-agent/telegraf.conf @@ -0,0 +1,64 @@ +# Telegraf configuration + +# Telegraf is entirely plugin driven. All metrics are gathered from the +# declared inputs, and sent to the declared outputs. + +# Plugins must be declared in here to be active. +# To deactivate a plugin, comment out the name and any variables. + +# Use 'telegraf -config telegraf.conf -test' to see what metrics a config +# file would generate. + +# Global tags can be specified here in key="value" format. +[global_tags] + # location of the data centre + location="$LOCATION" + # media service template id + sfc="$SFC_ID" + # media service instance + sfc_i="$SFC_ID_INSTANCE" + # service function type + sf="$SF_ID" + # service function instance id + sf_i="$SF_ID_INSTANCE" + # ipendpoint id aka surrogate instance + ipendpoint="$IP_ENDPOINT_ID" + +# Configuration for telegraf agent +[agent] + ## Default data collection interval for all inputs + interval = "10s" + ## Rounds collection interval to 'interval' + ## ie, if interval="10s" then always collect on :00, :10, :20, etc. + round_interval = true + + ## Telegraf will cache metric_buffer_limit metrics for each output, and will + ## flush this buffer on a successful write. + metric_buffer_limit = 1000 + ## Flush the buffer whenever full, regardless of flush_interval. + flush_buffer_when_full = true + + ## Collection jitter is used to jitter the collection by a random amount. + ## Each plugin will sleep for a random time within jitter before collecting. + ## This can be used to avoid many plugins querying things like sysfs at the + ## same time, which can have a measurable effect on the system. + collection_jitter = "0s" + + ## Default flushing interval for all outputs. You shouldn't set this below + ## interval. Maximum flush_interval will be flush_interval + flush_jitter + flush_interval = "10s" + ## Jitter the flush interval by a random amount. This is primarily to avoid + ## large write spikes for users running a large number of telegraf instances. + ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s + flush_jitter = "0s" + + ## Logging configuration: + ## Run telegraf in debug mode + debug = false + ## Run telegraf in quiet mode + quiet = false + ## Specify the log file name. The empty string means to log to stdout. + logfile = "/var/log/telegraf/telegraf.log" + + ## Override default hostname, if empty use os.Hostname() + hostname = "" diff --git a/scripts/clmc-agent/telegraf_output.conf b/scripts/clmc-agent/telegraf_output.conf new file mode 100644 index 0000000000000000000000000000000000000000..b8e34bc44882b4e2168b23922e471a41cb8d0103 --- /dev/null +++ b/scripts/clmc-agent/telegraf_output.conf @@ -0,0 +1,26 @@ +############################################################################### +# OUTPUTS # +############################################################################### + +# Configuration for influxdb server to send metrics to +[[outputs.influxdb]] + # The full HTTP or UDP endpoint URL for your InfluxDB instance. + # Multiple urls can be specified but it is assumed that they are part of the same + # cluster, this means that only ONE of the urls will be written to each interval. + # urls = ["udp://127.0.0.1:8089"] # UDP endpoint example + urls = ["$INFLUXDB_URL"] # required + # The target database for metrics (telegraf will create it if not exists) + database = "$DATABASE_NAME" # required + # Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h". + # note: using second precision greatly helps InfluxDB compression + precision = "s" + + ## Write timeout (for the InfluxDB client), formatted as a string. + ## If not provided, will default to 5s. 0s means no timeout (not recommended). + timeout = "5s" + # username = "telegraf" + # password = "metricsmetricsmetricsmetrics" + # Set the user agent for HTTP POSTs (can be useful for log differentiation) + # user_agent = "telegraf" + # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) + # udp_payload = 512 \ No newline at end of file diff --git a/scripts/clmc-agent/telegraf_template.conf b/scripts/clmc-agent/telegraf_template.conf deleted file mode 100644 index 74ced94b7e6098396303e58a11f66ac327550d93..0000000000000000000000000000000000000000 --- a/scripts/clmc-agent/telegraf_template.conf +++ /dev/null @@ -1,194 +0,0 @@ -# Telegraf configuration - -# Telegraf is entirely plugin driven. All metrics are gathered from the -# declared inputs, and sent to the declared outputs. - -# Plugins must be declared in here to be active. -# To deactivate a plugin, comment out the name and any variables. - -# Use 'telegraf -config telegraf.conf -test' to see what metrics a config -# file would generate. - -# Global tags can be specified here in key="value" format. -[global_tags] - # location of the data centre - location="{{LOCATION}}" - # media service template id - sfc="{{SFC_ID}}" - # media service instance - sfc_i="{{SFC_ID_INSTANCE}}" - # service function type - sf="{{SF_ID}}" - # service function instance id - sf_i="{{SF_ID_INSTANCE}}" - # ipendpoint id aka surrogate instance - ipendpoint="{{IP_ENDPOINT_ID}}" - -# Configuration for telegraf agent -[agent] - ## Default data collection interval for all inputs - interval = "10s" - ## Rounds collection interval to 'interval' - ## ie, if interval="10s" then always collect on :00, :10, :20, etc. - round_interval = true - - ## Telegraf will cache metric_buffer_limit metrics for each output, and will - ## flush this buffer on a successful write. - metric_buffer_limit = 1000 - ## Flush the buffer whenever full, regardless of flush_interval. - flush_buffer_when_full = true - - ## Collection jitter is used to jitter the collection by a random amount. - ## Each plugin will sleep for a random time within jitter before collecting. - ## This can be used to avoid many plugins querying things like sysfs at the - ## same time, which can have a measurable effect on the system. - collection_jitter = "0s" - - ## Default flushing interval for all outputs. You shouldn't set this below - ## interval. Maximum flush_interval will be flush_interval + flush_jitter - flush_interval = "10s" - ## Jitter the flush interval by a random amount. This is primarily to avoid - ## large write spikes for users running a large number of telegraf instances. - ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s - flush_jitter = "0s" - - ## Logging configuration: - ## Run telegraf in debug mode - debug = false - ## Run telegraf in quiet mode - quiet = false - ## Specify the log file name. The empty string means to log to stdout. - logfile = "/var/log/telegraf/telegraf.log" - - ## Override default hostname, if empty use os.Hostname() - hostname = "" - - -############################################################################### -# OUTPUTS # -############################################################################### - -# Configuration for influxdb server to send metrics to -[[outputs.influxdb]] - # The full HTTP or UDP endpoint URL for your InfluxDB instance. - # Multiple urls can be specified but it is assumed that they are part of the same - # cluster, this means that only ONE of the urls will be written to each interval. - # urls = ["udp://127.0.0.1:8089"] # UDP endpoint example - urls = ["{{INFLUXDB_URL}}"] # required - # The target database for metrics (telegraf will create it if not exists) - database = "{{DATABASE_NAME}}" # required - # Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h". - # note: using second precision greatly helps InfluxDB compression - precision = "s" - - ## Write timeout (for the InfluxDB client), formatted as a string. - ## If not provided, will default to 5s. 0s means no timeout (not recommended). - timeout = "5s" - # username = "telegraf" - # password = "metricsmetricsmetricsmetrics" - # Set the user agent for HTTP POSTs (can be useful for log differentiation) - # user_agent = "telegraf" - # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) - # udp_payload = 512 - - -############################################################################### -# 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 - ## 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 - - -# Read metrics about disk usage by mount point -[[inputs.disk]] - ## By default, telegraf gather stats for all mountpoints. - ## Setting mountpoints will restrict the stats to the specified mountpoints. - # mount_points = ["/"] - - ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually - ## present on /run, /var/run, /dev/shm or /dev). - 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"] - ## 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"] - -# Read metrics about memory usage -[[inputs.mem]] - # no configuration - -# # 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"] - -[[inputs.net_response]] - ## Protocol, must be "tcp" or "udp" - ## NOTE: because the "udp" protocol does not respond to requests, it requires - ## a send/expect string pair (see below). - protocol = "tcp" - ## Server address (default localhost) - address = "localhost:80" - ## Set timeout - timeout = "1s" - - ## Set read timeout (only used if expecting a response) - read_timeout = "1s" - - ## The following options are required for UDP checks. For TCP, they are - ## optional. The plugin will send the given string to the server and then - ## expect to receive the given 'expect' string back. - ## string sent to the server - # send = "ssh" - ## expected string in answer - # expect = "ssh" \ No newline at end of file diff --git a/test/services/ipendpoint/telegraf_ipendpoint.conf b/test/services/ipendpoint/telegraf_ipendpoint.conf new file mode 100644 index 0000000000000000000000000000000000000000..1fdd33a7b4c8eef188469cd9c94bcef746351ed4 --- /dev/null +++ b/test/services/ipendpoint/telegraf_ipendpoint.conf @@ -0,0 +1,80 @@ + +############################################################################### +# 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 + ## 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 + + +# Read metrics about disk usage by mount point +[[inputs.disk]] + ## By default, telegraf gather stats for all mountpoints. + ## Setting mountpoints will restrict the stats to the specified mountpoints. + # mount_points = ["/"] + + ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually + ## present on /run, /var/run, /dev/shm or /dev). + 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"] + ## 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"] + +# Read metrics about memory usage +[[inputs.mem]] + # no configuration + +# # 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/test/services/pytest/install.sh b/test/services/pytest/install.sh index 612fbc204dae5bab8d094886e2de5f6b770cf03f..ce998ad1deef418d05a721cce5cc20f3aa3bd098 100644 --- a/test/services/pytest/install.sh +++ b/test/services/pytest/install.sh @@ -24,7 +24,7 @@ #// #///////////////////////////////////////////////////////////////////////// apt-get update -apt-get install python3 python3-pip python-influxdb +apt-get -y install python3 python3-pip python-influxdb update-alternatives --install /usr/bin/python python /usr/bin/python3 10 pip3 install pytest pyyaml pip3 install --upgrade influxdb