Skip to content

Commit

Permalink
set insecure tls
Browse files Browse the repository at this point in the history
  • Loading branch information
waisbrot committed Dec 27, 2023
1 parent 97da7d9 commit c0e0f8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metrics/influx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package metrics

import (
"context"
"crypto/tls"
"time"

influxdb "github.com/influxdata/influxdb-client-go/v2"
Expand All @@ -16,7 +17,7 @@ var invokeTime time.Time

func initInflux() {
influxClient = influxdb.NewClient(viper.GetString("influx.url"), viper.GetString("influx.token"))
influxdb.DefaultOptions().AddDefaultTag("application", "birdweather_digest")
influxdb.DefaultOptions().AddDefaultTag("application", "birdweather_digest").SetTLSConfig(&tls.Config{InsecureSkipVerify: true})
writeAPI = influxClient.WriteAPIBlocking(viper.GetString("influx.org"), viper.GetString("influx.bucket"))
produceMetrics = true
}
Expand Down

0 comments on commit c0e0f8c

Please sign in to comment.