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
Open
mouka99 opened this issue
Mar 24, 2021
· 1 comment
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:[email protected]: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:[email protected]:27017/Logs"
the same filter works fine when I ingest data in elasticsearch.
Please help, I need this for my end-of-studies project.
The text was updated successfully, but these errors were encountered:
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"
}
}
filter
{
grok {
match => { "message" => "^%{SYSLOGTIMESTAMP:syslog_timestamp} %{HOSTNAME:device_src} %%{CISCO_REASON:facility}-%{INT:severity_level}-%{CISCO_REASON:f>
}
}
output
{
stdout {
codec => dots
}
}
`
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:[email protected]:27017/Logs"
the same filter works fine when I ingest data in elasticsearch.
Please help, I need this for my end-of-studies project.
The text was updated successfully, but these errors were encountered: