I recently installed Elastic Stack for the first time using the steps at Digital Ocean. I then followed the steps at the Azure Event Hubs plugin page to link logstash to an Azure event hub. This seemed to go okay, but nothing is showing up in kibana or even elasticsearch as far as I can tell.
So next I tried adding your output block verbatim and nothing happens. I assume that's because "indice" needs to be an actual indice and not just the word, but how do I know which indice? And how do I create the indices that azure_event_hub expects? Filebeats has a handy tool that does it, but I don't see anything similar for this plugin.
Does anyone have any solutions to this? It seems odd that the documentation tells me how to ingest the data, but not how to display it. Are there any other docs someone can point me to that might help?
For the benefit of any future viewers, yes, just naming an index will cause logstash to create and use that index. Here's the file I ended up with:
input {
azure_event_hubs {
config_mode => "advanced"
event_hubs => [
{ "eventhubentityname" => {
event_hub_connection => "Endpoint=sb://myeventhub.servicebus.windows.net/;SharedAccessKeyName=logstash;SharedAccessKey=myaccesskey;EntityPath=eventhubentityname"
}}
]
threads => 8
decorate_events => true
consumer_group => "logstash"
storage_connection => "DefaultEndpointsProtocol=https;AccountName=mystorageacct;AccountKey=mystorageacctkey;EndpointSuffix=core.windows.net"
type => "azure_event_hub"
}
}
# since I have multiple inputs going to ES, I use the type parameter to make sure only the event hub messages go to this index
output {
if [type] == "azure_event_hub" {
#stdout { }
elasticsearch {
action => "index"
hosts => ["http://localhost:9200" ]
index => "azure_event_hub"
}
}
}
Unfortunately this dumps all the useful info to a single 'message' field, so I still need to figure out how to make that doing something practical.
Thanks for the info badger, the json is nested and is a set of events under message. Using your filter above I get a list of records with several very long json strings that could be called event[0], event[1], etc. It looks like basically like this:
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.