JustPaste.it

output{
if [measured_parameter] == "Energy" {
elasticsearch{
host => "localhost"
port => 9200
protocol => "http"
index => "multi_sensors"
index_type => "energy"

}

} else if [measured_parameter] == "Humidity" {

elasticsearch{
host => "localhost"
port => 9200
protocol => "http"
index => "sensors_param"
index_type => "humidity"

}

}


else if [measured_parameter] == "voltage" {

elasticsearch{
host => "localhost"
port => 9200
protocol => "http"
index => "sensors_param"
index_type => "voltage"

}
}

else if [measured_parameter] == "laser_power" {

elasticsearch{
host => "localhost"
port => 9200
protocol => "http"
index => "sensors_param"
index_type => "laser_power"

}
}
else if [measured_parameter] == "temperature" {

elasticsearch{
host => "localhost"
port => 9200
protocol => "http"
index => "sensors_param"
index_type => "temperature"

}
}

}#Output