-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/mongodbatlas] Add support for consuming logs #12347
Comments
I think the config and overview generally look good to me. I think the current behavior is that alerts are disabled by default, which I had done since I thought this use case (scraping actual logs) was what someone would assume would happen when placing the component in a logs pipeline. One question I have is if the logs should have some configurable polling interval, since this would be pull-based receiver, or does it make sense to have that hard-coded? (looks like the logs update every 5 minutes, so that would be the "default" interval). |
You're right I missed this. I'll update the proposal to reflect that. I still think it's possible to have alerts and logs active at the same time as long as the logs generated don't overlap/conflict. I don't think this is a real concern though.
I wanted to avoid specifying a polling interval in logging as I thought it would conflict with the overall scraper interval. The API documentation does recommend an interval of 5 minutes:
I was just going to hardcode this in to avoid confusion and it seems like a large enough interval that performance shouldn't be an issue. |
@zenmoto Pinging you as code owner if you have any objections to this. |
This looks great to me. |
Regarding the |
Thinking through this if you have an empty I'll follow up here once I get a better idea. |
I would expect it to work like this:
|
@djaglowski Makes sense. I prefer one I'm curious if there is a standard (or pattern) of exclude list, include list, or both across receivers? I know filelog has an I don't feel strongly enough to push back on this more wondering at this point if there's a standard. |
I'll update the config proposal to include both |
Not sure if there is a well established standard. Comparing this to |
Pinging code owners: @zenmoto |
This would be a Logging addition to the current MongoDB Atlas Receiver. To monitor logs for MongoDB Atlas you need to pull from the Logging API which returns a gzip of a log file. The SDK that is currently used in the receiver provides a LogsService to retrieve logs.
Following the current configuration split with metrics and alerts:
Config
The current metrics receiver monitors all projects within the organization. Since logs may grow much more than metrics in a system at scale the user must specify projects they wish to collect logs from via the
projects
list.As suggested by @djaglowski here's how
include_clusters
andexclude_clusters
would work:include_clusters
andexclude_clusters
are unspecified (the default) => Collect all clustersinclude_clusters
is specified => Only collect the named clustersexclude_clusters
is specified => Collect all but the named clustersinclude_clusters
andexclude_clusters
are specified => Config errorOverloading Logging Receiver
Since there is already a logs receiver for collecting alerts we'll have to implement a single logs receiver that will collect both alerts and logs using the same consumer. The logs collected from the logging API will have attributes that are unique from the alert generated logs.
Since we can reuse a lot of the client setup, and configuration values, in the current receiver this would mean adding a few functions to that receiver code that are geared towards collecting logs.
The text was updated successfully, but these errors were encountered: