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
Failed to send event to MongoDB, retrying in 3 seconds {:event=>#<LogStash::Event:0x115d2456>, :exception=>#<Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x101bcedd @tag_sets=[], @server_selection_timeout=30, @options={:database=>"Logs", :user=>"username", :password=>"passwd"}>>} #78
I am trying to output log data from a local text file to mongodb:
`
input
{
file {
path => "/home/username/Data"
type => "cisco-asa"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
date {
match => ["syslog_timestamp", "MMM dd HH:mm:ss" ]
target => "@timestamp"
}
}
output
{
stdout {
codec => dots
}
mongodb {
id => "mongo-cisco"
collection => "Cisco ASA"
database => "Logs"
uri => "mongodb://username:passwd@db.ghdqe.mongodb.net:27017/Logs"
codec => "json"
}
}
`
logstash version: 7.11.1
When I add "+srv" to the uri, logstash shuts down immediately after startup yet the command I use to connect to the DB from the mongo shell is: mongo "mongodb+srv://username:passwd@db.ghdqe.mongodb.net:27017/Logs"
the same filter works fine when I ingest data in elasticsearch.
Please help, I need this for my end-of-studies project.