graylog input doc tweaks

closes #1261
This commit is contained in:
Cameron Sparr 2016-06-01 18:44:18 +01:00
parent a4b36d12dd
commit f08a27be5d
3 changed files with 97 additions and 43 deletions

View File

@ -573,6 +573,23 @@
# # value = 'p-example'
# # Gather health check statuses from services registered in Consul
# [[inputs.consul]]
# ## Most of these values defaults to the one configured on a Consul's agent level.
# ## Optional Consul server address (default: "localhost")
# # address = "localhost"
# ## Optional URI scheme for the Consul server (default: "http")
# # scheme = "http"
# ## Optional ACL token used in every request (default: "")
# # token = ""
# ## Optional username used for request HTTP Basic Authentication (default: "")
# # username = ""
# ## Optional password used for HTTP Basic Authentication (default: "")
# # password = ""
# ## Optional data centre to query the health checks from (default: "")
# # datacentre = ""
# # Read metrics from one or many couchbase clusters
# [[inputs.couchbase]]
# ## specify servers via a url matching:
@ -700,6 +717,43 @@
# md5 = false
# # Read flattened metrics from one or more GrayLog HTTP endpoints
# [[inputs.graylog]]
# ## API endpoint, currently supported API:
# ##
# ## - multiple (Ex http://<host>:12900/system/metrics/multiple)
# ## - namespace (Ex http://<host>:12900/system/metrics/namespace/{namespace})
# ##
# ## For namespace endpoint, the metrics array will be ignored for that call.
# ## Endpoint can contain namespace and multiple type calls.
# ##
# ## Please check http://[graylog-server-ip]:12900/api-browser for full list
# ## of endpoints
# servers = [
# "http://[graylog-server-ip]:12900/system/metrics/multiple",
# ]
#
# ## Metrics list
# ## List of metrics can be found on Graylog webservice documentation.
# ## Or by hitting the the web service api at:
# ## http://[graylog-host]:12900/system/metrics
# metrics = [
# "jvm.cl.loaded",
# "jvm.memory.pools.Metaspace.committed"
# ]
#
# ## Username and password
# username = ""
# password = ""
#
# ## Optional SSL Config
# # ssl_ca = "/etc/telegraf/ca.pem"
# # ssl_cert = "/etc/telegraf/cert.pem"
# # ssl_key = "/etc/telegraf/key.pem"
# ## Use SSL but skip chain & host verification
# # insecure_skip_verify = false
# # Read metrics of haproxy, via socket or csv stats page
# [[inputs.haproxy]]
# ## An array of address to gather stats about. Specify an ip on hostname
@ -1405,20 +1459,6 @@
# stats = ["MAIN.cache_hit", "MAIN.cache_miss", "MAIN.uptime"]
# # Read metrics of ZFS from arcstats, zfetchstats and vdev_cache_stats
# [[inputs.zfs]]
# ## ZFS kstat path
# ## If not specified, then default is:
# kstatPath = "/proc/spl/kstat/zfs"
#
# ## By default, telegraf gather all zfs stats
# ## If not specified, then default is:
# kstatMetrics = ["arcstats", "zfetchstats", "vdev_cache_stats"]
#
# ## By default, don't gather zpool stats
# poolMetrics = false
# # Reads 'mntr' stats from one or many zookeeper servers
# [[inputs.zookeeper]]
# ## An array of address to gather stats about. Specify an ip or hostname

View File

@ -12,28 +12,37 @@ End Point can be a mixe of one multiple end point and several namespaces end p
Note: if namespace end point specified metrics array will be ignored for that call.
Sample configration
```
[[inputs.graylog]]
## API End Point, currently supported API:
## - multiple (Ex http://[graylog-server-ip]:12900/system/metrics/multiple)
## - namespace (Ex http://[graylog-server-ip]:12900/system/metrics/namespace/{namespace})
## Note if namespace end point specified metrics array will be ignored for that call.
## End point can contain namespace and multiple type calls
## Please check http://[graylog-server-ip]:12900/api-browser for full list end points
### Configuration:
```toml
# Read flattened metrics from one or more GrayLog HTTP endpoints
[[inputs.graylog]]
## API endpoint, currently supported API:
##
## - multiple (Ex http://<host>:12900/system/metrics/multiple)
## - namespace (Ex http://<host>:12900/system/metrics/namespace/{namespace})
##
## For namespace endpoint, the metrics array will be ignored for that call.
## Endpoint can contain namespace and multiple type calls.
##
## Please check http://[graylog-server-ip]:12900/api-browser for full list
## of endpoints
servers = [
"http://10.224.162.16:12900/system/metrics/multiple"
"http://[graylog-server-ip]:12900/system/metrics/multiple",
]
#Metrics define metric which will be pulled from GrayLog and reported to the defined Output
## Metrics list
## List of metrics can be found on Graylog webservice documentation.
## Or by hitting the the web service api at:
## http://[graylog-host]:12900/system/metrics
metrics = [
"jvm.cl.loaded",
"jvm.memory.pools.Metaspace.committed"
]
## Username and password
username = "put-username-here"
password = "put-password-here"
username = ""
password = ""
## Optional SSL Config
# ssl_ca = "/etc/telegraf/ca.pem"
@ -43,4 +52,4 @@ Sample configration
# insecure_skip_verify = false
```
Please refer to GrayLog metrics api browser for full metric end points http://10.224.162.16:12900/api-browser
Please refer to GrayLog metrics api browser for full metric end points http://host:12900/api-browser

View File

@ -85,27 +85,32 @@ func (c *RealHTTPClient) HTTPClient() *http.Client {
}
var sampleConfig = `
## API End Point, currently supported API:
## - multiple (Ex http://[graylog-server-ip]:12900/system/metrics/multiple)
## - namespace (Ex http://[graylog-server-ip]:12900/system/metrics/namespace/{namespace})
## Note if namespace end point specified metrics array will be ignored for that call.
## End point can contain namespace and multiple type calls
## Please check http://[graylog-server-ip]:12900/api-browser for full list end points
## API endpoint, currently supported API:
##
## - multiple (Ex http://<host>:12900/system/metrics/multiple)
## - namespace (Ex http://<host>:12900/system/metrics/namespace/{namespace})
##
## For namespace endpoint, the metrics array will be ignored for that call.
## Endpoint can contain namespace and multiple type calls.
##
## Please check http://[graylog-server-ip]:12900/api-browser for full list
## of endpoints
servers = [
"http://[graylog-server-ip]:12900/system/metrics/multiple",
]
## metrics list
## List of metrics can be found on Graylog webservice documentation
## Or by hitting the the web service api http://[graylog-host]:12900/system/metrics
## Metrics list
## List of metrics can be found on Graylog webservice documentation.
## Or by hitting the the web service api at:
## http://[graylog-host]:12900/system/metrics
metrics = [
"jvm.cl.loaded",
"jvm.memory.pools.Metaspace.committed"
]
## Username and password
username = "put-username-here"
password = "put-password-here"
username = ""
password = ""
## Optional SSL Config
# ssl_ca = "/etc/telegraf/ca.pem"