diff --git a/README.md b/README.md index eccb53b..22a3971 100644 --- a/README.md +++ b/README.md @@ -104,12 +104,11 @@ docker volume create --driver local --opt type=none --opt device=/ --opt o=bind mantained by ansible myInfra.docker.promtail role -### telegraf +### Telegraf #### Setup & Update -``` bash -services/telegraf/docker-run.sh -``` + +mantained by ansible myInfra.docker.telegraf role ### nginx diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index 214bf67..f69513a 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -3,7 +3,6 @@ scriptPath="$(dirname "$(readlink -f "$0")")" doWork(){ apt update -y apt upgrade -y - $scriptPath/../services/telegraf/docker-run.sh $scriptPath/../services/code-server/docker-run.sh $scriptPath/../services/nginx/docker-run.sh $scriptPath/../services/wyoming-faster-whisper/docker-run.sh diff --git a/services/telegraf/config/telegraf.conf b/services/telegraf/config/telegraf.conf deleted file mode 100644 index fe95a0f..0000000 --- a/services/telegraf/config/telegraf.conf +++ /dev/null @@ -1,101 +0,0 @@ - [global_tags] - # dc = "us-east-1" # will tag all metrics with dc=us-east-1 - # rack = "1a" - ## Environment variables can be used as tags, and throughout the config file - # user = "$USER" - - - [agent] - hostname = "homesrv01" - omit_hostname = false - interval = "10s" - round_interval = true - metric_batch_size = 1000 - metric_buffer_limit = 10000 - collection_jitter = "0s" - flush_interval = "10s" - flush_jitter = "0s" - precision = "0s" - - - -# Output Configuration for telegraf agent -[[outputs.influxdb_v2]] - ## The URLs of the InfluxDB cluster nodes. - ## - ## Multiple URLs can be specified for a single cluster, only ONE of the - ## urls will be written to each interval. - ## urls exp: http://127.0.0.1:8086 - urls = ["http://influxdb01.lan:8086"] - ## Token for authentication. - token = "V9iMrHJvI42_KcV0tcH5X3DcUEhvFQdnX5JqlBiKRsHEZMDDZQYdtxIuXlGzQTofUiLXc_QJN1pjpqnM6Fr1ow==" - ## Organization is the name of the organization you wish to write to; must exist. - organization = "limbo" - ## Destination bucket to write into. - bucket = "telegraf" - insecure_skip_verify = true - - - [[inputs.docker]] - endpoint = "unix:///var/run/docker.sock" - gather_services = false - container_names = [] - source_tag = false - container_name_include = [] - container_name_exclude = [] - timeout = "5s" - perdevice = true - total = false - docker_label_include = [] - docker_label_exclude = [] - tag_env = ["JAVA_HOME", "HEAP_SIZE"] - -# 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 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", "iso9660", "overlay", "aufs", "squashfs"] - -[[inputs.diskio]] - -[[inputs.kernel]] - -[[inputs.mem]] - - # Get the number of processes and group them by status -[[inputs.processes]] - # no configuration - - -# Read metrics about swap memory usage -[[inputs.swap]] - # no configuration - - -# Read metrics about system load & uptime -[[inputs.system]] - # no configuration - - -# 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"] diff --git a/services/telegraf/docker-run.sh b/services/telegraf/docker-run.sh deleted file mode 100755 index 9c0dc6f..0000000 --- a/services/telegraf/docker-run.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash - -docker pull telegraf -docker container stop telegraf -docker container remove telegraf - -scriptPath="$(dirname "$(readlink -f "$0")")" - -docker run -d --name=telegraf \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v ${scriptPath}/config/telegraf.conf:/etc/telegraf/telegraf.conf \ - -v /:/hostfs:ro \ - -e HOST_ETC=/hostfs/etc \ - -e HOST_PROC=/hostfs/proc \ - -e HOST_SYS=/hostfs/sys \ - -e HOST_VAR=/hostfs/var \ - -e HOST_RUN=/hostfs/run \ - -e HOST_MOUNT_PREFIX=/hostfs \ - telegraf \ No newline at end of file