| 1 | { |
| 2 | "jsonSchema": { |
| 3 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | "title": "MongoDB collector configuration.", |
| 5 | "type": "object", |
| 6 | "properties": { |
| 7 | "update_every": { |
| 8 | "title": "Update every", |
| 9 | "description": "Data collection interval, measured in seconds.", |
| 10 | "type": "integer", |
| 11 | "minimum": 1, |
| 12 | "default": 1 |
| 13 | }, |
| 14 | "autodetection_retry": { |
| 15 | "title": "Detection retry", |
| 16 | "description": "Recheck interval in seconds. Zero means no recheck will be scheduled.", |
| 17 | "type": "integer", |
| 18 | "minimum": 0, |
| 19 | "default": 60 |
| 20 | }, |
| 21 | "uri": { |
| 22 | "title": "URI", |
| 23 | "description": "The MongoDB connection string in the [standard connection string format](https://www.mongodb.com/docs/manual/reference/connection-string/#std-label-connections-standard-connection-string-format).", |
| 24 | "type": "string", |
| 25 | "default": "mongodb://localhost:27017" |
| 26 | }, |
| 27 | "timeout": { |
| 28 | "title": "Timeout", |
| 29 | "description": "Timeout for queries, in seconds.", |
| 30 | "type": "number", |
| 31 | "minimum": 0.5, |
| 32 | "default": 1 |
| 33 | }, |
| 34 | "databases": { |
| 35 | "title": "Database selector", |
| 36 | "description": "Configuration for monitoring specific databases. If left empty, no [database stats](https://docs.mongodb.com/manual/reference/command/dbStats/) will be collected.", |
| 37 | "type": [ |
| 38 | "object", |
| 39 | "null" |
| 40 | ], |
| 41 | "properties": { |
| 42 | "includes": { |
| 43 | "title": "Include", |
| 44 | "description": "Include databases that match any of the specified include [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", |
| 45 | "type": [ |
| 46 | "array", |
| 47 | "null" |
| 48 | ], |
| 49 | "items": { |
| 50 | "title": "Pattern", |
| 51 | "type": "string" |
| 52 | }, |
| 53 | "uniqueItems": true |
| 54 | }, |
| 55 | "excludes": { |
| 56 | "title": "Exclude", |
| 57 | "description": "Exclude databases that match any of the specified exclude [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", |
| 58 | "type": [ |
| 59 | "array", |
| 60 | "null" |
| 61 | ], |
| 62 | "items": { |
| 63 | "title": "Pattern", |
| 64 | "type": "string" |
| 65 | }, |
| 66 | "uniqueItems": true |
| 67 | } |
| 68 | } |
| 69 | }, |
| 70 | "functions": { |
| 71 | "title": "Functions", |
| 72 | "description": "Configuration for Netdata functions exposed by this collector.", |
| 73 | "type": "object", |
| 74 | "properties": { |
| 75 | "top_queries": { |
| 76 | "title": "Top Queries", |
| 77 | "description": "Configuration for the top-queries function (MongoDB Profiler).", |
| 78 | "type": "object", |
| 79 | "properties": { |
| 80 | "disabled": { |
| 81 | "title": "Disabled", |
| 82 | "description": "Disable the top-queries function.", |
| 83 | "type": "boolean", |
| 84 | "default": false |
| 85 | }, |
| 86 | "timeout": { |
| 87 | "title": "Timeout", |
| 88 | "description": "Query timeout in seconds. Set to 0 to use the collector's timeout.", |
| 89 | "type": "number", |
| 90 | "minimum": 0 |
| 91 | }, |
| 92 | "limit": { |
| 93 | "title": "Limit", |
| 94 | "description": "Maximum number of queries to return. Set to 0 to use the default (500).", |
| 95 | "type": "integer", |
| 96 | "minimum": 0, |
| 97 | "maximum": 5000, |
| 98 | "default": 500 |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | }, |
| 104 | "vnode": { |
| 105 | "title": "Vnode", |
| 106 | "description": "Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes).", |
| 107 | "type": "string" |
| 108 | } |
| 109 | }, |
| 110 | "required": [ |
| 111 | "uri" |
| 112 | ] |
| 113 | }, |
| 114 | "uiSchema": { |
| 115 | "uiOptions": { |
| 116 | "fullPage": true |
| 117 | }, |
| 118 | "vnode": { |
| 119 | "ui:placeholder": "To use this option, first create a Virtual Node and then reference its name here." |
| 120 | }, |
| 121 | "autodetection_retry": { |
| 122 | "ui:help": "This option determines how frequently (in seconds) Netdata will retry data collection jobs that failed initially, with the value of 60 meaning it retries to start data collection jobs every 60 seconds, while setting it to 0 disables this retry mechanism entirely." |
| 123 | }, |
| 124 | "uri": { |
| 125 | "ui:placeholder": "mongodb://username:password@host:port" |
| 126 | }, |
| 127 | "timeout": { |
| 128 | "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)." |
| 129 | }, |
| 130 | "databases": { |
| 131 | "ui:help": "The logic for inclusion and exclusion is as follows: `(include1 OR include2) AND !(exclude1 OR exclude2)`." |
| 132 | }, |
| 133 | "functions": { |
| 134 | "top_queries": { |
| 135 | "disabled": { |
| 136 | "ui:help": "WARNING: Query text from MongoDB Profiler may contain unmasked literals (PII). Requires profiling to be enabled on target databases." |
| 137 | } |
| 138 | } |
| 139 | }, |
| 140 | "ui:flavour": "tabs", |
| 141 | "ui:options": { |
| 142 | "tabs": [ |
| 143 | { |
| 144 | "title": "Base", |
| 145 | "fields": [ |
| 146 | "update_every", |
| 147 | "autodetection_retry", |
| 148 | "uri", |
| 149 | "timeout", |
| 150 | "vnode" |
| 151 | ] |
| 152 | }, |
| 153 | { |
| 154 | "title": "Database stats", |
| 155 | "fields": [ |
| 156 | "databases" |
| 157 | ] |
| 158 | }, |
| 159 | { |
| 160 | "title": "Functions", |
| 161 | "fields": [ |
| 162 | "functions" |
| 163 | ] |
| 164 | } |
| 165 | ] |
| 166 | } |
| 167 | } |
| 168 | } |