From ce3a57b3a1f70029260af57d4b684557d9a176b6 Mon Sep 17 00:00:00 2001
From: Robert Piotrowski <robert.piotrowski1@pg.edu.pl>
Date: Tue, 26 Nov 2024 21:46:11 +0100
Subject: [PATCH] Add backuDB to telegraf

---
 telegraf/etc/telegraf.conf | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/telegraf/etc/telegraf.conf b/telegraf/etc/telegraf.conf
index 55c7f45..fb9e693 100644
--- a/telegraf/etc/telegraf.conf
+++ b/telegraf/etc/telegraf.conf
@@ -76,6 +76,28 @@
   # user_agent = "telegraf"
   # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
   # udp_payload = 512
+# 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://localhost:8089"] # UDP endpoint example                                                      
+   urls = ["http://192.168.33.100:8087"] # required                                                              
+   # The target database for metrics (telegraf will create it if not exists)                                     
+   database = "sustronicsPilot3_3" # 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 = "telegraf"                                                                                         
+   # 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                                                                                           
+
 
 
 ###############################################################################
-- 
GitLab