master
md 181 lines 7.48 KB
Rendered Raw
1 <!--startmeta
2 custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/exporting/graphite/integrations/graphite.md"
3 meta_yaml: "https://github.com/netdata/netdata/edit/master/src/exporting/graphite/metadata.yaml"
4 sidebar_label: "Graphite"
5 learn_status: "Published"
6 learn_rel_path: "Exporting Metrics/Connectors"
7 keywords: ['exporter', 'graphite', 'remote write', 'time series']
8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE EXPORTER'S metadata.yaml FILE"
9 endmeta-->
10
11 # Graphite
12
13
14 <img src="https://netdata.cloud/img/graphite.png" width="150"/>
15
16
17 Use the Graphite connector for the exporting engine to archive your Netdata metrics to Graphite providers for long-term storage,
18 further analysis, or correlation with data from other sources.
19
20
21 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
22
23 ## Setup
24
25
26 ### Prerequisites
27
28 No action required.
29
30 ### Configuration
31
32 #### Options
33
34 The following options can be defined for this exporter.
35
36 <details open><summary>Config options</summary>
37
38
39
40 | Option | Description | Default | Required |
41 |:-----|:------------|:--------|:---------:|
42 | enabled | Enables or disables an exporting connector instance (yes/no). | no | yes |
43 | [destination](#option-destination) | 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. | no | yes |
44 | username | Username for HTTP authentication | my_username | no |
45 | password | Password for HTTP authentication | my_password | no |
46 | data source | Selects the kind of data that will be sent to the external database. (as collected/average/sum) | | no |
47 | hostname | The hostname to be used for sending data to the external database server. | [global].hostname | no |
48 | prefix | The prefix to add to all metrics. | netdata | no |
49 | [update every](#option-update-every) | Frequency of sending sending data to the external database, in seconds. | 10 | no |
50 | [buffer on failures](#option-buffer-on-failures) | The number of iterations (`update every` seconds) to buffer data, when the external database server is not available. | 10 | no |
51 | timeout ms | The timeout in milliseconds to wait for the external database server to process the data. | 20000 | no |
52 | [send hosts matching](#option-send-hosts-matching) | 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). | localhost * | no |
53 | [send charts matching](#option-send-charts-matching) | One or more space separated patterns (use * as wildcard) checked against both chart id and chart name. | * | no |
54 | [send names instead of ids](#option-send-names-instead-of-ids) | Controls the metric names Netdata should send to the external database (yes/no). | | no |
55 | send configured labels | Controls if host labels defined in the `[host labels]` section in `netdata.conf` should be sent to the external database (yes/no). | | no |
56 | send automatic labels | Controls if automatically created labels, like `_os_name` or `_architecture` should be sent to the external database (yes/no). | | no |
57
58 <a id="option-destination"></a>
59 ##### destination
60
61 The format of each item in this list, is: [PROTOCOL:]IP[:PORT].
62 - PROTOCOL can be udp or tcp. tcp is the default and only supported by the current exporting engine.
63 - 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.
64 - PORT can be a number of a service name. If omitted, the default port for the exporting connector will be used.
65
66 Example IPv4:
67 ```yaml
68 destination = 10.11.14.2:2003 10.11.14.3:4242 10.11.14.4:2003
69 ```
70 Example IPv6 and IPv4 together:
71 ```yaml
72 destination = [ffff:...:0001]:2003 10.11.12.1:2003
73 ```
74 When multiple servers are defined, Netdata will try the next one when the previous one fails.
75
76
77 <a id="option-update-every"></a>
78 ##### update every
79
80 Netdata will add some randomness to this number, to prevent stressing the external server when many Netdata servers
81 send data to the same database. This randomness does not affect the quality of the data, only the time they are sent.
82
83
84 <a id="option-buffer-on-failures"></a>
85 ##### buffer on failures
86
87 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).
88
89
90 <a id="option-send-hosts-matching"></a>
91 ##### send hosts matching
92
93 Includes one or more space separated patterns, using * as wildcard (any number of times within each pattern).
94 The patterns are checked against the hostname (the localhost is always checked as localhost), allowing us to
95 filter which hosts will be sent to the external database when this Netdata is a central Netdata aggregating multiple hosts.
96
97 A pattern starting with `!` gives a negative match. So to match all hosts named `*db*` except hosts containing `*child*`,
98 use `!*child* *db*` (so, the order is important: the first pattern matching the hostname will be used - positive or negative).
99
100
101 <a id="option-send-charts-matching"></a>
102 ##### send charts matching
103
104 A pattern starting with ! gives a negative match. So to match all charts named apps.* except charts ending in *reads,
105 use !*reads apps.* (so, the order is important: the first pattern matching the chart id or the chart name will be used,
106 positive or negative). There is also a URL parameter filter that can be used while querying allmetrics. The URL parameter
107 has a higher priority than the configuration option.
108
109
110 <a id="option-send-names-instead-of-ids"></a>
111 ##### send names instead of ids
112
113 Netdata supports names and IDs for charts and dimensions. Usually IDs are unique identifiers as read by the system and names
114 are human friendly labels (also unique). Most charts and metrics have the same ID and name, but in several cases they are
115 different : disks with device-mapper, interrupts, QoS classes, statsd synthetic charts, etc.
116
117
118
119 </details>
120
121
122
123 #### via File
124
125 The configuration file name for this integration is `exporting.conf`.
126
127
128 You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
129 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).
130
131 ```bash
132 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
133 sudo ./edit-config exporting.conf
134 ```
135
136 ##### Examples
137
138 ###### Example configuration
139
140 Basic configuration
141
142 ```yaml
143 [graphite:netdata]
144 enabled = yes
145 destination = localhost:2003
146
147 ```
148 ###### Configuration with HTTPS and HTTP authentication
149
150 Add `:https` modifier to the connector type if you need to use the TLS/SSL protocol. For example: `remote_write:https:my_instance`.
151
152 ```yaml
153 [graphite:netdata]
154 enabled = yes
155 destination = localhost:2003
156 username = my_username
157 password = my_password
158
159 ```
160 ###### Detailed Configuration for a remote, secure host
161
162 Add `:https` modifier to the connector type if you need to use the TLS/SSL protocol. For example: `remote_write:https:my_instance`.
163
164 ```yaml
165 [graphite:https:netdata]
166 enabled = yes
167 username = my_username
168 password = my_password
169 destination = 10.10.1.114:2003
170 # data source = average
171 # prefix = netdata
172 # hostname = my_hostname
173 # update every = 10
174 # buffer on failures = 10
175 # timeout ms = 20000
176 # send names instead of ids = yes
177 # send charts matching = *
178 # send hosts matching = localhost *
179
180 ```
181