Skip to content

Commit

Permalink
chore: clean up all errors for markdown lint input plugins s through v (
Browse files Browse the repository at this point in the history
  • Loading branch information
MyaLongmire authored and reimda committed Dec 1, 2021
1 parent 111e591 commit 5e84b63
Show file tree
Hide file tree
Showing 31 changed files with 931 additions and 856 deletions.
21 changes: 10 additions & 11 deletions plugins/inputs/salesforce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Salesforce plugin gathers metrics about the limits in your Salesforce organization and the remaining usage.
It fetches its data from the [limits endpoint](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_limits.htm) of Salesforce's REST API.

### Configuration:
## Configuration

```toml
# Gather Metrics about Salesforce limits and remaining usage
Expand All @@ -19,7 +19,7 @@ It fetches its data from the [limits endpoint](https://developer.salesforce.com/
# version = "39.0"
```

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

Salesforce provide one measurement named "salesforce".
Each entry is converted to snake\_case and 2 fields are created.
Expand All @@ -28,20 +28,19 @@ Each entry is converted to snake\_case and 2 fields are created.
- \<key\>_remaining represents the usage remaining before hitting the limit threshold

- salesforce
- \<key\>_max (int)
- \<key\>_remaining (int)
- (...)
- \<key\>_max (int)
- \<key\>_remaining (int)
- (...)

### Tags:
## Tags

- All measurements have the following tags:
- host
- organization_id (t18 char organisation ID)
- host
- organization_id (t18 char organisation ID)

## Example Output

### Example Output:

```
```sh
$./telegraf --config telegraf.conf --input-filter salesforce --test

salesforce,organization_id=XXXXXXXXXXXXXXXXXX,host=xxxxx.salesforce.com daily_workflow_emails_max=546000i,hourly_time_based_workflow_max=50i,daily_async_apex_executions_remaining=250000i,daily_durable_streaming_api_events_remaining=1000000i,streaming_api_concurrent_clients_remaining=2000i,daily_bulk_api_requests_remaining=10000i,hourly_sync_report_runs_remaining=500i,daily_api_requests_max=5000000i,data_storage_mb_remaining=1073i,file_storage_mb_remaining=1069i,daily_generic_streaming_api_events_remaining=10000i,hourly_async_report_runs_remaining=1200i,hourly_time_based_workflow_remaining=50i,daily_streaming_api_events_remaining=1000000i,single_email_max=5000i,hourly_dashboard_refreshes_remaining=200i,streaming_api_concurrent_clients_max=2000i,daily_durable_generic_streaming_api_events_remaining=1000000i,daily_api_requests_remaining=4999998i,hourly_dashboard_results_max=5000i,hourly_async_report_runs_max=1200i,daily_durable_generic_streaming_api_events_max=1000000i,hourly_dashboard_results_remaining=5000i,concurrent_sync_report_runs_max=20i,durable_streaming_api_concurrent_clients_remaining=2000i,daily_workflow_emails_remaining=546000i,hourly_dashboard_refreshes_max=200i,daily_streaming_api_events_max=1000000i,hourly_sync_report_runs_max=500i,hourly_o_data_callout_max=10000i,mass_email_max=5000i,mass_email_remaining=5000i,single_email_remaining=5000i,hourly_dashboard_statuses_max=999999999i,concurrent_async_get_report_instances_max=200i,daily_durable_streaming_api_events_max=1000000i,daily_generic_streaming_api_events_max=10000i,hourly_o_data_callout_remaining=10000i,concurrent_sync_report_runs_remaining=20i,daily_bulk_api_requests_max=10000i,data_storage_mb_max=1073i,hourly_dashboard_statuses_remaining=999999999i,concurrent_async_get_report_instances_remaining=200i,daily_async_apex_executions_max=250000i,durable_streaming_api_concurrent_clients_max=2000i,file_storage_mb_max=1073i 1501565661000000000
Expand Down
24 changes: 14 additions & 10 deletions plugins/inputs/sensors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ package installed.

This plugin collects sensor metrics with the `sensors` executable from the lm-sensor package.

### Configuration:
## Configuration

```toml
# Monitor sensors, requires lm-sensors package
[[inputs.sensors]]
Expand All @@ -17,19 +18,21 @@ This plugin collects sensor metrics with the `sensors` executable from the lm-se
# timeout = "5s"
```

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

Fields are created dynamically depending on the sensors. All fields are float.

### Tags:
## Tags

- All measurements have the following tags:
- chip
- feature
- chip
- feature

### Example Output:
## Example Output

#### Default
```
### Default

```shell
$ telegraf --config telegraf.conf --input-filter sensors --test
* Plugin: sensors, Collection 1
> sensors,chip=power_meter-acpi-0,feature=power1 power_average=0,power_average_interval=300 1466751326000000000
Expand All @@ -39,8 +42,9 @@ $ telegraf --config telegraf.conf --input-filter sensors --test
> sensors,chip=k10temp-pci-00db,feature=temp1 temp_crit=70,temp_crit_hyst=65,temp_input=29.5,temp_max=70 1466751326000000000
```

#### With remove_numbers=false
```
### With remove_numbers=false

```shell
* Plugin: sensors, Collection 1
> sensors,chip=power_meter-acpi-0,feature=power1 power1_average=0,power1_average_interval=300 1466753424000000000
> sensors,chip=k10temp-pci-00c3,feature=temp1 temp1_crit=70,temp1_crit_hyst=65,temp1_input=29.125,temp1_max=70 1466753424000000000
Expand Down
26 changes: 14 additions & 12 deletions plugins/inputs/sflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ accordance with the specification from [sflow.org](https://sflow.org/).
Currently only Flow Samples of Ethernet / IPv4 & IPv4 TCP & UDP headers are
turned into metrics. Counters and other header samples are ignored.

#### Series Cardinality Warning
## Series Cardinality Warning

This plugin may produce a high number of series which, when not controlled
for, will cause high load on your database. Use the following techniques to
Expand All @@ -18,7 +18,7 @@ avoid cardinality issues:
- Monitor your databases [series cardinality][].
- Consult the [InfluxDB documentation][influx-docs] for the most up-to-date techniques.

### Configuration
## Configuration

```toml
[[inputs.sflow]]
Expand All @@ -33,7 +33,7 @@ avoid cardinality issues:
# read_buffer_size = ""
```

### Metrics
## Metrics

- sflow
- tags:
Expand Down Expand Up @@ -81,34 +81,36 @@ avoid cardinality issues:
- ip_flags (integer, ip_ver field of IPv4 structures)
- tcp_flags (integer, TCP flags of TCP IP header (IPv4 or IPv6))

### Troubleshooting
## Troubleshooting

The [sflowtool][] utility can be used to print sFlow packets, and compared
against the metrics produced by Telegraf.
```

```sh
sflowtool -p 6343
```

If opening an issue, in addition to the output of sflowtool it will also be
helpful to collect a packet capture. Adjust the interface, host and port as
needed:
```
$ sudo tcpdump -s 0 -i eth0 -w telegraf-sflow.pcap host 127.0.0.1 and port 6343

```sh
sudo tcpdump -s 0 -i eth0 -w telegraf-sflow.pcap host 127.0.0.1 and port 6343
```

[sflowtool]: https://github.com/sflow/sflowtool

### Example Output
```
## Example Output

```shell
sflow,agent_address=0.0.0.0,dst_ip=10.0.0.2,dst_mac=ff:ff:ff:ff:ff:ff,dst_port=40042,ether_type=IPv4,header_protocol=ETHERNET-ISO88023,input_ifindex=6,ip_dscp=27,ip_ecn=0,output_ifindex=1073741823,source_id_index=3,source_id_type=0,src_ip=10.0.0.1,src_mac=ff:ff:ff:ff:ff:ff,src_port=443 bytes=1570i,drops=0i,frame_length=157i,header_length=128i,ip_flags=2i,ip_fragment_offset=0i,ip_total_length=139i,ip_ttl=42i,sampling_rate=10i,tcp_header_length=0i,tcp_urgent_pointer=0i,tcp_window_size=14i 1584473704793580447
```

### Reference Documentation
## Reference Documentation

This sflow implementation was built from the reference document
This sflow implementation was built from the reference document
[sflow.org/sflow_version_5.txt](sflow_version_5)


[metric filtering]: https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#metric-filtering
[retention policy]: https://docs.influxdata.com/influxdb/latest/guides/downsampling_and_retention/
[tsi]: https://docs.influxdata.com/influxdb/latest/concepts/time-series-index/
Expand Down
75 changes: 49 additions & 26 deletions plugins/inputs/smart/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# S.M.A.R.T. Input Plugin

Get metrics using the command line utility `smartctl` for S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) storage devices. SMART is a monitoring system included in computer hard disk drives (HDDs) and solid-state drives (SSDs) that detects and reports on various indicators of drive reliability, with the intent of enabling the anticipation of hardware failures.
See smartmontools (https://www.smartmontools.org/).
See smartmontools (<https://www.smartmontools.org/>).

SMART information is separated between different measurements: `smart_device` is used for general information, while `smart_attribute` stores the detailed attribute information if `attributes = true` is enabled in the plugin configuration.

If no devices are specified, the plugin will scan for SMART devices via the following command:

```
```sh
smartctl --scan
```

Metrics will be reported from the following `smartctl` command:

```
```sh
smartctl --info --attributes --health -n <nocheck> --format=brief <device>
```

Expand All @@ -23,41 +23,48 @@ Also, NVMe capabilities were introduced in version 6.5.

To enable SMART on a storage device run:

```
```sh
smartctl -s on <device>
```

## NVMe vendor specific attributes

For NVMe disk type, plugin can use command line utility `nvme-cli`. It has a feature
For NVMe disk type, plugin can use command line utility `nvme-cli`. It has a feature
to easy access a vendor specific attributes.
This plugin supports nmve-cli version 1.5 and above (https://github.com/linux-nvme/nvme-cli).
This plugin supports nmve-cli version 1.5 and above (<https://github.com/linux-nvme/nvme-cli>).
In case of `nvme-cli` absence NVMe vendor specific metrics will not be obtained.

Vendor specific SMART metrics for NVMe disks may be reported from the following `nvme` command:

```
```sh
nvme <vendor> smart-log-add <device>
```

Note that vendor plugins for `nvme-cli` could require different naming convention and report format.

To see installed plugin extensions, depended on the nvme-cli version, look at the bottom of:
```

```sh
nvme help
```

To gather disk vendor id (vid) `id-ctrl` could be used:
```

```sh
nvme id-ctrl <device>
```
Association between a vid and company can be found there: https://pcisig.com/membership/member-companies.

Association between a vid and company can be found there: <https://pcisig.com/membership/member-companies>.

Devices affiliation to being NVMe or non NVMe will be determined thanks to:
```

```sh
smartctl --scan
```

and:
```

```sh
smartctl --scan -d nvme
```

Expand Down Expand Up @@ -113,12 +120,14 @@ It's important to note that this plugin references smartctl and nvme-cli, which
Depending on the user/group permissions of the telegraf user executing this plugin, you may need to use sudo.

You will need the following in your telegraf config:

```toml
[[inputs.smart]]
use_sudo = true
```

You will also need to update your sudoers file:

```bash
$ visudo
# For smartctl add the following lines:
Expand All @@ -131,6 +140,7 @@ Cmnd_Alias NVME = /path/to/nvme
telegraf ALL=(ALL) NOPASSWD: NVME
Defaults!NVME !logfile, !syslog, !pam_session
```

To run smartctl or nvme with `sudo` wrapper script can be created. `path_smartctl` or
`path_nvme` in the configuration should be set to execute this script.

Expand Down Expand Up @@ -171,57 +181,70 @@ To run smartctl or nvme with `sudo` wrapper script can be created. `path_smartct
- value
- worst

#### Flags
### Flags

The interpretation of the tag `flags` is:
- `K` auto-keep
- `C` event count
- `R` error rate
- `S` speed/performance
- `O` updated online
- `P` prefailure warning

#### Exit Status
- `K` auto-keep
- `C` event count
- `R` error rate
- `S` speed/performance
- `O` updated online
- `P` prefailure warning

### Exit Status

The `exit_status` field captures the exit status of the used cli utilities command which
is defined by a bitmask. For the interpretation of the bitmask see the man page for
smartctl or nvme-cli.

## Device Names

Device names, e.g., `/dev/sda`, are *not persistent*, and may be
subject to change across reboots or system changes. Instead, you can use the
*World Wide Name* (WWN) or serial number to identify devices. On Linux block
devices can be referenced by the WWN in the following location:
`/dev/disk/by-id/`.

## Troubleshooting

If you expect to see more SMART metrics than this plugin shows, be sure to use a proper version
of smartctl or nvme-cli utility which has the functionality to gather desired data. Also, check
your device capability because not every SMART metrics are mandatory.
your device capability because not every SMART metrics are mandatory.
For example the number of temperature sensors depends on the device specification.

If this plugin is not working as expected for your SMART enabled device,
please run these commands and include the output in a bug report:

For non NVMe devices (from smartctl version >= 7.0 this will also return NVMe devices by default):
```

```sh
smartctl --scan
```

For NVMe devices:
```

```sh
smartctl --scan -d nvme
```

Run the following command replacing your configuration setting for NOCHECK and
the DEVICE (name of the device could be taken from the previous command):
```

```sh
smartctl --info --health --attributes --tolerance=verypermissive --nocheck NOCHECK --format=brief -d DEVICE
```

If you try to gather vendor specific metrics, please provide this commad
and replace vendor and device to match your case:
```

```sh
nvme VENDOR smart-log-add DEVICE
```

## Example SMART Plugin Outputs
```

```shell
smart_device,enabled=Enabled,host=mbpro.local,device=rdisk0,model=APPLE\ SSD\ SM0512F,serial_no=S1K5NYCD964433,wwn=5002538655584d30,capacity=500277790720 udma_crc_errors=0i,exit_status=0i,health_ok=true,read_error_rate=0i,temp_c=40i 1502536854000000000
smart_attribute,capacity=500277790720,device=rdisk0,enabled=Enabled,fail=-,flags=-O-RC-,host=mbpro.local,id=199,model=APPLE\ SSD\ SM0512F,name=UDMA_CRC_Error_Count,serial_no=S1K5NYCD964433,wwn=5002538655584d30 exit_status=0i,raw_value=0i,threshold=0i,value=200i,worst=200i 1502536854000000000
smart_attribute,capacity=500277790720,device=rdisk0,enabled=Enabled,fail=-,flags=-O---K,host=mbpro.local,id=199,model=APPLE\ SSD\ SM0512F,name=Unknown_SSD_Attribute,serial_no=S1K5NYCD964433,wwn=5002538655584d30 exit_status=0i,raw_value=0i,threshold=0i,value=100i,worst=100i 1502536854000000000
Expand Down
Loading

0 comments on commit 5e84b63

Please sign in to comment.