forked from netdata/netdata
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a MongoDB connector to the exporting engine (netdata#8416)
* Copy files from the MongoDB backend * Update the documentation * Rename functions in the MongoDB backend * Add the connector to the Netdata build * Add an initializer and a worker * Add specific configuration options * Initialize the connector * Add a ring buffer for inserting data to a MongoDB database * Add unit tests
- Loading branch information
Showing
19 changed files
with
806 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ SUBDIRS = \ | |
opentsdb \ | ||
prometheus \ | ||
aws_kinesis \ | ||
mongodb \ | ||
$(NULL) | ||
|
||
dist_noinst_DATA = \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
AUTOMAKE_OPTIONS = subdir-objects | ||
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in | ||
|
||
dist_noinst_DATA = \ | ||
README.md \ | ||
$(NULL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# MongoDB exporting connector | ||
|
||
You can use the MongoDB connector and the experimental [exporting engine](../README.md) to archive your agent's metrics | ||
to a MongoDB database for long-term storage, further analysis, or correlation with data from other sources. | ||
|
||
## Prerequisites | ||
|
||
To use MongoDB as an external storage for long-term archiving, you should first | ||
[install](http://mongoc.org/libmongoc/current/installing.html) `libmongoc` 1.7.0 or higher. Next, re-install Netdata | ||
from the source, which detects that the required library is now available. | ||
|
||
## Configuration | ||
|
||
To enable data exporting to a MongoDB database, run `./edit-config exporting.conf` | ||
in the Netdata configuration directory and set the following options: | ||
|
||
```conf | ||
[mongodb:my_instance] | ||
enabled = yes | ||
destination = mongodb://<hostname> | ||
database = your_database_name | ||
collection = your_collection_name | ||
``` | ||
|
||
You can find more information about the `destination` string URI format in the MongoDB | ||
[documentation](https://docs.mongodb.com/manual/reference/connection-string/) | ||
|
||
The default socket timeout depends on the exporting connector update interval. The timeout is 500 ms shorter than the | ||
interval (but not less than 1000 ms). You can alter the timeout using the `sockettimeoutms` MongoDB URI option. | ||
|
||
[](<>) |
Oops, something went wrong.