Skip to content

Commit

Permalink
Update qnap sensor component configuration (#7627)
Browse files Browse the repository at this point in the history
* Update qnap sensor component configuration

* ✏️ Fix error
  • Loading branch information
klaasnicolaas authored and fabaff committed Nov 25, 2018
1 parent dc6c55b commit 8b42e52
Showing 1 changed file with 92 additions and 37 deletions.
129 changes: 92 additions & 37 deletions source/_components/sensor.qnap.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ ha_release: 0.38
ha_iot_class: "Local Polling"
---


This `qnap` sensor allows getting various statistics from your [QNAP NAS](https://www.qnap.com/en-us/).

## {% linkable_title Configuration %}
Expand All @@ -35,48 +34,104 @@ sensor:
- volume_percentage_used
```
Configuration variables:
- **host** (*Required*): The IP address of the QNAP NAS to monitor
- **port** (*Optional*): The port number on which the QNAP NAS web interface is reachable. Defaults to `8080`.
- **ssl** (*Optional*): Whether to connect via `https`. Defaults to `false`.
- **verify_ssl** (*Optional*): Whether SSL certificates should be validated. Defaults to `true`.
- **timeout** (*Optional*): How long (in seconds) to wait for a response from the QNAP device before giving up. Defaults to `10`.
- **username** (*Required*): An user to connect to the QNAP NAS.
- **password** (*Required*): The password of the user to connect to the QNAP NAS.
- **drives** (*Optional*): Array of drives to monitor (ex: `0:1`). Defaults to all drives.
- **volumes** (*Optional*): Array of volumes to monitor (ex: `DataVol1`). Defaults to all volumes.
- **nics** (*Optional*): Array of network interfaces to monitor (ex: `eth0`). Defaults to all NICs.
- **monitored_conditions** (*Required*): Defines the stats to monitor as sensors.
- **status**: Displays overall system health.
- **system_temp**: Displays the overall system temperature.
- **cpu_temp**: Displays the CPU's temperature.
- **cpu_usage**: Displays the CPU's utilization as a percentage.
- **memory_free**: Displays the size of available RAM in GB.
- **memory_used**: Displays the size of used RAM in GB.
- **memory_percent_used**: Displays the size of used RAM as a percentage of total RAM.
- **network_link_status**: Displays whether the network interfaces is up (creates a new entry for each interface).
- **network_tx**: Displays the upload speed of a network interface in MB/s (creates a new entry for each interface).
- **network_rx**: Displays the download speed of a network interface in MB/s (creates a new entry for each interface).
- **drive_smart_status**: Displays the S.M.A.R.T. status of the drive (creates a new entry for each drive).
- **drive_temp**: Displays the temperature of the drive (creates a new entry for each drive).
- **volume_size_free**: Displays the available space of the volume in GB (creates a new entry for each volume).
- **volume_size_used**: Displays the used space of the volume in GB (creates a new entry for each volume).
- **volume_percentage_used**: Displays the used space of the volume as a percentage (creates a new entry for each volume).
{% configuration %}
host:
description: The IP address of the QNAP NAS to monitor.
required: true
type: string
port:
description: The port number on which the QNAP NAS web interface is reachable.
required: false
default: 8080
type: integer
ssl:
description: Whether to connect via `https`.
required: false
default: false
type: boolean
verify_ssl:
description: Whether SSL certificates should be validated.
required: false
default: true
type: boolean
timeout:
description: How long (in seconds) to wait for a response from the QNAP device before giving up.
required: false
default: 10
type: integer
username:
description: An user to connect to the QNAP NAS.
required: true
type: string
password:
description: The password of the user to connect to the QNAP NAS.
required: true
type: string
drivers:
description: "Array of drives to monitor (ex: `0:1`)."
required: false
default: all drivers
type: list
volumes:
description: "Array of volumes to monitor (ex: `DataVol1`)."
required: false
default: all volumes
type: list
nics:
description: "Array of network interfaces to monitor (ex: `eth0`)."
required: false
default: all NICs
type: list
monitored_conditions:
description: Defines the stats to monitor as sensors.
required: true
type: list
keys:
status:
description: Displays overall system health.
system_temp:
description: Displays the overall system temperature.
cpu_temp:
description: Displays the CPU's temperature.
cpu_usage:
description: Displays the CPU's utilization as a percentage.
memory_free:
description: Displays the size of available RAM in GB.
memory_used:
description: Displays the size of used RAM in GB.
memory_percent_used:
description: Displays the size of used RAM as a percentage of total RAM.
network_link_status:
description: Displays whether the network interfaces is up (creates a new entry for each interface).
network_tx:
description: Displays the upload speed of a network interface in MB/s (creates a new entry for each interface).
network_rx:
description: Displays the download speed of a network interface in MB/s (creates a new entry for each interface).
drive_smart_status:
description: Displays the S.M.A.R.T. status of the drive (creates a new entry for each drive).
drive_temp:
description: Displays the temperature of the drive (creates a new entry for each drive).
volume_size_free:
description: Displays the available space of the volume in GB (creates a new entry for each volume).
volume_size_used:
description: Displays the used space of the volume in GB (creates a new entry for each volume).
volume_percentage_used:
description: Displays the used space of the volume as a percentage (creates a new entry for each volume).
{% endconfiguration %}

### Self-signed certificates
### {% linkable_title Self-signed certificates %}

If your QNAP device uses self-signed certificates, set the `verify_ssl` option to `false`.

### QNAP device support:
### {% linkable_title QNAP device support: %}

This component has been tested on the following devices:

- TS-259 Pro+ (QTS 4.2.6)
- TS-410 (QTS 4.2.3)
- TS-419 (QTS 4.2.3)
- TS-451 (QTS 4.2.2)
- TS-470 (QTS 4.2.2)
- TS-639 (QTS 4.2.3)
- TS-259 Pro+ (QTS 4.2.6)
- TS-410 (QTS 4.2.3)
- TS-419 (QTS 4.2.3)
- TS-451 (QTS 4.2.2)
- TS-470 (QTS 4.2.2)
- TS-639 (QTS 4.2.3)

Other QNAP NAS devices using similar firmware should work fine. For more information about supported devices, or to report issues with your device, please visit the [qnapstats project](https://github.com/colinodell/python-qnapstats#device-support).

0 comments on commit 8b42e52

Please sign in to comment.