master
yaml 151 lines 7.82 KB
Raw
1 # yamllint disable rule:line-length
2 ---
3 id: 'export-mongodb'
4 meta:
5 name: 'MongoDB'
6 link: 'https://www.mongodb.com/'
7 categories:
8 - export
9 icon_filename: 'mongodb.svg'
10 keywords:
11 - exporter
12 - MongoDB
13 overview:
14 exporter_description: |
15 Use the MongoDB connector for the exporting engine to archive your Agent's metrics to a MongoDB database
16 for long-term storage, further analysis, or correlation with data from other sources.
17 exporter_limitations: ''
18 setup:
19 prerequisites:
20 list:
21 - title: ''
22 description: |
23 - To use MongoDB as an external storage for long-term archiving, you should first [install](https://www.mongodb.com/docs/languages/c/c-driver/current/libmongoc/tutorials/obtaining-libraries/installing/#std-label-installing) libmongoc 1.7.0 or higher.
24 - Next, re-install Netdata from the source, which detects that the required library is now available.
25 configuration:
26 file:
27 name: 'exporting.conf'
28 options:
29 description: |
30 The following options can be defined for this exporter.
31 folding:
32 title: 'Config options'
33 enabled: true
34 list:
35 - name: 'enabled'
36 default_value: 'no'
37 description: 'Enables or disables an exporting connector instance (yes|no).'
38 required: true
39 - name: 'destination'
40 default_value: 'localhost'
41 description: 'Accepts a space separated list of hostnames, IPs (IPv4 and IPv6) and ports to connect to. Netdata will use the first available to send the metrics.'
42 required: true
43 detailed_description: |
44 The format of each item in this list, is: [PROTOCOL:]IP[:PORT].
45 - PROTOCOL can be udp or tcp. tcp is the default and only supported by the current exporting engine.
46 - IP can be XX.XX.XX.XX (IPv4), or [XX:XX...XX:XX] (IPv6). For IPv6 you can to enclose the IP in [] to separate it from the port.
47 - PORT can be a number of a service name. If omitted, the default port for the exporting connector will be used.
48
49 Example IPv4:
50 ```yaml
51 destination = 10.11.14.2:27017 10.11.14.3:4242 10.11.14.4:27017
52 ```
53 Example IPv6 and IPv4 together:
54 ```yaml
55 destination = [ffff:...:0001]:2003 10.11.12.1:2003
56 ```
57 When multiple servers are defined, Netdata will try the next one when the previous one fails.
58 - name: 'username'
59 default_value: 'my_username'
60 description: 'Username for HTTP authentication'
61 required: false
62 - name: 'password'
63 default_value: 'my_password'
64 description: 'Password for HTTP authentication'
65 required: false
66 - name: 'data source'
67 default_value: ''
68 description: 'Selects the kind of data that will be sent to the external database. (as collected|average|sum)'
69 required: false
70 - name: 'hostname'
71 default_value: '[global].hostname'
72 description: 'The hostname to be used for sending data to the external database server.'
73 required: false
74 - name: 'prefix'
75 default_value: 'Netdata'
76 description: 'The prefix to add to all metrics.'
77 required: false
78 - name: 'update every'
79 default_value: '10'
80 description: |
81 Frequency of sending sending data to the external database, in seconds.
82 required: false
83 detailed_description: |
84 Netdata will add some randomness to this number, to prevent stressing the external server when many Netdata servers
85 send data to the same database. This randomness does not affect the quality of the data, only the time they are sent.
86 - name: 'buffer on failures'
87 default_value: '10'
88 description: |
89 The number of iterations (`update every` seconds) to buffer data, when the external database server is not available.
90 required: false
91 detailed_description: |
92 If the server fails to receive the data after that many failures, data loss on the connector instance is expected (Netdata will also log it).
93 - name: 'timeout ms'
94 default_value: '2 * update_every * 1000'
95 description: 'The timeout in milliseconds to wait for the external database server to process the data.'
96 required: false
97 - name: 'send hosts matching'
98 default_value: 'localhost *'
99 description: |
100 Hosts filter. Determines which hosts will be sent to the external database. The syntax is [simple patterns](https://github.com/netdata/netdata/tree/master/src/libnetdata/simple_pattern#simple-patterns).
101 required: false
102 detailed_description: |
103 Includes one or more space separated patterns, using * as wildcard (any number of times within each pattern).
104 The patterns are checked against the hostname (the localhost is always checked as localhost), allowing us to
105 filter which hosts will be sent to the external database when this Netdata is a central Netdata aggregating multiple hosts.
106
107 A pattern starting with `!` gives a negative match. So to match all hosts named `*db*` except hosts containing `*child*`,
108 use `!*child* *db*` (so, the order is important: the first pattern matching the hostname will be used - positive or negative).
109 - name: 'send charts matching'
110 default_value: '*'
111 description: |
112 One or more space separated patterns (use * as wildcard) checked against both chart id and chart name.
113 required: false
114 detailed_description: |
115 A pattern starting with ! gives a negative match. So to match all charts named apps.* except charts ending in *reads,
116 use !*reads apps.* (so, the order is important: the first pattern matching the chart id or the chart name will be used,
117 positive or negative). There is also a URL parameter filter that can be used while querying allmetrics. The URL parameter
118 has a higher priority than the configuration option.
119 - name: 'send names instead of ids'
120 default_value: ''
121 description: 'Controls the metric names Netdata should send to the external database (yes|no).'
122 required: false
123 detailed_description: |
124 Netdata supports names and IDs for charts and dimensions. Usually IDs are unique identifiers as read by the system and names
125 are human friendly labels (also unique). Most charts and metrics have the same ID and name, but in several cases they are
126 different : disks with device-mapper, interrupts, QoS classes, statsd synthetic charts, etc.
127 - name: 'send configured labels'
128 default_value: ''
129 description: 'Controls if host labels defined in the `[host labels]` section in `netdata.conf` should be sent to the external database (yes|no).'
130 required: false
131 - name: 'send automatic labels'
132 default_value: ''
133 description: 'Controls if automatically created labels, like `_os_name` or `_architecture` should be sent to the external database (yes|no).'
134 required: false
135 examples:
136 folding:
137 enabled: true
138 title: ''
139 list:
140 - name: 'Basic configuration'
141 folding:
142 enabled: false
143 description: |
144 The default socket timeout depends on the exporting connector update interval.
145 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.
146 config: |
147 [mongodb:my_instance]
148 enabled = yes
149 destination = mongodb://<hostname>
150 database = your_database_name
151 collection = your_collection_name