Skip to content

Commit 5d7b004

Browse files
prhomhysejoelhans
authored andcommitted
Fix Remark Lint Warnings for Backends (netdata#6917)
* fix remark warnings for AWS Kinesis doc * fix remark warnings for MongoDB * fix remark warnings on OpenTSDB doc * fix lint warnings on prometheus docs * format prometheus page * fix main backend readme * fix remark warnings except local links * remove slash in prometheus doc * remove link to header to fix lint error * make character limit to 120 not 80
1 parent 2701913 commit 5d7b004

File tree

7 files changed

+358
-332
lines changed

7 files changed

+358
-332
lines changed

backends/README.md

Lines changed: 93 additions & 94 deletions
Large diffs are not rendered by default.

backends/WALKTHROUGH.md

Lines changed: 122 additions & 171 deletions
Large diffs are not rendered by default.

backends/aws_kinesis/README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@
22

33
## Prerequisites
44

5-
To use AWS Kinesis as a backend AWS SDK for C++ should be [installed](https://docs.aws.amazon.com/en_us/sdk-for-cpp/v1/developer-guide/setup.html) first. `libcrypto`, `libssl`, and `libcurl` are also required to compile Netdata with Kinesis support enabled. Next, Netdata should be re-installed from the source. The installer will detect that the required libraries are now available.
5+
To use AWS Kinesis as a backend AWS SDK for C++ should be
6+
[installed](https://docs.aws.amazon.com/en_us/sdk-for-cpp/v1/developer-guide/setup.html) first. `libcrypto`, `libssl`,
7+
and `libcurl` are also required to compile Netdata with Kinesis support enabled. Next, Netdata should be re-installed
8+
from the source. The installer will detect that the required libraries are now available.
69

7-
If the AWS SDK for C++ is being installed from source, it is useful to set `-DBUILD_ONLY="kinesis"`. Otherwise, the building process could take a very long time. Take a note, that the default installation path for the libraries is `/usr/local/lib64`. Many Linux distributions don't include this path as the default one for a library search, so it is advisable to use the following options to `cmake` while building the AWS SDK:
10+
If the AWS SDK for C++ is being installed from source, it is useful to set `-DBUILD_ONLY="kinesis"`. Otherwise, the
11+
building process could take a very long time. Take a note, that the default installation path for the libraries is
12+
`/usr/local/lib64`. Many Linux distributions don't include this path as the default one for a library search, so it is
13+
advisable to use the following options to `cmake` while building the AWS SDK:
814

9-
```
15+
```sh
1016
cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib -DCMAKE_INSTALL_INCLUDEDIR=/usr/include -DBUILD_SHARED_LIBS=OFF -DBUILD_ONLY=kinesis <aws-sdk-cpp sources>
1117
```
1218

1319
## Configuration
1420

1521
To enable data sending to the kinesis backend set the following options in `netdata.conf`:
1622

17-
```
23+
```conf
1824
[backend]
1925
enabled = yes
2026
type = kinesis
@@ -25,7 +31,7 @@ set the `destination` option to an AWS region.
2531

2632
In the Netdata configuration directory run `./edit-config aws_kinesis.conf` and set AWS credentials and stream name:
2733

28-
```
34+
```yaml
2935
# AWS credentials
3036
aws_access_key_id = your_access_key_id
3137
aws_secret_access_key = your_secret_access_key
@@ -34,8 +40,9 @@ aws_secret_access_key = your_secret_access_key
3440
stream name = your_stream_name
3541
```
3642

37-
Alternatively, AWS credentials can be set for the *netdata* user using AWS SDK for C++ [standard methods](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/credentials.html).
43+
Alternatively, AWS credentials can be set for the `netdata` user using AWS SDK for C++ [standard methods](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/credentials.html).
3844

39-
A partition key for every record is computed automatically by Netdata with the purpose to distribute records across available shards evenly.
45+
A partition key for every record is computed automatically by Netdata with the purpose to distribute records across
46+
available shards evenly.
4047

4148
[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fbackends%2Faws_kinesis%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)

backends/mongodb/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@
22

33
## Prerequisites
44

5-
To use MongoDB as a backend, `libmongoc` 1.7.0 or higher should be [installed](http://mongoc.org/libmongoc/current/installing.html) first. Next, Netdata should be re-installed from the source. The installer will detect that the required libraries are now available.
5+
To use MongoDB as a backend, `libmongoc` 1.7.0 or higher should be
6+
[installed](http://mongoc.org/libmongoc/current/installing.html) first. Next, Netdata should be re-installed from the
7+
source. The installer will detect that the required libraries are now available.
68

79
## Configuration
810

911
To enable data sending to the MongoDB backend set the following options in `netdata.conf`:
1012

11-
```
13+
```conf
1214
[backend]
1315
enabled = yes
1416
type = mongodb
1517
```
1618

17-
In the Netdata configuration directory run `./edit-config mongodb.conf` and set [MongoDB URI](https://docs.mongodb.com/manual/reference/connection-string/), database name, and collection name:
19+
In the Netdata configuration directory run `./edit-config mongodb.conf` and set [MongoDB
20+
URI](https://docs.mongodb.com/manual/reference/connection-string/), database name, and collection name:
1821

19-
```
22+
```yaml
2023
# URI
2124
uri = mongodb://<hostname>
2225

@@ -27,6 +30,7 @@ database = your_database_name
2730
collection = your_collection_name
2831
```
2932

30-
The default socket timeout depends on the backend update interval. The timeout is 500 ms shorter than the interval (but not less than 1000 ms). You can alter the timeout using the `sockettimeoutms` MongoDB URI option.
33+
The default socket timeout depends on the backend update interval. The timeout is 500 ms shorter than the interval (but
34+
not less than 1000 ms). You can alter the timeout using the `sockettimeoutms` MongoDB URI option.
3135

3236
[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fbackends%2Fmongodb%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)

backends/opentsdb/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
# OpenTSDB with HTTP
22

3-
Netdata can easily communicate with OpenTSDB using HTTP API. To enable this channel, set the following options in your `netdata.conf`:
3+
Netdata can easily communicate with OpenTSDB using HTTP API. To enable this channel, set the following options in your
4+
`netdata.conf`:
45

5-
```
6+
```conf
67
[backend]
78
type = opentsdb:http
89
destination = localhost:4242
910
```
1011

11-
In this example, OpenTSDB is running with its default port, which is `4242`. If you run OpenTSDB on a different port, change the `destination = localhost:4242` line accordingly.
12+
In this example, OpenTSDB is running with its default port, which is `4242`. If you run OpenTSDB on a different port,
13+
change the `destination = localhost:4242` line accordingly.
1214

1315
## HTTPS
1416

15-
As of [v1.16.0](https://github.com/netdata/netdata/releases/tag/v1.16.0), Netdata can send metrics to OpenTSDB using TLS/SSL. Unfortunately, OpenTDSB does not support encrypted connections, so you will have to configure a reverse proxy to enable HTTPS communication between Netdata and OpenTSBD. You can set up a reverse proxy with [Nginx](../../docs/Running-behind-nginx.md).
17+
As of [v1.16.0](https://github.com/netdata/netdata/releases/tag/v1.16.0), Netdata can send metrics to OpenTSDB using
18+
TLS/SSL. Unfortunately, OpenTDSB does not support encrypted connections, so you will have to configure a reverse proxy
19+
to enable HTTPS communication between Netdata and OpenTSBD. You can set up a reverse proxy with
20+
[Nginx](../../docs/Running-behind-nginx.md).
1621

1722
After your proxy is configured, make the following changes to `netdata.conf`:
1823

19-
```
24+
```conf
2025
[backend]
2126
type = opentsdb:https
2227
destination = localhost:8082
2328
```
2429

25-
In this example, we used the port `8082` for our reverse proxy. If your reverse proxy listens on a different port, change the `destination = localhost:8082` line accordingly.
30+
In this example, we used the port `8082` for our reverse proxy. If your reverse proxy listens on a different port,
31+
change the `destination = localhost:8082` line accordingly.

0 commit comments

Comments
 (0)