-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Bug report
Relevant telegraf.conf:
# Telegraf Configuration
[agent]
## Default data collection interval for all inputs
interval = "10s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will send metrics to outputs in batches of at
## most metric_batch_size metrics.
metric_batch_size = 1000
## For failed writes, telegraf will cache metric_buffer_limit metrics
## output, and will flush this buffer on a successful write. Oldest
## are dropped first when this buffer fills.
metric_buffer_limit = 10000
## Collection jitter is used to jitter the collection by a random
## Each plugin will sleep for a random time within jitter before
## This can be used to avoid many plugins querying things like sysfs
## same time, which can have a measurable effect on the system.
collection_jitter = "0s"
## Default flushing interval for all outputs. You shouldn't set this
## interval. Maximum flush_interval will be flush_interval +
flush_interval = "10s"
## Jitter the flush interval by a random amount. This is primarily to
## large write spikes for users running a large number of telegraf
## ie, a jitter of 5s and interval 10s means flushes will happen every
flush_jitter = "0s"
## Run telegraf in debug mode
debug = true
## Run telegraf in quiet mode
quiet = false
## Override default hostname, if empty use os.Hostname()
hostname = ""
## If set to true, do no set the "host" tag in the telegraf agent.
omit_hostname = false
[[outputs.influxdb]]
urls = ["http://172.20.0.4:30085","http://172.20.0.5:30085"] #
database = "telegraf" # required
retention_policy = "default"
write_consistency = "any"
timeout = "5s"
username = "test"
password = "test"
[[inputs.jolokia]]
context = "/jmx/jolokia"
[[inputs.jolokia.servers]]
host = "localhost"
port = "8080"
[[inputs.jolokia.metrics]]
name = "java.lang:type=Memory"
mbean = "java.lang:type=Memory,*"
[[inputs.jolokia.metrics]]
name = "class_count"
mbean = "java.lang:type=ClassLoading"
attribute = "LoadedClassCount,UnloadedClassCount,TotalLoadedClassCount"
System info:
[Include Telegraf version, operating system name, and other relevant details]
.13 and 1.0.0-beta3 result in same thing.
curl http://localhost:8080/jmx/jolokia/:
{"request":{"type":"version"},"value":{"agent":"1.3.2","protocol":"7.2","config":{"agentId":"10.244.1.14-13-510a39c3-servlet","agentType":"servlet"},"info":{"product":"jetty","vendor":"Eclipse","version":"9.3.z-SNAPSHOT"}},"timestamp":1470962452,"status":200}
Steps to reproduce:
- Run telegraf
Actual behavior:
2016/08/12 00:22:20 Attempting connection to output: influxdb
2016/08/12 00:22:20 Successfully connected to output: influxdb
2016/08/12 00:22:20 Starting Telegraf (version 1.0.0-beta3)
2016/08/12 00:22:20 Loaded outputs: influxdb
2016/08/12 00:22:20 Loaded inputs: jolokia
2016/08/12 00:22:20 Tags enabled: host=dev-60ern
2016/08/12 00:22:20 Agent Config: Interval:10s, Debug:true, Quiet:false, Hostname:"dev-60ern", Flush Interval:10s
Error handling response: Not expected status value in response body: 403
Error handling response: Not expected status value in response body: 403
Additional info:
Executing CURL seems to work and return a 200 response code
http://localhost:8080/jmx/jolokia/read/java.laang:type=Memory
{"request":{"mbean":"java.lang:type=Memory","type":"read"},"value":{"ObjectPendingFinalizationCount":0,"Verbose":true,"HeapMemoryUsage":{"init":247463936,"committed":239271936,"max":4260102144,"used":37482112},"NonHeapMemoryUsage":{"init":2555904,"committed":98787328,"max":1593835520,"used":97617856},"ObjectName":{"objectName":"java.lang:type=Memory"}},"timestamp":1470961302,"status":200}