-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
20 lines (12 loc) · 912 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
AMQP to OpenTSDB
The format of message is assumed to be JSON (see my collectd json AMQP plugins)
{"datacenter":"east_coast","timestamp":12345678,"value":123.12,"metric":"some.metric.name","host":"127.0.0.1"}
It is assumed that each message contains plugin, time, value. All other JSON hash keys will be turned into tags for opentsdb.
Multiple metrics can be sent in one AMQP message, as long as each entry is seperated by a newline character (\n)
The program will attempt to randomly pick an AMQP broker and OpenTSDB endpoint if more than one specified in the command line options.
Command line options:
perl /usr/local/bin/amqp_consumer_opentsdb.pl \
--amqp_hosts amqp://user:pass@mq01:5672/monitoring,amqp://user:pass@mq02:5672/monitoring \
--amqp_exchanges metrics,metrics_amqp \
--amqp_queue_max_length 10000 \
--opentsdb_hosts opentsdb://127.0.0.1:4242,opentsdb://10.10.10.10:4242