Skip to content

Commit

Permalink
Wrapped up mongodb telegraf metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
chan-tim-sumo committed Jan 14, 2025
1 parent d1eb7d4 commit 9c33d36
Show file tree
Hide file tree
Showing 14 changed files with 535 additions and 123 deletions.
27 changes: 27 additions & 0 deletions .chloggen/chan-tim_mongodbMetrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: mongodbreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Added new mongodb metrics to acheive parity with Telegraf

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [37227]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
32 changes: 32 additions & 0 deletions receiver/mongodbreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ The number of write operations currently being processed.
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {writes} | Sum | Int | Cumulative | false |
### mongodb.cache.dirty.percent
The percentage of WiredTiger cache that is dirty.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Double |
### mongodb.cache.operations
The number of cache operations of the instance.
Expand All @@ -42,6 +50,14 @@ The number of cache operations of the instance.
| ---- | ----------- | ------ |
| type | The result of a cache request. | Str: ``hit``, ``miss`` |
### mongodb.cache.used.percent
The percentage of WiredTiger cache in use.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Double |
### mongodb.collection.count
The number of collections.
Expand Down Expand Up @@ -284,6 +300,14 @@ The total time spent performing operations.
| ---- | ----------- | ------ |
| operation | The MongoDB operation being counted. | Str: ``insert``, ``query``, ``update``, ``delete``, ``getmore``, ``command`` |
### mongodb.page_faults
The number of page faults.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {faults} | Sum | Int | Cumulative | true |
### mongodb.queries_per_sec
The number of queries executed per second.
Expand Down Expand Up @@ -366,6 +390,14 @@ The number of updates executed per second.
| ---- | ----------- | ---------- |
| {update}/s | Gauge | Double |
### mongodb.wtcache.bytes.read
The number of bytes read into the WiredTiger cache.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| By | Sum | Int | Cumulative | true |
## Optional Metrics
The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
Expand Down
16 changes: 16 additions & 0 deletions receiver/mongodbreceiver/internal/metadata/generated_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9c33d36

Please sign in to comment.