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