-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically infer beats based on the URL protocol #5
Comments
That's interesting suggestion! As for now, the config is basically The issue I see: in current implementation, say for mongo I can specify exact |
Yeah, the initial idea was to have generic queries which would ensure that On Monday, December 8, 2014, Alexander Beletsky [email protected]
Sent from a tiny keyboard device. Excuse any typos. |
Example (if pure JSON – leaner?): {
"users_database": {
"target": "mongodb://example.com/database",
"options": {
"query": "db.users.findOne({email: '[email protected]'})"
}
}
} Example (if JS): module.exports = {
users_database: {
target: "mongodb://example.com/database",
options: {
query: function (db, done) {
db.users.findOne({email: '[email protected]'}, done);
}
}
}
} Each |
As the title says, we could parse the given URLs and infer which beat to run. For example:
postgres://example.com/database
- would run a postgres beat with a default query (SELECT 1
, as the post on Extract beats and notifiers modules. #3 suggests);mongodb://example.com/database
- would run a mongodb beat with a query similar to postgres';http://example.com
- would run a GET;This could also simplify the config, as we could simply have something along these lines:
The text was updated successfully, but these errors were encountered: