From dbcc312b0e70a7758c37779f2fa88d2fa3239f51 Mon Sep 17 00:00:00 2001
From: Marko Crnic <mcrnic@reflected.net>
Date: Wed, 7 Sep 2016 23:16:51 +0200
Subject: [PATCH] haproxy: clarify handling of http and socket addresses

This behaviour was introduced along with socket support, but never got
documented properly.
---
 plugins/inputs/haproxy/haproxy.go | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/plugins/inputs/haproxy/haproxy.go b/plugins/inputs/haproxy/haproxy.go
index e56e65a5..6014b877 100644
--- a/plugins/inputs/haproxy/haproxy.go
+++ b/plugins/inputs/haproxy/haproxy.go
@@ -94,12 +94,15 @@ var sampleConfig = `
   ## An array of address to gather stats about. Specify an ip on hostname
   ## with optional port. ie localhost, 10.10.3.33:1936, etc.
   ## Make sure you specify the complete path to the stats endpoint
-  ## ie 10.10.3.33:1936/haproxy?stats
+  ## including the protocol, ie http://10.10.3.33:1936/haproxy?stats
   #
   ## If no servers are specified, then default to 127.0.0.1:1936/haproxy?stats
   servers = ["http://myhaproxy.com:1936/haproxy?stats"]
-  ## Or you can also use local socket
-  ## servers = ["socket:/run/haproxy/admin.sock"]
+  ##
+  ## You can also use local socket with standard wildcard globbing.
+  ## Server address not starting with 'http' will be treated as a possible
+  ## socket, so both examples below are valid.
+  ## servers = ["socket:/run/haproxy/admin.sock", "/run/haproxy/*.sock"]
 `
 
 func (r *haproxy) SampleConfig() string {
-- 
GitLab