Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
logstash-input-mongodb
Advanced tools
This is a plugin for Logstash.
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
This is a logstash plugin for pulling data out of mongodb and processing with logstash. It will connect to the database specified in uri
, use the collection
attribute to find collections to pull documents from, start at the first collection it finds and pull the number of documents specified in batch_size
, save it's progress in an sqlite database who's location is specified by placeholder_db_dir
and placeholder_db_name
and repeat. It will continue this until it no longer finds documents newer than ones that it has processed, sleep for a moment, then continue to loop over the collections.
This was designed for parsing logs that were written into mongodb. This means that it may not re-parse db entries that were changed and already parsed.
Logstash installed from ZIP | TGZ
Logstash from GIT
Name Type Description
uri [String] A MongoDB URI for your database or cluster (check the MongoDB documentation for further info on this) [No Default, Required]
placeholder_db_dir [String] Path where the place holder database will be stored locally to disk [No Default, Required]
This gets created by the plugin so the directory needs to be writeable by the user that logstash is running as
placeholder_db_name [String] Name of the database file that will be created [Default: logstash_sqlite.db]
collection [String] A regex that will be used to find desired collecitons. [No Default, Required]
generateId [Boolean] If true, this will add a field '_id' that contains the MongoDB Document id
batch_size [Int] Size of the batch of mongo documents to pull at a time [Default: 30]
parse_method [String] Built in parsing of the mongodb document object [Default: 'flatten']
dig_fields [Array] An array of fields that should employ the dig method
dig_dig_fields [Array] This provides a second level of hash flattening after the initial dig has been done
Example
input {
mongodb {
uri => 'mongodb://10.0.0.30/my-logs?ssl=true'
placeholder_db_dir => '/opt/logstash-mongodb/'
placeholder_db_name => 'logstash_sqlite.db'
collection => 'events_'
batch_size => 5000
}
}
filter {
date {
match => [ "logdate", "ISO8601" ]
}
}
output {
redis {
host => "localhost"
data_type => "list"
key => "logstash-mylogs"
}
}
The URI parameter is where you would specify all of your mongodb options including things like auth and SSL. You should use a connection string (URI) compatible with the mongodb spec.
For more information on MongoDB URI's please see the MongoDB documentation: https://docs.mongodb.org/v3.0/reference/connection-string/
FAQs
Unknown package
We found that logstash-input-mongodb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.