diff --git a/.DS_Store b/.DS_Store index 527c640..4ecbdf1 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Angebot/Angebot Recdata.pdf b/Angebot/Angebot Recdata.pdf deleted file mode 100644 index b581cd2..0000000 Binary files a/Angebot/Angebot Recdata.pdf and /dev/null differ diff --git a/Angebot/V1.2_Windmessanlage.pdf b/Angebot/V1.2_Windmessanlage.pdf deleted file mode 100644 index 6958866..0000000 Binary files a/Angebot/V1.2_Windmessanlage.pdf and /dev/null differ diff --git a/Angebot/Windmessanlage.docx b/Angebot/Windmessanlage.docx deleted file mode 100644 index a2691f4..0000000 Binary files a/Angebot/Windmessanlage.docx and /dev/null differ diff --git a/Angebot/Windmessanlage.pdf b/Angebot/Windmessanlage.pdf deleted file mode 100644 index 2de896f..0000000 Binary files a/Angebot/Windmessanlage.pdf and /dev/null differ diff --git a/CAD/Display3D_Druck.FCStd b/CAD/Display3D_Druck.FCStd deleted file mode 100644 index 39f49ba..0000000 Binary files a/CAD/Display3D_Druck.FCStd and /dev/null differ diff --git a/CAD/DisplayHolder.FCStd b/CAD/DisplayHolder.FCStd deleted file mode 100644 index 74ae5a2..0000000 Binary files a/CAD/DisplayHolder.FCStd and /dev/null differ diff --git a/CAD/Halter_3D.stl b/CAD/Halter_3D.stl deleted file mode 100644 index ab49efe..0000000 Binary files a/CAD/Halter_3D.stl and /dev/null differ diff --git a/CAD/NWS_WMA_001_Feststellungsplate.pdf b/CAD/NWS_WMA_001_Feststellungsplate.pdf deleted file mode 100644 index 559a2a7..0000000 Binary files a/CAD/NWS_WMA_001_Feststellungsplate.pdf and /dev/null differ diff --git a/CAD/NWS_WMA_002_Bottom_Plate.pdf b/CAD/NWS_WMA_002_Bottom_Plate.pdf deleted file mode 100644 index 90a8ccd..0000000 Binary files a/CAD/NWS_WMA_002_Bottom_Plate.pdf and /dev/null differ diff --git a/CAD/NWS_WMA_003_Back_Plate.pdf b/CAD/NWS_WMA_003_Back_Plate.pdf deleted file mode 100644 index fc7c65d..0000000 Binary files a/CAD/NWS_WMA_003_Back_Plate.pdf and /dev/null differ diff --git a/CAD/NWS_WMA_004_Mounting_View.pdf b/CAD/NWS_WMA_004_Mounting_View.pdf deleted file mode 100644 index 763b8f6..0000000 Binary files a/CAD/NWS_WMA_004_Mounting_View.pdf and /dev/null differ diff --git a/CAD/NWS_WMA_005_Complete_View.pdf b/CAD/NWS_WMA_005_Complete_View.pdf deleted file mode 100644 index 0c0ab65..0000000 Binary files a/CAD/NWS_WMA_005_Complete_View.pdf and /dev/null differ diff --git a/Dokumentation/4.920x.00.000_ClimaSensor_US_V4.15_d.pdf b/Dokumentation/4.920x.00.000_ClimaSensor_US_V4.15_d.pdf deleted file mode 100644 index d697517..0000000 Binary files a/Dokumentation/4.920x.00.000_ClimaSensor_US_V4.15_d.pdf and /dev/null differ diff --git a/Dokumentation/HSE.pdf b/Dokumentation/HSE.pdf deleted file mode 100644 index 3c20833..0000000 Binary files a/Dokumentation/HSE.pdf and /dev/null differ diff --git a/Dokumentation/cpi-a070wr_en_02__34742.1498799123.1280.1280.png b/Dokumentation/cpi-a070wr_en_02__34742.1498799123.1280.1280.png deleted file mode 100644 index c918954..0000000 Binary files a/Dokumentation/cpi-a070wr_en_02__34742.1498799123.1280.1280.png and /dev/null differ diff --git a/Dokumentation/thiesclima_Wind-Clima-Sensor-US_09-04-2020.pdf b/Dokumentation/thiesclima_Wind-Clima-Sensor-US_09-04-2020.pdf deleted file mode 100644 index dcf4d47..0000000 Binary files a/Dokumentation/thiesclima_Wind-Clima-Sensor-US_09-04-2020.pdf and /dev/null differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..014aed4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Mateusz Trojak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Projektplanung/2020-04-02_Projektplanung.xlsx b/Projektplanung/2020-04-02_Projektplanung.xlsx deleted file mode 100644 index f92e63d..0000000 Binary files a/Projektplanung/2020-04-02_Projektplanung.xlsx and /dev/null differ diff --git a/Projektplanung/Projektplanung.xlsx b/Projektplanung/Projektplanung.xlsx deleted file mode 100644 index 7fe09dc..0000000 Binary files a/Projektplanung/Projektplanung.xlsx and /dev/null differ diff --git a/Software/Software/Display b/Software/Software/Display deleted file mode 160000 index 1bef531..0000000 --- a/Software/Software/Display +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1bef531c22f24741f22ebdd14f54375706acd3bb diff --git a/Software/Software/Sensor b/Software/Software/Sensor deleted file mode 160000 index fd94fd7..0000000 --- a/Software/Software/Sensor +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd94fd7377ddd09f092ef974bcfe693c35198dfc diff --git a/Software/Software/tig-stack b/Software/Software/tig-stack deleted file mode 160000 index dd77345..0000000 --- a/Software/Software/tig-stack +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd773459da6ff296c5e8f849c6ac48848a6b234f diff --git a/Worktree b/Worktree deleted file mode 160000 index d940de8..0000000 --- a/Worktree +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d940de8caa68d6364d0a810c285e9578c7a1f13c diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..78459b1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,60 @@ +grafana: + image: grafana/grafana:latest + ports: + - 3000:3000 + links: + - influxdb:influxdb + environment: + GF_SECURITY_ADMIN_USER: admin + GF_SECURITY_ADMIN_PASSWORD: admin + GF_SECURITY_SECRET_KEY: grafana + GF_USERS_ALLOW_SIGN_UP: "true" + GF_USERS_ALLOW_ORG_CREATE: "true" + GF_AUTH_ANONYMOUS_ENABLED: "true" + GF_AUTH_ANONYMOUS_ORG_NAME: grafana +# GF_DASHBOARDS_JSON_ENABLED: "true" +# GF_DASHBOARDS_JSON_PATH: /opt/grafana + volumes_from: + - grafana-data + restart: always + user: root + +grafana-data: + image: busybox + tty: true + volumes: + - /var/lib/grafana + - /var/log/grafana + - /var/lib/grafana/plugins + +influxdb: + build: ./influxdb/ + ports: + - 8083:8083 + - 8086:8086 + environment: + INFLUX_DATABASE: "telegraf" + INLFUX_ADMIN_USER: "grafana" + INFLUX_ADMIN_PASS: "grafana" + volumes_from: + - influxdb-data + +influxdb-data: + image: busybox + tty: true + volumes: + - /var/lib/influxdb + +telegraf: + build: ./telegraf/ + links: + - influxdb:influxdb + environment: + HOST_NAME: "telegraf" + INFLUXDB_HOST: "influxdb" + INFLUXDB_PORT: "8086" + DATABASE: "telegraf" + tty: true + volumes: + - /var/run/docker.sock:/var/run/docker.sock + privileged: true diff --git a/influxdb/Dockerfile b/influxdb/Dockerfile new file mode 100644 index 0000000..fd33e72 --- /dev/null +++ b/influxdb/Dockerfile @@ -0,0 +1,14 @@ +FROM influxdb:latest +MAINTAINER Mateusz Trojak +LABEL version="1.1" +LABEL description="InfluxDB docker image with custom setup" + +USER root + +ADD influxdb.template.conf /influxdb.template.conf + +ADD run.sh /run.sh +RUN chmod +x /run.sh + +CMD ["/run.sh"] + diff --git a/influxdb/influxdb.template.conf b/influxdb/influxdb.template.conf new file mode 100644 index 0000000..ed9c066 --- /dev/null +++ b/influxdb/influxdb.template.conf @@ -0,0 +1,122 @@ +reporting-disabled = false +bind-address = ":8088" + +[meta] + dir = "/var/lib/influxdb/meta" + retention-autocreate = true + logging-enabled = true + +[data] + dir = "/var/lib/influxdb/data" + engine = "tsm1" + wal-dir = "/var/lib/influxdb/wal" + wal-logging-enabled = true + query-log-enabled = true + cache-max-memory-size = 524288000 + cache-snapshot-memory-size = 26214400 + cache-snapshot-write-cold-duration = "1h0m0s" + compact-full-write-cold-duration = "24h0m0s" + max-points-per-block = 0 + max-series-per-database = 1000000 + trace-logging-enabled = false + +[coordinator] + write-timeout = "10s" + max-concurrent-queries = 0 + query-timeout = "0" + log-queries-after = "0" + max-select-point = 0 + max-select-series = 0 + max-select-buckets = 0 + +[retention] + enabled = true + check-interval = "30m0s" + +[shard-precreation] + enabled = true + check-interval = "10m0s" + advance-period = "30m0s" + +[admin] + enabled = true + bind-address = ":8083" + https-enabled = false + https-certificate = "/etc/ssl/influxdb.pem" + +[monitor] + store-enabled = true + store-database = "_internal" + store-interval = "10s" + +[subscriber] + enabled = true + http-timeout = "30s" + +[http] + enabled = true + bind-address = ":8086" + auth-enabled = false + log-enabled = true + write-tracing = false + https-enabled = false + https-certificate = "/etc/ssl/influxdb.pem" + https-private-key = "" + max-row-limit = 10000 + max-connection-limit = 0 + shared-secret = "" + realm = "InfluxDB" + +[[graphite]] + enabled = false + bind-address = ":2003" + database = "graphite" + retention-policy = "" + protocol = "tcp" + batch-size = 5000 + batch-pending = 10 + batch-timeout = "1s" + consistency-level = "one" + separator = "." + udp-read-buffer = 0 + +[[collectd]] + enabled = false + bind-address = ":25826" + database = "collectd" + retention-policy = "" + batch-size = 5000 + batch-pending = 10 + batch-timeout = "10s" + read-buffer = 0 + typesdb = "/usr/share/collectd/types.db" + +[[opentsdb]] + enabled = false + bind-address = ":4242" + database = "opentsdb" + retention-policy = "" + consistency-level = "one" + tls-enabled = false + certificate = "/etc/ssl/influxdb.pem" + batch-size = 1000 + batch-pending = 5 + batch-timeout = "1s" + log-point-errors = true + +[[udp]] + enabled = false + bind-address = ":8089" + database = "udp" + retention-policy = "" + batch-size = 5000 + batch-pending = 10 + read-buffer = 0 + batch-timeout = "1s" + precision = "" + +[continuous_queries] + log-enabled = true + enabled = true + run-interval = "1s" + diff --git a/influxdb/run.sh b/influxdb/run.sh new file mode 100644 index 0000000..c686f4d --- /dev/null +++ b/influxdb/run.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -m +CONFIG_TEMPLATE="/influxdb.template.conf" +CONFIG_FILE="/etc/influxdb/influxdb.conf" +CURR_TIMESTAMP=`date +%s` + +INFLUX_HOST="localhost" +INFLUX_API_PORT="8086" +[ "${INFLUX_ADMIN_USER}" = "" ] && + INFLUX_ADMIN_USER="grafana" +[ "${INFLUX_ADMIN_PASS}" = "" ] && + INFLUX_ADMIN_PASS="grafana" +[ "${INFLUX_DATABASE}" = "" ] && + JENKINS_BIN="telegraf" + +mv -v $CONFIG_FILE $CONFIG_FILE.$CURR_TIMESTAMP +cp -v $CONFIG_TEMPLATE $CONFIG_FILE + +exec influxd -config=$CONFIG_FILE 1>>/var/log/influxdb/influxdb.log 2>&1 & +sleep 5 + +USER_EXISTS=`influx -host=${INFLUX_HOST} -port=${INFLUX_API_PORT} -execute="SHOW USERS" | awk '{print $1}' | grep "${INFLUX_ADMIN_USER}" | wc -l` + +if [ -n ${USER_EXISTS} ] +then + influx -host=${INFLUX_HOST} -port=${INFLUX_API_PORT} -execute="CREATE USER ${INFLUX_ADMIN_USER} WITH PASSWORD '${INFLUX_ADMIN_PASS}' WITH ALL PRIVILEGES" + influx -host=${INFLUX_HOST} -port=${INFLUX_API_PORT} -username=${INFLUX_ADMIN_USER} -password="${INFLUX_ADMIN_PASS}" -execute="create database ${INFLUX_DATABASE}" + influx -host=${INFLUX_HOST} -port=${INFLUX_API_PORT} -username=${INFLUX_ADMIN_USER} -password="${INFLUX_ADMIN_PASS}" -execute="grant all PRIVILEGES on ${INFLUX_DATABASE} to ${INLFUX_ADMIN_USER}" +fi + +tail -f /var/log/influxdb/influxdb.log diff --git a/readme.md b/readme.md deleted file mode 100644 index a6ec748..0000000 --- a/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -#### WIND MESS ANLAGE BY NETWEBSYSTEMS® -##### BASIC INSTRUCTIONS FOR INSTALLATION FOR BEAGLEBONE - -###### 1. PREPARE BEAGLEBONE: -* 1.1 INSTALL O.S. -* 1.2 CONNECT THROUGH SSH (192.168.7.2)\ - - SSH password: Netweb4ever! -* 1.3 CONNECT TO WIFI -* 1.4 USE IFCONFIG TO CHECK IP AND USE THIS IP TO ACCESS REMOTELY -* 1.5 INSTALL 'minimalmodbus' and 'paho-mqtt' libraries WITH -H\ - sudo -H pip3 install minimalmodbus paho-mqtt -###### 2. PREPARE THE SENSOR: -* 2.1 OPEN THIES DEVICE UTILITY -* 2.2 LOG AS ADMIN KY04711, CS1 -* 2.3 CHANGE DUPLEX MODUS AND WIRING -* 2.4 SET TIME ZONE (TZ26) AND DAILY TIME UPDATE(RT03) -* 2.5 CHANGE TO MODBUS RTU INTERPRETER IN THE THIES DEVICE UTILITY -* 2.6 CONNECT THE SENSOR TO THE BEAGLEBONE (BR & YE = A, GR & WH = B, GRAY = GND) -###### 3. INSTALL THE SOFTWARE IN THE BEAGLEBONE -* 3.1 CLONE THE GIT REPOSITORY\ - $ git clone http://git.strawhat-solutions.de/NetWEB/Windmessanlage.git -* 3.2 CREATE THE WORKING DIRECTORY AND COPY FILES: -* 3.3 EDIT THE CONFIG.INI FILE - -###### 4. SET SERVICE AUTO-START -* 4.1 COPY SERVICE FILE INTO BEAGLE BONE SERVICE DIRECTORY\ - $ sudo cp /var/lib/cloud9/Windmessanlage/Software/Sensor/wma.service /lib/systemd/ -* 4.2 CREATE A SYMLINK in the /etc/systemd/system/ directory \ - $ sudo ln -s /lib/systemd/wma.service /etc/systemd/system/wma.service -* 4.3 RELOAD DAEMON, ENABLE AND START THE SERVICE - -###### 2. PREPARE DISPLAY: - -* 1.1 POWER UP DISPLAY\ - Connect the +24 and GND Wires to power up the Display -* 1.2 INSTALL 'pygame' and 'paho-mqtt' libraries WITH -H -* 1.3 CREATE CHANGE TO THE WORKING DIRECTORY\ - $ sudo mkdir /home/pi/WMA/\ - $ cd /home/pi/WMA/ -* 2.2 CLONE THE GIT REPOSITORY -* 2.3 EDIT THE CONFIG.INI FILE FOR THE APPLICATION\ - $ sudo nano /home/pi/WMA/Windmessanlage/Display/config.ini - -###### 3. SET SERVICE AUTO-START - -* 3.1 COPY SERVICE FILE INTO BEAGLE BONE SERVICE DIRECTORY\ - $ sudo cp /home/pi/WMA/Windmessanlage/Display/display.service /etc/systemd/system/display.service -* 3.2 RELOAD DAEMON, ENABLE AND START THE SERVICE\ \ No newline at end of file diff --git a/telegraf/Dockerfile b/telegraf/Dockerfile new file mode 100644 index 0000000..185a066 --- /dev/null +++ b/telegraf/Dockerfile @@ -0,0 +1,14 @@ +FROM telegraf:latest +MAINTAINER Mateusz Trojak +LABEL version="1.1" +LABEL description="Telegraf docker image with custom setup" + +USER root + +ADD telegraf.template.conf /telegraf.template.conf + +ADD run.sh /run.sh +RUN chmod +x /*.sh + +CMD ["/run.sh"] + diff --git a/telegraf/run.sh b/telegraf/run.sh new file mode 100644 index 0000000..2a14931 --- /dev/null +++ b/telegraf/run.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -m +CONFIG_TEMPLATE="/telegraf.template.conf" +CONFIG_FILE="/etc/telegraf/telegraf.conf" + +sed -e "s/\${HOST_NAME}/$HOST_NAME/" \ + -e "s!\${INFLUXDB_HOST}!$INFLUXDB_HOST!" \ + -e "s/\${INFLUXDB_PORT}/$INFLUXDB_PORT/" \ + -e "s/\${DATABASE}/$DATABASE/" \ + $CONFIG_TEMPLATE > $CONFIG_FILE + +echo "=> Starting Telegraf ..." + +exec telegraf --debug -config /etc/telegraf/telegraf.conf diff --git a/telegraf/telegraf.template.conf b/telegraf/telegraf.template.conf new file mode 100644 index 0000000..255bffa --- /dev/null +++ b/telegraf/telegraf.template.conf @@ -0,0 +1,581 @@ +# 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. +# +# Environment variables can be used anywhere in this config file, simply prepend +# them with $. For strings the variable must be within quotes (ie, "$STR_VAR"), +# for numbers and booleans they should be plain (ie, $INT_VAR, $BOOL_VAR) + +# Global tags can be specified here in key="value" format. +[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" + + +# Configuration for telegraf agent +[agent] + ## Default data collection interval for all inputs + interval = "1s" + ## Rounds collection interval to 'interval' + ## ie, if interval="10s" then always collect on :00, :10, :20, etc. + round_interval = true + + ## Telegraf will send metrics to outputs in batches of at + ## most metric_batch_size metrics. + metric_batch_size = 1000 + ## For failed writes, telegraf will cache metric_buffer_limit metrics for each + ## output, and will flush this buffer on a successful write. Oldest metrics + ## are dropped first when this buffer fills. + #metric_buffer_limit = 86000 + + ## 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" + + ## By default, precision will be set to the same timestamp order as the + ## collection interval, with the maximum being 1s. + ## Precision will NOT be used for service inputs, such as logparser and statsd. + ## Valid values are "ns", "us" (or "µs"), "ms", "s". + precision = "" + ## Run telegraf in debug mode + debug = true + ## Run telegraf in quiet mode + quiet = false + ## Override default hostname, if empty use os.Hostname() + hostname = "${HOST_NAME}" + ## If set to true, do no set the "host" tag in the telegraf agent. + omit_hostname = false + + +############################################################################### +# OUTPUT PLUGINS # +############################################################################### + +# 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 as part of the same cluster, + ## this means that only ONE of the urls will be written to each interval. + # urls = ["udp://localhost:8089"] # UDP endpoint example + urls = ["http://${INFLUXDB_HOST}:${INFLUXDB_PORT}"] # required + ## The target database for metrics (telegraf will create it if not exists). + #database = "sensordata" + + ## Retention policy to write to. Empty string writes to the default rp. + retention_policy = "" + ## Write consistency (clusters only), can be: "any", "one", "quorum", "all" + write_consistency = "any" + + ## 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 = "metricsnws" + ## 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 + + ## Optional SSL Config + # ssl_ca = "/etc/telegraf/ca.pem" + # ssl_cert = "/etc/telegraf/cert.pem" + # ssl_key = "/etc/telegraf/key.pem" + ## Use SSL but skip chain & host verification + # insecure_skip_verify = false + +# # Configuration for Amon Server to send metrics to. +# [[outputs.amon]] +# ## Amon Server Key +# server_key = "my-server-key" # required. +# +# ## Amon Instance URL +# amon_instance = "https://youramoninstance" # required +# +# ## Connection timeout. +# # timeout = "5s" + + +# # Configuration for the AMQP server to send metrics to +# [[outputs.amqp]] +# ## AMQP url +# url = "amqp://localhost:5672/influxdb" +# ## AMQP exchange +# exchange = "telegraf" +# ## Auth method. PLAIN and EXTERNAL are supported +# # auth_method = "PLAIN" +# ## Telegraf tag to use as a routing key +# ## ie, if this tag exists, it's value will be used as the routing key +# routing_tag = "host" +# +# ## InfluxDB retention policy +# # retention_policy = "default" +# ## InfluxDB database +# # database = "telegraf" +# ## InfluxDB precision +# # precision = "s" +# +# ## Optional SSL Config +# # ssl_ca = "/etc/telegraf/ca.pem" +# # ssl_cert = "/etc/telegraf/cert.pem" +# # ssl_key = "/etc/telegraf/key.pem" +# ## Use SSL but skip chain & host verification +# # insecure_skip_verify = false +# +# ## Data format to output. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md +# data_format = "influx" + + +# # Configuration for AWS CloudWatch output. +# [[outputs.cloudwatch]] +# ## Amazon REGION +# region = 'us-east-1' +# +# ## Amazon Credentials +# ## Credentials are loaded in the following order +# ## 1) Assumed credentials via STS if role_arn is specified +# ## 2) explicit credentials from 'access_key' and 'secret_key' +# ## 3) shared profile from 'profile' +# ## 4) environment variables +# ## 5) shared credentials file +# ## 6) EC2 Instance Profile +# #access_key = "" +# #secret_key = "" +# #token = "" +# #role_arn = "" +# #profile = "" +# #shared_credential_file = "" +# +# ## Namespace for the CloudWatch MetricDatums +# namespace = 'InfluxData/Telegraf' + + +# # Configuration for DataDog API to send metrics to. +# [[outputs.datadog]] +# ## Datadog API key +# apikey = "my-secret-key" # required. +# +# ## Connection timeout. +# # timeout = "5s" + + +# # Send telegraf metrics to file(s) +# [[outputs.file]] +# ## Files to write to, "stdout" is a specially handled file. +# files = ["stdout", "/tmp/metrics.out"] +# +# ## Data format to output. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md +# data_format = "influx" + + +# # Configuration for Graphite server to send metrics to +# [[outputs.graphite]] +# ## TCP endpoint for your graphite instance. +# ## If multiple endpoints are configured, output will be load balanced. +# ## Only one of the endpoints will be written to with each iteration. +# servers = ["localhost:2003"] +# ## Prefix metrics name +# prefix = "" +# ## Graphite output template +# ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md +# template = "host.tags.measurement.field" +# ## timeout in seconds for the write connection to graphite +# timeout = 2 + + +# # Send telegraf metrics to graylog(s) +# [[outputs.graylog]] +# ## Udp endpoint for your graylog instance. +# servers = ["127.0.0.1:12201", "192.168.1.1:12201"] + + +# # Configuration for sending metrics to an Instrumental project +# [[outputs.instrumental]] +# ## Project API Token (required) +# api_token = "API Token" # required +# ## Prefix the metrics with a given name +# prefix = "" +# ## Stats output template (Graphite formatting) +# ## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md#graphite +# template = "host.tags.measurement.field" +# ## Timeout in seconds to connect +# timeout = "2s" +# ## Display Communcation to Instrumental +# debug = false + + +# # Configuration for MQTT server to send metrics to +# [[outputs.mqtt]] +# servers = ["localhost:1883"] # required. +# +# ## MQTT outputs send metrics to this topic format +# ## "///" +# ## ex: prefix/web01.example.com/mem +# topic_prefix = "telegraf" +# +# ## username and password to connect MQTT server. +# # username = "telegraf" +# # password = "metricsmetricsmetricsmetrics" +# +# ## Optional SSL Config +# # ssl_ca = "/etc/telegraf/ca.pem" +# # ssl_cert = "/etc/telegraf/cert.pem" +# # ssl_key = "/etc/telegraf/key.pem" +# ## Use SSL but skip chain & host verification +# # insecure_skip_verify = false +# +# ## Data format to output. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md +# data_format = "influx" + + +############################################################################### +# INPUT PLUGINS # +############################################################################### +# # Read metrics from MQTT topic(s) +[[inputs.mqtt_consumer]] +servers = ["tcp://10.0.1.103:1883"] +# ## MQTT QoS, must be 0, 1, or 2 +qos = 1 +# +# ## Topics to subscribe to +topics = [ + "DPW/STR/BUILDING/WIND", + ] +# +# # if true, messages that can't be delivered while the subscriber is offline +# # will be delivered when it comes back (such as on service restart). +# # NOTE: if true, client_id MUST be set +persistent_session = true +# # If empty, a random client ID will be generated. +client_id = "telegraf_WMA2" +# +# ## username and password to connect MQTT server. + username = "telegraf" + password = "telegraf" +# +# ## Optional SSL Config +# # ssl_ca = "/etc/telegraf/ca.pem" +# # ssl_cert = "/etc/telegraf/cert.pem" +# # ssl_key = "/etc/telegraf/key.pem" +# ## Use SSL but skip chain & host verification +# # insecure_skip_verify = false +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md + data_format = "json" + json_time_key = "time" + json_time_format = "2006-01-02 15:04:05" + + +# 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 + ## Comment this line if you want the raw CPU time metrics +## fielddrop = ["time_*"] + + +# 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"] + + +# 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 + + +# Get kernel statistics from /proc/stat +#[[inputs.kernel]] + # no configuration + + +# Read metrics about memory usage +#[[inputs.mem]] + # no configuration + + +# 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 stats from aerospike server(s) +# [[inputs.aerospike]] +# ## Aerospike servers to connect to (with port) +# ## This plugin will query all namespaces the aerospike +# ## server has configured and get stats for them. +# servers = ["localhost:3000"] + + +# # Read Apache status information (mod_status) +# [[inputs.apache]] +# ## An array of Apache status URI to gather stats. +# ## Default is "http://localhost/server-status?auto". +# urls = ["http://localhost/server-status?auto"] + + +# # Read InfluxDB-formatted JSON metrics from one or more HTTP endpoints +# [[inputs.influxdb]] +# ## Works with InfluxDB debug endpoints out of the box, +# ## but other services can use this format too. +# ## See the influxdb plugin's README for more details. +# +# ## Multiple URLs from which to read InfluxDB-formatted JSON +# ## Default is "http://localhost:8086/debug/vars". +# urls = [ +# "http://localhost:8086/debug/vars" +# ] + + +############################################################################### +# SERVICE INPUT PLUGINS # +############################################################################### + +# # Read metrics from Kafka topic(s) +# [[inputs.kafka_consumer]] +# ## topic(s) to consume +# topics = ["telegraf"] +# ## an array of Zookeeper connection strings +# zookeeper_peers = ["localhost:2181"] +# ## Zookeeper Chroot +# zookeeper_chroot = "" +# ## the name of the consumer group +# consumer_group = "telegraf_metrics_consumers" +# ## Offset (must be either "oldest" or "newest") +# offset = "oldest" +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md +# data_format = "influx" + + +# # Stream and parse log file(s). +# [[inputs.logparser]] +# ## Log files to parse. +# ## These accept standard unix glob matching rules, but with the addition of +# ## ** as a "super asterisk". ie: +# ## /var/log/**.log -> recursively find all .log files in /var/log +# ## /var/log/*/*.log -> find all .log files with a parent dir in /var/log +# ## /var/log/apache.log -> only tail the apache log file +# files = ["/var/log/apache/access.log"] +# ## Read file from beginning. +# from_beginning = false +# +# ## Parse logstash-style "grok" patterns: +# ## Telegraf built-in parsing patterns: https://goo.gl/dkay10 +# [inputs.logparser.grok] +# ## This is a list of patterns to check the given log file(s) for. +# ## Note that adding patterns here increases processing time. The most +# ## efficient configuration is to have one pattern per logparser. +# ## Other common built-in patterns are: +# ## %{COMMON_LOG_FORMAT} (plain apache & nginx access logs) +# ## %{COMBINED_LOG_FORMAT} (access logs + referrer & agent) +# patterns = ["%{COMBINED_LOG_FORMAT}"] +# ## Name of the outputted measurement name. +# measurement = "apache_access_log" +# ## Full path(s) to custom pattern files. +# custom_pattern_files = [] +# ## Custom patterns can also be defined here. Put one pattern per line. +# custom_patterns = ''' +# ''' + + + +# # Read metrics from NATS subject(s) +# [[inputs.nats_consumer]] +# ## urls of NATS servers +# servers = ["nats://localhost:4222"] +# ## Use Transport Layer Security +# secure = false +# ## subject(s) to consume +# subjects = ["telegraf"] +# ## name a queue group +# queue_group = "telegraf_consumers" +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md +# data_format = "influx" + + +# # Read NSQ topic for metrics. +# [[inputs.nsq_consumer]] +# ## An string representing the NSQD TCP Endpoint +# server = "localhost:4150" +# topic = "telegraf" +# channel = "consumer" +# max_in_flight = 100 +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md +# data_format = "influx" + + +# # Statsd Server +# [[inputs.statsd]] +# ## Address and port to host UDP listener on +# service_address = ":8125" +# ## Delete gauges every interval (default=false) +# delete_gauges = false +# ## Delete counters every interval (default=false) +# delete_counters = false +# ## Delete sets every interval (default=false) +# delete_sets = false +# ## Delete timings & histograms every interval (default=true) +# delete_timings = true +# ## Percentiles to calculate for timing & histogram stats +# percentiles = [90] +# +# ## separator to use between elements of a statsd metric +# metric_separator = "_" +# +# ## Parses tags in the datadog statsd format +# ## http://docs.datadoghq.com/guides/dogstatsd/ +# parse_data_dog_tags = false +# +# ## Statsd data translation templates, more info can be read here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#graphite +# # templates = [ +# # "cpu.* measurement*" +# # ] +# +# ## Number of UDP messages allowed to queue up, once filled, +# ## the statsd server will start dropping packets +# allowed_pending_messages = 10000 +# +# ## Number of timing/histogram values to track per-measurement in the +# ## calculation of percentiles. Raising this limit increases the accuracy +# ## of percentiles but also increases the memory usage and cpu time. +# percentile_limit = 1000 + + +# # Stream a log file, like the tail -f command +# [[inputs.tail]] +# ## files to tail. +# ## These accept standard unix glob matching rules, but with the addition of +# ## ** as a "super asterisk". ie: +# ## "/var/log/**.log" -> recursively find all .log files in /var/log +# ## "/var/log/*/*.log" -> find all .log files with a parent dir in /var/log +# ## "/var/log/apache.log" -> just tail the apache log file +# ## +# ## See https://github.com/gobwas/glob for more examples +# ## +# files = ["/var/mymetrics.out"] +# ## Read file from beginning. +# from_beginning = false +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md +# data_format = "influx" + + +# # Generic TCP listener +# [[inputs.tcp_listener]] +# ## Address and port to host TCP listener on +# service_address = ":8094" +# +# ## Number of TCP messages allowed to queue up. Once filled, the +# ## TCP listener will start dropping packets. +# allowed_pending_messages = 10000 +# +# ## Maximum number of concurrent TCP connections to allow +# max_tcp_connections = 250 +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md +# data_format = "influx" + + +# # Generic UDP listener +# [[inputs.udp_listener]] +# ## Address and port to host UDP listener on +# service_address = ":8092" +# +# ## Number of UDP messages allowed to queue up. Once filled, the +# ## UDP listener will start dropping packets. +# allowed_pending_messages = 10000 +# +# ## Data format to consume. +# ## Each data format has it's own unique set of configuration options, read +# ## more about them here: +# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md +# data_format = "influx" + + +# # A Webhooks Event collector +# [[inputs.webhooks]] +# ## Address and port to host Webhook listener on +# service_address = ":1619" +# +# [inputs.webhooks.github] +# path = "/github" +# +# [inputs.webhooks.mandrill] +# path = "/mandrill" +# +# [inputs.webhooks.rollbar] +# path = "/rollbar" +