Skip to content

Commit

Permalink
qts-*: 'Keyerror: func' while executing qts-plugins (fix #692)
Browse files Browse the repository at this point in the history
  • Loading branch information
markuslf committed Nov 22, 2023
1 parent 5ede87d commit 4660b47
Show file tree
Hide file tree
Showing 15 changed files with 443 additions and 278 deletions.
13 changes: 10 additions & 3 deletions check-plugins/qts-cpu-usage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Returns the current system-wide CPU utilization as a percentage from a QNAP Appl

Hints and Recommendations:

* Tested on `QuTScloud <https://www.qnap.com/en-us/download?model=qutscloud&category=firmware>`_ v5.1.
* The user used for monitoring must be a member of the "administrators" group. It is not sufficient to be a member of the "everyone" group.
* ``--count=5`` (the default) while checking every minute means that the check reports a warning if the overall CPU usage is above a threshold in the last 5 minutes.


Expand Down Expand Up @@ -41,7 +43,7 @@ Help
done via a single API token (Token-based authentication), not via Session-
based authentication, which is stated as "legacy".
optional arguments:
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
--always-ok Always returns OK.
Expand All @@ -68,7 +70,7 @@ Usage Examples

.. code-block:: bash
./qts-cpu-usage --url http://qts:8080 --username admin --password my-password
./qts-cpu-usage --url http://qts:8080 --username admin --password linuxfabrik --insecure
Output:

Expand All @@ -87,7 +89,12 @@ States
Perfdata / Metrics
------------------

* ``cpu-usage``: The overall cpu usage.
.. csv-table::
:widths: 25, 15, 60
:header-rows: 1

Name, Type, Description
cpu-usage, Percentage, "The overall cpu usage."


Credits, License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,52 +37,52 @@
"disabled": false,
"fields": [
{
"datafield_id": 1044,
"datafield_id": 1,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1045,
"datafield_id": 2,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1046,
"datafield_id": 3,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1047,
"datafield_id": 4,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1048,
"datafield_id": 5,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1049,
"datafield_id": 6,
"is_required": "y",
"var_filter": null
},
{
"datafield_id": 1050,
"datafield_id": 7,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1051,
"datafield_id": 8,
"is_required": "y",
"var_filter": null
},
{
"datafield_id": 1052,
"datafield_id": 9,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1053,
"datafield_id": 10,
"is_required": "n",
"var_filter": null
}
Expand Down Expand Up @@ -134,52 +134,52 @@
"disabled": false,
"fields": [
{
"datafield_id": 1054,
"datafield_id": 11,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1055,
"datafield_id": 12,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1056,
"datafield_id": 13,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1057,
"datafield_id": 14,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1058,
"datafield_id": 15,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1059,
"datafield_id": 16,
"is_required": "y",
"var_filter": null
},
{
"datafield_id": 1060,
"datafield_id": 17,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1061,
"datafield_id": 18,
"is_required": "y",
"var_filter": null
},
{
"datafield_id": 1062,
"datafield_id": 19,
"is_required": "n",
"var_filter": null
},
{
"datafield_id": 1063,
"datafield_id": 20,
"is_required": "n",
"var_filter": null
}
Expand Down Expand Up @@ -321,7 +321,7 @@
}
},
"Datafield": {
"1044": {
"1": {
"varname": "qts_cpu_usage_always_ok",
"caption": "QTS CPU Usage: Always OK?",
"description": "Always returns OK.",
Expand All @@ -330,7 +330,7 @@
"settings": {},
"uuid": "6ea06958-b6ae-487c-87a8-7dbbde5a5fcb"
},
"1045": {
"2": {
"varname": "qts_cpu_usage_count",
"caption": "QTS CPU Usage: Count",
"description": "Number of times the value has to be above the given thresholds.",
Expand All @@ -341,7 +341,7 @@
},
"uuid": "b2c087d0-8981-4e8d-8fb6-34c359c7a14b"
},
"1046": {
"3": {
"varname": "qts_cpu_usage_critical",
"caption": "QTS CPU Usage: Critical",
"description": "Set the critical threshold CPU Usage Percentage.",
Expand All @@ -352,7 +352,7 @@
},
"uuid": "657a6653-d2e6-45a1-8622-7df960585c3f"
},
"1047": {
"4": {
"varname": "qts_cpu_usage_insecure",
"caption": "QTS CPU Usage: Insecure?",
"description": "This option explicitly allows to perform \"insecure\" SSL connections.",
Expand All @@ -361,7 +361,7 @@
"settings": {},
"uuid": "90ba0c69-9bd5-431d-9f5f-5b4df1a303c6"
},
"1048": {
"5": {
"varname": "qts_cpu_usage_no_proxy",
"caption": "QTS CPU Usage: No Proxy?",
"description": "Do not use a proxy.",
Expand All @@ -370,7 +370,7 @@
"settings": {},
"uuid": "4481c533-fefd-441b-a8c3-406b643b3f7a"
},
"1049": {
"6": {
"varname": "qts_cpu_usage_password",
"caption": "QTS CPU Usage: Password",
"description": "QTS Password.",
Expand All @@ -381,7 +381,7 @@
},
"uuid": "aa28d5e8-b635-4e2c-80b8-825329811372"
},
"1050": {
"7": {
"varname": "qts_cpu_usage_timeout",
"caption": "QTS CPU Usage: Timeout",
"description": "Network timeout in seconds.",
Expand All @@ -392,7 +392,7 @@
},
"uuid": "3ec27acc-a716-4259-90c2-3b244f6b0b75"
},
"1051": {
"8": {
"varname": "qts_cpu_usage_url",
"caption": "QTS CPU Usage: URL",
"description": "QTS-based Appliance URL, for example https://192.168.1.1:8080.",
Expand All @@ -403,7 +403,7 @@
},
"uuid": "243e1bff-e818-4cbb-b464-b80589431d89"
},
"1052": {
"9": {
"varname": "qts_cpu_usage_username",
"caption": "QTS CPU Usage: Username",
"description": "QTS User.",
Expand All @@ -414,7 +414,7 @@
},
"uuid": "e5d06b2d-af8c-4f6d-9eec-5bdeda00e43c"
},
"1053": {
"10": {
"varname": "qts_cpu_usage_warning",
"caption": "QTS CPU Usage: Warning",
"description": "Set the warning threshold CPU Usage Percentage.",
Expand All @@ -425,7 +425,7 @@
},
"uuid": "a05ab1b5-aac4-4722-ae0c-705c9cf3c229"
},
"1054": {
"11": {
"varname": "qts_cpu_usage_windows_always_ok",
"caption": "QTS CPU Usage: Always OK?",
"description": "Always returns OK.",
Expand All @@ -434,7 +434,7 @@
"settings": {},
"uuid": "da8622fe-a9df-4c53-9a5c-ea4f8bbb07bd"
},
"1055": {
"12": {
"varname": "qts_cpu_usage_windows_count",
"caption": "QTS CPU Usage: Count",
"description": "Number of times the value has to be above the given thresholds.",
Expand All @@ -445,7 +445,7 @@
},
"uuid": "d8e67cfd-c6ca-46e3-9910-82d7190dbb9c"
},
"1056": {
"13": {
"varname": "qts_cpu_usage_windows_critical",
"caption": "QTS CPU Usage: Critical",
"description": "Set the critical threshold CPU Usage Percentage.",
Expand All @@ -456,7 +456,7 @@
},
"uuid": "bc98bfb3-4756-4163-9ff6-8b6544a42e12"
},
"1057": {
"14": {
"varname": "qts_cpu_usage_windows_insecure",
"caption": "QTS CPU Usage: Insecure?",
"description": "This option explicitly allows to perform \"insecure\" SSL connections.",
Expand All @@ -465,7 +465,7 @@
"settings": {},
"uuid": "9f2e84ae-6a46-4eee-834e-2bdc9559fc2d"
},
"1058": {
"15": {
"varname": "qts_cpu_usage_windows_no_proxy",
"caption": "QTS CPU Usage: No Proxy?",
"description": "Do not use a proxy.",
Expand All @@ -474,7 +474,7 @@
"settings": {},
"uuid": "12d20d54-2575-4dbd-85a9-09e9aaef2101"
},
"1059": {
"16": {
"varname": "qts_cpu_usage_windows_password",
"caption": "QTS CPU Usage: Password",
"description": "QTS Password.",
Expand All @@ -485,7 +485,7 @@
},
"uuid": "f22267e6-4fc0-412f-9653-33d19643b0a8"
},
"1060": {
"17": {
"varname": "qts_cpu_usage_windows_timeout",
"caption": "QTS CPU Usage: Timeout",
"description": "Network timeout in seconds.",
Expand All @@ -496,7 +496,7 @@
},
"uuid": "db30c41f-8140-4e96-9b51-e95127087b4e"
},
"1061": {
"18": {
"varname": "qts_cpu_usage_windows_url",
"caption": "QTS CPU Usage: URL",
"description": "QTS-based Appliance URL, for example https://192.168.1.1:8080.",
Expand All @@ -507,7 +507,7 @@
},
"uuid": "68d107a2-2ccc-4239-9f9c-7d6fd72ea571"
},
"1062": {
"19": {
"varname": "qts_cpu_usage_windows_username",
"caption": "QTS CPU Usage: Username",
"description": "QTS User.",
Expand All @@ -518,7 +518,7 @@
},
"uuid": "8b681c6f-193f-4db1-aa87-f64053eb4cdc"
},
"1063": {
"20": {
"varname": "qts_cpu_usage_windows_warning",
"caption": "QTS CPU Usage: Warning",
"description": "Set the warning threshold CPU Usage Percentage.",
Expand Down
Loading

0 comments on commit 4660b47

Please sign in to comment.