So here is my complete pipeline -
input {
appinsights {
type => "string"
query_interval_hours => 1
source => "requests"
key => "key here"
app_id => "app id here"
}
}
filter {
  split { field => "[tables][0][rows]" }
  mutate {
    add_field => {
      "%{[tables][0][columns][0][name]}" => "%{[tables][0][rows][0]}"
      "%{[tables][0][columns][1][name]}" => "%{[tables][0][rows][1]}"
    }
    remove_field => [ "tables" ]
  }
}
output {
  elasticsearch {
    hosts => ["elasticsearch:9200" ]
    user => "elastic"
    password => "pass here"
    index => "azure-appinsights-%{+YYYY.MM.dd}"
    template => "/usr/share/logstash/config/templates/appinsights.json"
    template_name => "appinsights"
    template_overwrite => true
    ssl => true
    cacert => "/usr/share/logstash/config/elastic-stack-ca.pem"
  }
}
The pipeline loads fine, but the index is created, contains no documents and goes into a red state.
The logstash logs say the following -
[2019-01-11T20:13:37,193][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,195][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,299][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,305][WARN ][org.logstash.FieldReference] Detected ambiguous Field Reference %{[tables][0][columns][0][name]}, which we expanded to the path [%{, tables, 0, columns, 0, name, }]; in a future release of Logstash, ambiguous Field References will not be expanded.
[2019-01-11T20:13:37,313][WARN ][org.logstash.FieldReference] Detected ambiguous Field Reference %{[tables][0][columns][1][name]}, which we expanded to the path [%{, tables, 0, columns, 1, name, }]; in a future release of Logstash, ambiguous Field References will not be expanded.
[2019-01-11T20:13:37,593][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,594][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,594][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,594][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,789][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,791][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,791][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,793][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,793][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:13:37,793][WARN ][logstash.filters.split   ] Only String and Array types are splittable. field:[tables][0][rows] is of type = NilClass
[2019-01-11T20:14:38,015][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 503 ({"type"=>"unavailable_shards_exception", "reason"=>"[azure-appinsights-2019.01.10][3] primary shard is not active Timeout: [1m],
I see a lot of logs with actual data but they are accompanied with a message that the primary shard is not active. I continue to suspect this is filter related. What do you think?