Skip to content

Commit

Permalink
chore: clean up all markdown lint error on input plugins n through r (i…
Browse files Browse the repository at this point in the history
  • Loading branch information
MyaLongmire authored Nov 24, 2021
1 parent 0d8d118 commit d4582dc
Show file tree
Hide file tree
Showing 50 changed files with 1,233 additions and 1,148 deletions.
8 changes: 4 additions & 4 deletions plugins/inputs/nats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The [NATS](http://www.nats.io/about/) monitoring plugin gathers metrics from
the NATS [monitoring http server](https://www.nats.io/documentation/server/gnatsd-monitoring/).

### Configuration
## Configuration

```toml
[[inputs.nats]]
Expand All @@ -14,7 +14,7 @@ the NATS [monitoring http server](https://www.nats.io/documentation/server/gnats
# response_timeout = "5s"
```

### Metrics:
## Metrics

- nats
- tags
Expand All @@ -35,8 +35,8 @@ the NATS [monitoring http server](https://www.nats.io/documentation/server/gnats
- out_msgs (integer, count)
- in_bytes (integer, bytes)

### Example Output:
## Example Output

```
```shell
nats,server=http://localhost:8222 uptime=117158348682i,mem=6647808i,subscriptions=0i,out_bytes=0i,connections=0i,in_msgs=0i,total_connections=0i,cores=2i,cpu=0,slow_consumers=0i,routes=0i,remotes=0i,out_msgs=0i,in_bytes=0i 1517015107000000000
```
2 changes: 1 addition & 1 deletion plugins/inputs/nats_consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ creates metrics using one of the supported [input data formats][].
A [Queue Group][queue group] is used when subscribing to subjects so multiple
instances of telegraf can read from a NATS cluster in parallel.

### Configuration:
## Configuration

```toml
[[inputs.nats_consumer]]
Expand Down
35 changes: 19 additions & 16 deletions plugins/inputs/neptune_apex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ in the telegraf.conf configuration file.

The [Neptune Apex](https://www.neptunesystems.com/) input plugin collects real-time data from the Apex's status.xml page.


### Configuration
## Configuration

```toml
[[inputs.neptune_apex]]
Expand All @@ -25,7 +24,7 @@ The [Neptune Apex](https://www.neptunesystems.com/) input plugin collects real-t

```

### Metrics
## Metrics

The Neptune Apex controller family allows an aquarium hobbyist to monitor and control
their tanks based on various probes. The data is taken directly from the /cgi-bin/status.xml at the interval specified
Expand Down Expand Up @@ -62,38 +61,42 @@ programming. These tags are clearly marked in the list below and should be consi
- power_failed (int64, Unix epoch in ns) when the controller last lost power. Omitted if the apex reports it as "none"
- power_restored (int64, Unix epoch in ns) when the controller last powered on. Omitted if the apex reports it as "none"
- serial (string, serial number)
- time:
- The time used for the metric is parsed from the status.xml page. This helps when cross-referencing events with
- time:
- The time used for the metric is parsed from the status.xml page. This helps when cross-referencing events with
the local system of Apex Fusion. Since the Apex uses NTP, this should not matter in most scenarios.


### Sample Queries

## Sample Queries

Get the max, mean, and min for the temperature in the last hour:

```sql
SELECT mean("value") FROM "neptune_apex" WHERE ("probe_type" = 'Temp') AND time >= now() - 6h GROUP BY time(20s)
```

### Troubleshooting
## Troubleshooting

### sendRequest failure

#### sendRequest failure
This indicates a problem communicating with the local Apex controller. If on Mac/Linux, try curl:

```sh
$ curl apex.local/cgi-bin/status.xml
curl apex.local/cgi-bin/status.xml
```

to isolate the problem.

#### parseXML errors
### parseXML errors

Ensure the XML being returned is valid. If you get valid XML back, open a bug request.

#### Missing fields/data
### Missing fields/data

The neptune_apex plugin is strict on its input to prevent any conversion errors. If you have fields in the status.xml
output that are not converted to a metric, open a feature request and paste your whole status.xml

### Example Output
## Example Output

```
```text
neptune_apex,hardware=1.0,host=ubuntu,software=5.04_7A18,source=apex,type=controller power_failed=1544814000000000000i,power_restored=1544833875000000000i,serial="AC5:12345" 1545978278000000000
neptune_apex,device_id=base_Var1,hardware=1.0,host=ubuntu,name=VarSpd1_I1,output_id=0,output_type=variable,software=5.04_7A18,source=apex,type=output state="PF1" 1545978278000000000
neptune_apex,device_id=base_Var2,hardware=1.0,host=ubuntu,name=VarSpd2_I2,output_id=1,output_type=variable,software=5.04_7A18,source=apex,type=output state="PF2" 1545978278000000000
Expand Down Expand Up @@ -138,7 +141,7 @@ neptune_apex,hardware=1.0,host=ubuntu,name=Volt_4,software=5.04_7A18,source=apex
```

### Contributing
## Contributing

This plugin is used for mission-critical aquatic life support. A bug could very well result in the death of animals.
Neptune does not publish a schema file and as such, we have made this plugin very strict on input with no provisions for
Expand Down
12 changes: 8 additions & 4 deletions plugins/inputs/net/NETSTAT_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

This plugin collects TCP connections state and UDP socket counts by using `lsof`.

### Configuration:
## Configuration

``` toml
# Collect TCP connections state and UDP socket counts
[[inputs.netstat]]
# no configuration
```

# Measurements:
## Measurements

Supported TCP Connection states are follows.

Expand All @@ -27,12 +27,14 @@ Supported TCP Connection states are follows.
- closing
- none

### TCP Connection State measurements:
## TCP Connection State measurements

Meta:

- units: counts

Measurement names:

- tcp_established
- tcp_syn_sent
- tcp_syn_recv
Expand All @@ -48,10 +50,12 @@ Measurement names:

If there are no connection on the state, the metric is not counted.

### UDP socket counts measurements:
## UDP socket counts measurements

Meta:

- units: counts

Measurement names:

- udp_socket
16 changes: 8 additions & 8 deletions plugins/inputs/net/NET_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This plugin gathers metrics about network interface and protocol usage (Linux only).

### Configuration:
## Configuration

```toml
# Gather metrics about network interfaces
Expand All @@ -21,7 +21,7 @@ This plugin gathers metrics about network interface and protocol usage (Linux on
##
```

### Measurements & Fields:
## Measurements & Fields

The fields from this plugin are gathered in the _net_ measurement.

Expand All @@ -42,30 +42,30 @@ Under freebsd/openbsd and darwin the plugin uses netstat.
Additionally, for the time being _only under Linux_, the plugin gathers system wide stats for different network protocols using /proc/net/snmp (tcp, udp, icmp, etc.).
Explanation of the different metrics exposed by snmp is out of the scope of this document. The best way to find information would be tracing the constants in the Linux kernel source [here](https://elixir.bootlin.com/linux/latest/source/net/ipv4/proc.c) and their usage. If /proc/net/snmp cannot be read for some reason, telegraf ignores the error silently.

### Tags:
## Tags

* Net measurements have the following tags:
- interface (the interface from which metrics are gathered)
* interface (the interface from which metrics are gathered)

Under Linux the system wide protocol metrics have the interface=all tag.

### Sample Queries:
## Sample Queries

You can use the following query to get the upload/download traffic rate per second for all interfaces in the last hour. The query uses the [derivative function](https://docs.influxdata.com/influxdb/v1.2/query_language/functions#derivative) which calculates the rate of change between subsequent field values.

```sql
SELECT derivative(first(bytes_recv), 1s) as "download bytes/sec", derivative(first(bytes_sent), 1s) as "upload bytes/sec" FROM net WHERE time > now() - 1h AND interface != 'all' GROUP BY time(10s), interface fill(0);
```

### Example Output:
## Example Output

```
```shell
# All platforms
$ ./telegraf --config telegraf.conf --input-filter net --test
net,interface=eth0,host=HOST bytes_sent=451838509i,bytes_recv=3284081640i,packets_sent=2663590i,packets_recv=3585442i,err_in=0i,err_out=0i,drop_in=4i,drop_out=0i 1492834180000000000
```

```
```shell
# Linux
$ ./telegraf --config telegraf.conf --input-filter net --test
net,interface=eth0,host=HOST bytes_sent=451838509i,bytes_recv=3284081640i,packets_sent=2663590i,packets_recv=3585442i,err_in=0i,err_out=0i,drop_in=4i,drop_out=0i 1492834180000000000
Expand Down
8 changes: 4 additions & 4 deletions plugins/inputs/net_response/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The input plugin test UDP/TCP connections response time and can optional
verify text in the response.

### Configuration:
## Configuration

```toml
# Collect response time of a TCP or UDP connection
Expand Down Expand Up @@ -33,7 +33,7 @@ verify text in the response.
# fielddrop = ["result_type", "string_found"]
```

### Metrics:
## Metrics

- net_response
- tags:
Expand All @@ -47,9 +47,9 @@ verify text in the response.
- result_type (string) **DEPRECATED in 1.7; use result tag**
- string_found (boolean) **DEPRECATED in 1.4; use result tag**

### Example Output:
## Example Output

```
```shell
net_response,port=8086,protocol=tcp,result=success,server=localhost response_time=0.000092948,result_code=0i,result_type="success" 1525820185000000000
net_response,port=8080,protocol=tcp,result=connection_failed,server=localhost result_code=2i,result_type="connection_failed" 1525820088000000000
net_response,port=8080,protocol=udp,result=read_failed,server=localhost result_code=3i,result_type="read_failed",string_found=false 1525820088000000000
Expand Down
Loading

0 comments on commit d4582dc

Please sign in to comment.