diff options
Diffstat (limited to '')
l--------- | src/exporting/pubsub/README.md (renamed from exporting/pubsub/README.md) | 0 | ||||
-rw-r--r-- | src/exporting/pubsub/integrations/google_cloud_pub_sub.md (renamed from exporting/pubsub/integrations/google_cloud_pub_sub.md) | 10 | ||||
-rw-r--r-- | src/exporting/pubsub/metadata.yaml | 152 | ||||
-rw-r--r-- | src/exporting/pubsub/pubsub.c (renamed from exporting/pubsub/pubsub.c) | 0 | ||||
-rw-r--r-- | src/exporting/pubsub/pubsub.h (renamed from exporting/pubsub/pubsub.h) | 0 | ||||
-rw-r--r-- | src/exporting/pubsub/pubsub_publish.cc (renamed from exporting/pubsub/pubsub_publish.cc) | 0 | ||||
-rw-r--r-- | src/exporting/pubsub/pubsub_publish.h (renamed from exporting/pubsub/pubsub_publish.h) | 0 |
7 files changed, 157 insertions, 5 deletions
diff --git a/exporting/pubsub/README.md b/src/exporting/pubsub/README.md index 8633f1725..8633f1725 120000 --- a/exporting/pubsub/README.md +++ b/src/exporting/pubsub/README.md diff --git a/exporting/pubsub/integrations/google_cloud_pub_sub.md b/src/exporting/pubsub/integrations/google_cloud_pub_sub.md index c24833146..ce2ba2865 100644 --- a/exporting/pubsub/integrations/google_cloud_pub_sub.md +++ b/src/exporting/pubsub/integrations/google_cloud_pub_sub.md @@ -1,9 +1,9 @@ <!--startmeta -custom_edit_url: "https://github.com/netdata/netdata/edit/master/exporting/pubsub/README.md" -meta_yaml: "https://github.com/netdata/netdata/edit/master/exporting/pubsub/metadata.yaml" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/exporting/pubsub/README.md" +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/exporting/pubsub/metadata.yaml" sidebar_label: "Google Cloud Pub Sub" learn_status: "Published" -learn_rel_path: "Exporting" +learn_rel_path: "Exporting Metrics" message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE EXPORTER'S metadata.yaml FILE" endmeta--> @@ -39,7 +39,7 @@ The configuration file name for this integration is `exporting.conf`. You can edit the configuration file using the `edit-config` script from the -Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). +Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration.md#the-netdata-config-directory). ```bash cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata @@ -64,7 +64,7 @@ The following options can be defined for this exporter. | update every | Frequency of sending sending data to the external database, in seconds. | 10 | no | | buffer on failures | The number of iterations (`update every` seconds) to buffer data, when the external database server is not available. | 10 | no | | timeout ms | The timeout in milliseconds to wait for the external database server to process the data. | 2 * update_every * 1000 | no | -| 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/libnetdata/simple_pattern#simple-patterns). | localhost * | no | +| 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 | | send charts matching | One or more space separated patterns (use * as wildcard) checked against both chart id and chart name. | * | no | | send names instead of ids | Controls the metric names Netdata should send to the external database (yes/no). | | no | | 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 | diff --git a/src/exporting/pubsub/metadata.yaml b/src/exporting/pubsub/metadata.yaml new file mode 100644 index 000000000..48ec02c47 --- /dev/null +++ b/src/exporting/pubsub/metadata.yaml @@ -0,0 +1,152 @@ +# yamllint disable rule:line-length +--- +id: 'export-google-pubsub' +meta: + name: 'Google Cloud Pub Sub' + link: 'https://cloud.google.com/pubsub' + categories: + - export + icon_filename: 'pubsub.png' +keywords: + - exporter + - Google Cloud + - Pub Sub +overview: + exporter_description: | + Export metrics to Google Cloud Pub/Sub Service + exporter_limitations: '' +setup: + prerequisites: + list: + - title: '' + description: | + - First [install](https://github.com/googleapis/google-cloud-cpp/) install Google Cloud Platform C++ Client Libraries + - Pub/Sub support is also dependent on the dependencies of those libraries, like `protobuf`, `protoc`, and `grpc` + - Next, Netdata should be re-installed from the source. The installer will detect that the required libraries are now available. + configuration: + file: + name: 'exporting.conf' + options: + description: | + The following options can be defined for this exporter. + folding: + title: 'Config options' + enabled: true + list: + - name: 'enabled' + default_value: 'no' + description: 'Enables or disables an exporting connector instance (yes|no).' + required: true + - name: 'destination' + default_value: 'pubsub.googleapis.com' + 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.' + required: true + detailed_description: | + The format of each item in this list, is: [PROTOCOL:]IP[:PORT]. + - PROTOCOL can be udp or tcp. tcp is the default and only supported by the current exporting engine. + - 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. + - PORT can be a number of a service name. If omitted, the default port for the exporting connector will be used. + + Example IPv4: + ```yaml + destination = pubsub.googleapis.com + ``` + When multiple servers are defined, Netdata will try the next one when the previous one fails. + - name: 'username' + default_value: 'my_username' + description: 'Username for HTTP authentication' + required: false + - name: 'password' + default_value: 'my_password' + description: 'Password for HTTP authentication' + required: false + - name: 'data source' + default_value: '' + description: 'Selects the kind of data that will be sent to the external database. (as collected|average|sum)' + required: false + - name: 'hostname' + default_value: '[global].hostname' + description: 'The hostname to be used for sending data to the external database server.' + required: false + - name: 'prefix' + default_value: 'Netdata' + description: 'The prefix to add to all metrics.' + required: false + - name: 'update every' + default_value: '10' + description: | + Frequency of sending sending data to the external database, in seconds. + required: false + detailed_description: | + Netdata will add some randomness to this number, to prevent stressing the external server when many Netdata servers + send data to the same database. This randomness does not affect the quality of the data, only the time they are sent. + - name: 'buffer on failures' + default_value: '10' + description: | + The number of iterations (`update every` seconds) to buffer data, when the external database server is not available. + required: false + detailed_description: | + 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). + - name: 'timeout ms' + default_value: '2 * update_every * 1000' + description: 'The timeout in milliseconds to wait for the external database server to process the data.' + required: false + - name: 'send hosts matching' + default_value: 'localhost *' + description: | + 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). + required: false + detailed_description: | + Includes one or more space separated patterns, using * as wildcard (any number of times within each pattern). + The patterns are checked against the hostname (the localhost is always checked as localhost), allowing us to + filter which hosts will be sent to the external database when this Netdata is a central Netdata aggregating multiple hosts. + + A pattern starting with `!` gives a negative match. So to match all hosts named `*db*` except hosts containing `*child*`, + use `!*child* *db*` (so, the order is important: the first pattern matching the hostname will be used - positive or negative). + - name: 'send charts matching' + default_value: '*' + description: | + One or more space separated patterns (use * as wildcard) checked against both chart id and chart name. + required: false + detailed_description: | + A pattern starting with ! gives a negative match. So to match all charts named apps.* except charts ending in *reads, + use !*reads apps.* (so, the order is important: the first pattern matching the chart id or the chart name will be used, + positive or negative). There is also a URL parameter filter that can be used while querying allmetrics. The URL parameter + has a higher priority than the configuration option. + - name: 'send names instead of ids' + default_value: '' + description: 'Controls the metric names Netdata should send to the external database (yes|no).' + required: false + detailed_description: | + Netdata supports names and IDs for charts and dimensions. Usually IDs are unique identifiers as read by the system and names + are human friendly labels (also unique). Most charts and metrics have the same ID and name, but in several cases they are + different : disks with device-mapper, interrupts, QoS classes, statsd synthetic charts, etc. + - name: 'send configured labels' + default_value: '' + description: 'Controls if host labels defined in the `[host labels]` section in `netdata.conf` should be sent to the external database (yes|no).' + required: false + - name: 'send automatic labels' + default_value: '' + description: 'Controls if automatically created labels, like `_os_name` or `_architecture` should be sent to the external database (yes|no).' + required: false + examples: + folding: + enabled: true + title: '' + list: + - name: 'Basic configuration' + folding: + enabled: false + description: | + - Set the destination option to a Pub/Sub service endpoint. pubsub.googleapis.com is the default one. + - Create the credentials JSON file by following Google Cloud's authentication guide. + - The user running the Agent (typically netdata) needs read access to google_cloud_credentials.json, which you can set + `chmod 400 google_cloud_credentials.json; chown netdata google_cloud_credentials.json` + - Set the credentials file option to the full path of the file. + config: | + [pubsub:my_instance] + enabled = yes + destination = pubsub.googleapis.com + credentials file = /etc/netdata/google_cloud_credentials.json + project id = my_project + topic id = my_topic diff --git a/exporting/pubsub/pubsub.c b/src/exporting/pubsub/pubsub.c index 4989160a4..4989160a4 100644 --- a/exporting/pubsub/pubsub.c +++ b/src/exporting/pubsub/pubsub.c diff --git a/exporting/pubsub/pubsub.h b/src/exporting/pubsub/pubsub.h index 0bcb76f9b..0bcb76f9b 100644 --- a/exporting/pubsub/pubsub.h +++ b/src/exporting/pubsub/pubsub.h diff --git a/exporting/pubsub/pubsub_publish.cc b/src/exporting/pubsub/pubsub_publish.cc index cc14154f8..cc14154f8 100644 --- a/exporting/pubsub/pubsub_publish.cc +++ b/src/exporting/pubsub/pubsub_publish.cc diff --git a/exporting/pubsub/pubsub_publish.h b/src/exporting/pubsub/pubsub_publish.h index 567a262f0..567a262f0 100644 --- a/exporting/pubsub/pubsub_publish.h +++ b/src/exporting/pubsub/pubsub_publish.h |