I am getting messages from RabbitMQ with field name ResponseCode. Response code consist of short codes like , 00, 01, 02 and so on. I want to replace those values will full form. I have another json key:values pair file where all information is written related to those responsecodes. I am confuse how to achieve this use case.
One Condition is to use if condition of each Response code and replace with full Form but problem is that I have 500+ codes using that much if condition is difficult and wastage of processing power.
Need your help to resolve this problem? Is it possible?
Thanks for response sir, I have json file with this format,
{
"00":"Approved",
"01":"Error",
"02":"Pending"
}
and this file contains more than 500 codes.
How to read this file in logstash and compare with incoming field from RabbitMQ and replace codes with values in the files.
By using if condition we are performing like that. I am getting still confused about how to compare values in file and field, In Your code, we are getting field name and file path then what is function of destination?
Please read the documentation for this plugin as it will cover most of your questions. You can use Destination or Target for this if it meets your requirements.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.