influxdata / influxdata/telegraf

MongoDb: Adding availability to call function for collecting user specific metrics

Open
#11,312 5 comments 0 reactions 0 assignees View on GitHub
area/mongodb feature request help wanted size/l
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

## Feature Request

Opening a feature request kicks off a discussion.

### Proposal:
For collecting user specific metrics it's very usfull call user defined function in MondoDb

### Current behavior:
For Now, MongoDb plugin can not call user function;

### Desired behavior:
For example, like in redis plugin realized it:

```
## Optional. Specify redis commands to retrieve values
# [[inputs.redis.commands]]
# # The command to run where each argument is a separate element
# command = ["get", "sample-key"]
# # The field to store the result in
# field = "sample-key-value"
# # The type of the result
# # Can be "string", "integer", or "float"
# type = "string"

```

### Use case:

1. To get different metrics (which not realized in base mongodb plugin ) based on rs.status()
2. To get business metrics based on user's collection data.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing MongoDB plugin and the Redis plugin's command support, which the issue uses as its example. Clarify the configuration and metric behavior needed for user-defined MongoDB functions, including rs.status() and collection-based business metrics; done means the requested metrics can be collected through the plugin.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, mongodb
Domain
databases, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.