Unable to insert data to OpenTSDB


(Santiago) #1

Hello all:

I am trying to insert data from RabbitMQ to OpenTSDB. I can not see why is not inserting the data:
Metric opc_ignition.test has been created manually , but I have also set the option to create automatically.
Data sent to Rabbit is JSON formatted.
Also I have tested to insert the data manually using telnet with success
put opc_ignition.test 1356998400 42.5 sensor=ns_1_s__Demo__Meta_Refrigeration_Compressor1_pressureSuction

Appreciate your comments and help

Thanks

Data coming from RabbitMQ:
{"metric":"opc_ignition.test","timestamp":1356998400,"OPCValue":42.5,"tags":"sensor=ns_1_s__Demo__Meta_Refrigeration_Compressor1_pressureSuction"}

Logstash Config file:

input {
rabbitmq {
exclusive => false
host => 'xxx.xxx.xxx.xxx'
password => 'guest'
user => 'guest'
vhost => '/'
auto_delete => false
durable => true
exchange => "opc_ignition"
queue => "opc_data"
threads => 8}
}

output {
opentsdb {
debug => true
#host => 'localhost'
metrics => [
"{metric}",
"{timestamp}",
"{OPCvalue}",
"{tags}",
"{@version}",
"{@timestamp}"

    ]
}
stdout { codec => rubydebug }

}

Debug logger:

output received {:event=>{"metric"=>"opc_ignition.test", "timestamp"=>1356998400, "OPCValue"=>42.5, "tags"=>"sensor=ns_1_s__Demo__Meta_Refrigeration_Compressor1_pressureSuction", "@version"=>"1", "@timestamp"=>"2015-10-15T11:13:26.800Z"}, :level=>:debug, :file=>"(eval)", :line=>"25", :method=>"output_func"}
{
"metric" => "opc_ignition.test",
"timestamp" => 1356998400,
"OPCValue" => 42.5,
"tags" => "sensor=ns_1_s__Demo__Meta_Refrigeration_Compressor1_pressureSuction",
"@version" => "1",
"@timestamp" => "2015-10-15T11:13:26.800Z"
}


(system) #2