[Influxdb]How to set up HTTPS with telegraf

telegraf是一套用go寫的agent,主要是在收集system and server的資料,

相當於ELK的logstash,但我個人認為telegraf更容易設定且耗用較少記憶體。

ELK我相信大家都不陌生,幾乎等同log server代名詞,而Elasticsearch(base on lucene)更是和快速或秒殺畫上等號,

由於我所使用grafana可以串接滿多datasource,而當時讓我決定接influxdb是因為高度壓縮、高寫入吞吐量和快速回應時間(擷取說明如下)

Over the last few weeks a few members of the InfluxData engineering and QA teams set out to compare the performance and features of InfluxDB and Elasticsearch for common time-series workloads, specifically looking at the rates of data ingestion, on-disk data compression, and query performance. InfluxDB outperformed Elasticsearch in all three tests with 8x greater write throughput, while using 4x less disk space when compared against Elastic’s time series optimized configuration, and delivering 3.5x to 7.5x faster response times for tested queries.

influxdb簡直就太適合來存放大量的log資料,且又可進行即時資料分析彙總處理(又和telegraf是兄弟),

ITG組合讓我覺得比ELK更省時(設定簡單)、省力(使用單純)同時又兼具效能~~~有點偏離主題~~~anyway

上一篇我們設定influxdb使用https,這篇就是要設定telegraf啟用https

修改 telegraf.conf

[[outputs.influxdb]] 

urls = ["https://192.168.1.103:1111"]

...

 ## Optional SSL Config
  #ssl_ca = "" ##請勿輸入
  #ssl_cert = ""  ##請勿輸入
  #ssl_key = ""  ##請勿輸入
  ## Use SSL but skip chain & host verification
  insecure_skip_verify = true

透過influxdb admin ui確認資料是否寫入正常

 

 

參考

Why does Cobe need a time series database?

Connect Telegraf to a secured InfluxDB instance

InfluxDB Markedly Outperforms Elasticsearch in Time-Series Data & Metrics Benchmark