summaryrefslogtreecommitdiffstats
path: root/src/go/plugin/go.d/modules/mongodb/config_schema.json
blob: fc5c42eff5452913c8e649629e43e332f73275a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
  "jsonSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "MongoDB collector configuration.",
    "type": "object",
    "properties": {
      "update_every": {
        "title": "Update every",
        "description": "Data collection interval, measured in seconds.",
        "type": "integer",
        "minimum": 1,
        "default": 1
      },
      "uri": {
        "title": "URI",
        "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).",
        "type": "string",
        "default": "mongodb://localhost:27017"
      },
      "timeout": {
        "title": "Timeout",
        "description": "Timeout for queries, in seconds.",
        "type": "number",
        "minimum": 0.5,
        "default": 1
      },
      "databases": {
        "title": "Database selector",
        "description": "Configuration for monitoring specific databases. If left empty, no [database stats](https://docs.mongodb.com/manual/reference/command/dbStats/) will be collected.",
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "includes": {
            "title": "Include",
            "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).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "title": "Pattern",
              "type": "string"
            },
            "uniqueItems": true
          },
          "excludes": {
            "title": "Exclude",
            "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).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "title": "Pattern",
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      }
    },
    "required": [
      "uri"
    ],
    "additionalProperties": false,
    "patternProperties": {
      "^name$": {}
    }
  },
  "uiSchema": {
    "uiOptions": {
      "fullPage": true
    },
    "uri": {
      "ui:placeholder": "mongodb://username:password@host:port"
    },
    "timeout": {
      "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
    },
    "databases": {
      "ui:help": "The logic for inclusion and exclusion is as follows: `(include1 OR include2) AND !(exclude1 OR exclude2)`."
    },
    "ui:flavour": "tabs",
    "ui:options": {
      "tabs": [
        {
          "title": "Base",
          "fields": [
            "update_every",
            "uri",
            "timeout"
          ]
        },
        {
          "title": "Database stats",
          "fields": [
            "databases"
          ]
        }
      ]
    }
  }
}