From 6e76731b7e012acffe139e805ff376ec67c0722e Mon Sep 17 00:00:00 2001
From: Daniel Nelson <danielnelson@users.noreply.github.com>
Date: Fri, 28 Apr 2017 15:58:46 -0700
Subject: [PATCH] Don't log error creating database on connect (#2740)

closes #2739
---
 plugins/outputs/influxdb/influxdb.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/outputs/influxdb/influxdb.go b/plugins/outputs/influxdb/influxdb.go
index f0e13815..2dac7a00 100644
--- a/plugins/outputs/influxdb/influxdb.go
+++ b/plugins/outputs/influxdb/influxdb.go
@@ -132,7 +132,9 @@ func (i *InfluxDB) Connect() error {
 
 			err = c.Query("CREATE DATABASE " + i.Database)
 			if err != nil {
-				log.Println("E! Database creation failed: " + err.Error())
+				if !strings.Contains(err.Error(), "Status Code [403]") {
+					log.Println("I! Database creation failed: " + err.Error())
+				}
 				continue
 			}
 		}
-- 
GitLab