Hello everyone :My error message is as follows
2017-05-04T07:29:50Z E! ERROR in input [inputs.rabbitmq]: Errors encountered: [Get http://127.0.0.1:5672/api/queues: malformed HTTP
response “AMQP\x00\x00\t\x01”], [Get http://127.0.0.1:5672/api/overview: malformed HTTP response “AMQP\x00\x00\t\x01”], [Get
http://127.0.0.1:5672/api/nodes: malformed HTTP response “AMQP\x00\x00\t\x01”]
My telegraf configuration is as follows:
[[inputs.rabbitmq]]
url = “http://127.0.0.1:5672”
Tag added to rabbitmq_overview series; deprecated: use tags
name = “”
Credentials
username = “guest”
password = “guest”
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
Optional request timeouts
ResponseHeaderTimeout, if non-zero, specifies the amount of time to wait
for a server’s response headers after fully writing the request.
header_timeout = “3s”
client_timeout specifies a time limit for requests made by this client.
Includes connection time, any redirects, and reading the response body.
client_timeout = “4s”
A list of nodes to pull metrics about. If not specified, metrics for
all nodes are gathered.
nodes = [“rabbit@mfh-PC”]
Please enlighten master Thanks very much!!!
This input uses the management plugin, once enabled this API is usually on port 15672.
This is the previous configuration:
[[inputs.rabbitmq]]
url = “http://localhost:15672”
Tag added to rabbitmq_overview series; deprecated: use tags
name = “”
Credentials
username = “guest”
password = “guest”
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
Optional request timeouts
ResponseHeaderTimeout, if non-zero, specifies the amount of time to wait
for a server’s response headers after fully writing the request.
header_timeout = “3s”
client_timeout specifies a time limit for requests made by this client.
Includes connection time, any redirects, and reading the response body.
client_timeout = “4s”
A list of nodes to pull metrics about. If not specified, metrics for
all nodes are gathered.
nodes = [“rabbit@mfh-PC”]
Log output:
2017-05-08T09:43:54Z D! Attempting connection to output: influxdb
2017-05-08T09:43:54Z D! Successfully connected to output: influxdb
2017-05-08T09:43:54Z I! Starting Telegraf (version 1.2.1)
2017-05-08T09:43:54Z I! Loaded outputs: influxdb
2017-05-08T09:43:54Z I! Loaded inputs: inputs.win_perf_counters inputs.rabbitmq
2017-05-08T09:43:54Z I! Tags enabled: host=mfh-PC
2017-05-08T09:43:54Z I! Agent Config: Interval:10s, Quiet:false, Hostname:“mfh-PC”, Flush Interval:10s
2017-05-08T09:44:10Z D! Output [influxdb] buffer fullness: 52 / 1000 metrics.
2017-05-08T09:44:10Z D! Output [influxdb] wrote batch of 52 metrics in 90.0052ms
2017-05-08T09:44:20Z D! Output [influxdb] buffer fullness: 44 / 1000 metrics.
Although there is no error, but there is no consumption of RabbitMQ news.
Can you give an example of configuration Thanks very much!
Luv
4
[[inputs.rabbitmq]]
url = "http://localhost:15672"
username = "guest"
password = "guest"
This worked for me. I enabled the management plugin at localhost:15672 and it worked.
Can you see stats at localhost:15672 in the browser ?
can we put array off rabbitmq servers in the url
[[inputs.rabbitmq]]
url=[“http://10.10.10.01:15672”,“http://10.10.10.02:15672”]
If not,
How can we achieve this work around?
daniel
6
You will want to define multiple plugins:
[[inputs.rabbitmq]]
url = "http://10.10.10.01:15672"
# .. snip ..
[[inputs.rabbitmq]]
url = "http://10.10.10.02:15672"
# .. snip ..