-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 Events API Support #18061
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@zenmoto @djaglowski do you guys have any thoughts about adding this functionality? |
Seems reasonable to me. Would there be any sense to include this in the I also have to say, I really dislike the |
I believe the format of the data is fairly different but in essence I agree these are both logs and could/should be configurable in a ComparisonNormal Log {
"t": {
"$date": "2022-09-11T18:53:14.675+00:00"
},
"s": "I",
"c": "NETWORK",
"id": 22944,
"ctx": "conn35107",
"msg": "Connection ended",
"attr": {
"remote": "192.168.248.2:52066",
"uuid": "d3f4641a-14ca-4a24-b5bb-7d7b391a02e7",
"connectionId": 35107,
"connectionCount": 33
}
} Event JSON representation {
"created": "2018-06-04T19:19:00Z",
"eventTypeName": "HOST_NOW_PRIMARY",
"groupId": "5b478b3afc4625789ce616a3",
"hostname": "example-shard-0-abc0p.mongodb.net",
"id": "5b478c2562c892f9824cd990",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b478b3afc4625789ce616a3/events/5b478c2562c892f9824cd990",
"rel": "self"
}
],
"port": 27017,
"replicaSetName": "example-shard-0"
} I think the configuration parameters needed for the events to be functional:
So perhaps if we decided to incorporate it into the current logs configuration it could look like this receivers:
mongodbatlas:
public_key: <some-key>
private_key: <some-key>
logs:
enabled: true # can revisit potentially
projects:
- name: "project 1"
collect_audit_logs: true
events:
types: [HOST_RESTARTED, etc.] However it should be mentioned that the |
Ok, my inclination would be to just use a new config struct then. Ideally none of these distinct mechanisms for collection should share configs unless one is a clean superset of the other. |
I agree with keeping it in an events block. The log SIG has been talking about adding support for events- it's not ready yet, but these seem like they fit the criteria (named type, structured payload), so keeping them a little separate seems better to me. I also agree with @djaglowski about the |
Component(s)
receiver/mongodbatlas
Is your feature request related to a problem? Please describe.
Looking to add to the receiver to start collecting events from this API. This endpoint contains a multitude of types of information about
Host Restarts
,Replica set elected a new primary
,Alert configuration disabled
,Network: Bytes In has gone above 5000 bytes (avg/sec)
,User joined the project
, etc.I feel like this type of data would be useful for end users to use this data to track rapid restarts and potentially create alerts.
Describe the solution you'd like
I think a good solution for this is to add another section of configuration along with
alerts
,logs
, andmetrics
which could be calledevents
.I also think it nice to include a project filtering mechanism in the config along with an event type filtering on the type of event, by default all should be collected.
Example Configuration:
Describe alternatives you've considered
I thought about including this in the
alerts
portion but ultimately decided against it because not all these events are "alerts" but more info level information such as user additions, host restarts, etc.Additional context
I'm happy to start working on this and willing to be assigned if the feature is acceptable. Happy to hear further suggestions about configuration/overall usability.
The text was updated successfully, but these errors were encountered: