File: README.rst

package info (click to toggle)
python-qnapstats 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 456 kB
  • sloc: xml: 857; python: 456; makefile: 2
file content (141 lines) | stat: -rw-r--r-- 7,945 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
================
python-qnapstats
================

.. image:: https://img.shields.io/github/actions/workflow/status/colinodell/python-qnapstats/test.yml?branch=master&?style=flat-square
   :target: https://github.com/colinodell/python-qnapstats/actions?query=workflow%3ATest+branch%3Amaster
   :alt: Build Status
.. image:: https://img.shields.io/pypi/pyversions/qnapstats.svg?style=flat-square
   :target: https://pypi.python.org/pypi/qnapstats
   :alt: Supported Python Versions

Library from obtaining system information from QNAP NAS devices running QTS.

Installation
============

This library requires `xmltodict`, so make sure you have that installed:

.. code-block:: bash

    pip3 install xmltodict>=0.10.0

Then install this Python module:

.. code-block:: bash

    pip3 install qnapstats

Usage Example
=============

.. code-block:: python

    #!/usr/bin/env python3
    from qnapstats import QNAPStats
    from pprint import pprint
    
    qnap = QNAPStats('192.168.1.3', 8080, 'admin', 'correcthorsebatterystaple')
    
    pprint(qnap.get_system_stats())
    pprint(qnap.get_system_health())
    pprint(qnap.get_smart_disk_health())
    pprint(qnap.get_volumes())
    pprint(qnap.get_bandwidth())

Account
=======
The account you connect with must have system monitoring permissions. The simplest
option is to put it in the admin group; it doesn't necessarily
need to be THE "administrator" account, but you can use some account in the
administrators group.

Alternatively you can configure a normal account and enable Delegated Administration
in control panel, and activate "System Monitoring."

Once the account is created, and/or you upgrade to a newer of like QTS 5, 
blso be sure to log into your NAS and complete any agreements, warnings, wizards, etc.
that may prevent this library from using the QNAP API.

MFA/2FA must also be disabled for that user for this library to work.

Device Support
==============

This library has been tested against the following devices and firmwares:

+--------------+------------------------+---------------------------------------+
| Model        | QTS* Firmware Versions | Notes                                 |
+==============+========================+=======================================+
| D4 Pro       | 4.5.1                  | User-reported: no automated tests     |
+--------------+------------------------+---------------------------------------+
| TS-110       | 4.2.4                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-112P      | 4.3.3                  | This device does not report CPU temps |
+--------------+------------------------+---------------------------------------+
| TS-210       | 4.2.6                  | This device does not report CPU temps |
+--------------+------------------------+---------------------------------------+
| TS-219P II   | 4.3.3                  | User-reported: no automated tests     |
+--------------+------------------------+---------------------------------------+
| TS-251B      | 4.4.3                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-228A      | 5.0.1                  | This device does not report CPU temps |
+--------------+------------------------+---------------------------------------+
| TS-233       | 5.1.x                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-251+      | 4.5.1                  | No information on dnsInfo             |
+--------------+------------------------+---------------------------------------+
| TS-253 Pro   | 4.5.2                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-253D      | 4.5.3                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-332       | 5.0.0                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-364       | 5.0.1                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-269L      | 4.3.3                  | User-reported: no automated tests     |
+--------------+------------------------+---------------------------------------+
| TS-410       | 4.2.3                  | This device does not report CPU temps |
+--------------+------------------------+---------------------------------------+
| TS-412       | 4.3.3                  | This device does not report CPU temps |
+--------------+------------------------+---------------------------------------+
| TS-431P      | 4.3.4                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-451       | 4.2.2 - 4.2.4          |                                       |
+--------------+------------------------+---------------------------------------+
| TS-453A      | 4.3.4; 5.0.1           |                                       |
+--------------+------------------------+---------------------------------------+
| TS-453Be     | 4.2.3; 5.0.1           |                                       |
+--------------+------------------------+---------------------------------------+
| TS-639       | 4.2.3                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-659       | 4.2.6                  | May report `None` for some disk temps |
+--------------+------------------------+---------------------------------------+
| TS-853 Pro   | 4.5.4                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-869 Pro   | 4.3.4                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-873A      | 5.0.1.2248             |                                       |
+--------------+------------------------+---------------------------------------+
| TS-1677XU-RP | 4.5.2                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-EC1280U   | 4.5.2                  |                                       |
+--------------+------------------------+---------------------------------------+
| TS-h886      | QuTS h5.0.1.2376       |                                       |
+--------------+------------------------+---------------------------------------+
| TS-X53       | 4.5.4                  |                                       |
+--------------+------------------------+---------------------------------------+
| TVS-672N     | 5.0.1                  |                                       |
+--------------+------------------------+---------------------------------------+
| TVS-1282     | 5.0.1                  |                                       |
+--------------+------------------------+---------------------------------------+

⚠️ *QuTS is not currently supported - see [issue #84](https://github.com/colinodell/python-qnapstats/issues/84)*

Other QNAP devices using these QTS firmwares should probably work fine, as should the devices listed above on newer firmwares.
If you encounter any compatibility issues, please let us know (or better yet, contribute a patch!)


**Upgrading to QTS 5?** Make sure the account you connect with meets the criteria listed earlier in this README.
Also be sure to log into your NAS and complete any agreements, warnings, wizards, etc. that may prevent this
library from using the QNAP API.