You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using a influxdb output configuration before I switched to 5.x where I configured the database name dynamically from a logstash event field:
output {
file {
path => "/tmp/%{[project]}.logstash.out2"
}
influxdb {
host => "influxdb"
# to use a database that uses the project code
db => "%{[project]}"
allow_time_override => true
measurement => "%{[businesstransaction]}"
exclude_fields => [ "businesstransaction", "@timestamp", "@version", "sequence", "message", "type", "project", "location"]
use_event_fields_for_data_points => true
}
}
This used to create a output file with the name of the field and also write to the database.
Now with 5.5. and the latest output plugin it seems that doesn't work anymore. The event field is present in the event and should be accessible, however it doesn't get resolved for setting the db property. The filename is still correct. I also tried with another filed (one that doesn't get excluded) - same story.
Not sure if that is a problem of logstash itself or of the output plugin. Logstash reports an error:
[WARN ][logstash.outputs.influxdb] Non recoverable exception while writing to InfluxDB {:exception=>#<InfluxDB::Error: {"error":"database not found: \"%{[project]}\""}
Any clue why this could happen?
The text was updated successfully, but these errors were encountered:
an here is the bug/reason for that: @db needs to be database in the below code (will create a pull request)
def dowrite(events, database)
begin
@influxdbClient.write_points(events, @time_precision, @retention_policy, **@db** )
rescue InfluxDB::AuthenticationError => ae
@logger.warn("Authentication Error while writing to InfluxDB", :exception => ae)
rescue InfluxDB::ConnectionError => ce
@logger.warn("Connection Error while writing to InfluxDB", :exception => ce)
rescue Exception => e
@logger.warn("Non recoverable exception while writing to InfluxDB", :exception => e)
end
end
Hi,
I was using a influxdb output configuration before I switched to 5.x where I configured the database name dynamically from a logstash event field:
This used to create a output file with the name of the field and also write to the database.
Now with 5.5. and the latest output plugin it seems that doesn't work anymore. The event field is present in the event and should be accessible, however it doesn't get resolved for setting the db property. The filename is still correct. I also tried with another filed (one that doesn't get excluded) - same story.
Not sure if that is a problem of logstash itself or of the output plugin. Logstash reports an error:
Any clue why this could happen?
The text was updated successfully, but these errors were encountered: