Example :
QueueMessage="John,A001,$3000"
MessageID= ID:E4EMS-SERVER.1F0578DF8CA60:114
Now my QueueMessage has 3 more sub fields (say Name,PersonID,Salary). How should I change the config file of logstash accordingly to reflect these sub fields in kibana.
I think the best solution at this point is to parse out the remaining values using the Grok filter.
Assuming the QueueMessage has double quotes surrounding the string, the Grok filter would look like this:
grok {
match => ["QueueMessage","\"%{DATA:Name},%{DATA:PersonID},\$%{NUMBER:Salary:int}\""]
}
Note the int keyword after the salary, and also that we are not including the dollar sign in the parsed variable. This way, you will be able to use the salary value as a number in Kibana.
If you meant that the filter should be like this then i am not getting the required output.
QueueMessage=John
MessageID=A001
This is what i am getting. Also Name,PersonID and Salary fields are not created in my kibana.
Here "message" has 4 fields....John, A0001, $5000, ID:E4EMS-SERVER.E18578E50F61B:32
I am retrieving first 3 data values from Queue and 4th one is automatically generated.
Indirectly my "message" is made of only 2 fields "QueueMessage"( which has John, A0001, $5000) and "MessageID" (which is ID:E4EMS-SERVER.E18578E50F61B:32).
The whole point is there are sub fields in a field.
But this wont work if i want to select the whole message excluding MessageID.
I cant keep on select the fields present in my data right?
MessageID is generated by the system and other 3 fields are sent by an application.
MessageID is required only if there is error in the data sent.
This is my requirement.
Hope u got me. It's just like Message is composite attribute which has Name,PersonID,Salary.
First of all is it possible to include complex attributes and divide them in logstash config file?
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.