-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add grassfish-players, grassfish-screens
- Loading branch information
Showing
32 changed files
with
3,821 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
Check grassfish-players | ||
======================= | ||
|
||
Overview | ||
-------- | ||
|
||
The Grassfish Platform offers a unified way to manage Digital Signage touchpoints. This monitoring plugin shows you a list of Grassfish players whose data transfer status is overdue, whose last access date is more than ``--warning`` hours ago or who are unlicensed. The list of players can be filtered. You must provide both the Grassfish hostname and a Grassfish token for this check to work. | ||
|
||
Tested with Grassfish v1.12. | ||
|
||
Hints: | ||
|
||
* May take more than 10 seconds to execute. | ||
|
||
|
||
Fact Sheet | ||
---------- | ||
|
||
.. csv-table:: | ||
:widths: 30, 70 | ||
|
||
"Check Plugin Download", "https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/grassfish-players" | ||
"Check Interval Recommendation", "Once an hour" | ||
"Can be called without parameters", "No" | ||
"Available for", "Python 3, Windows" | ||
"Requirements", "None" | ||
|
||
|
||
Help | ||
---- | ||
|
||
.. code-block:: text | ||
usage: grassfish-players [-h] [-V] [--always-ok] [--api-version API_VERSION] | ||
[--box-id BOX_ID] | ||
[--box-state {activated,deleted,new,reserved,undefined}] | ||
[--custom-id CUSTOM_ID] -H HOSTNAME | ||
[--is-installed {yes,no}] [--is-licensed {yes,no}] | ||
[--lengthy] [--port PORT] [--test TEST] --token | ||
TOKEN [--transfer-status {complete,overdue,pending}] | ||
[-w WARN] [-u URL] | ||
This monitoring plugin shows you a list of Grassfish players whose data | ||
transfer status is overdue, whose last access date is more than `--warning` | ||
hours ago or who are unlicensed. The list of players can be filtered. You must | ||
provide both the Grassfish hostname and a Grassfish token for this check to | ||
work. | ||
options: | ||
-h, --help show this help message and exit | ||
-V, --version show program's version number and exit | ||
--always-ok Always returns OK. | ||
--api-version API_VERSION | ||
Grassfish API Version. Default: 1.12 | ||
--box-id BOX_ID Filter by specific box IDs. Supports Python Regular | ||
Expressions (regex). | ||
--box-state {activated,deleted,new,reserved,undefined} | ||
Filter by specific box state. Repeating. | ||
--custom-id CUSTOM_ID | ||
Filter by specific custom IDs. Supports Python Regular | ||
Expressions (regex). | ||
-H HOSTNAME, --hostname HOSTNAME | ||
Grassfish hostname. Default: None | ||
--is-installed {yes,no} | ||
Filter by boxes that are installed (= "yes") or not (= | ||
"no"). Repeating. | ||
--is-licensed {yes,no} | ||
Filter by boxes that are licensed (= "yes") or not (= | ||
"no"). Repeating. | ||
--lengthy Extended reporting. | ||
--port PORT Grassfish port. Default: 443 | ||
--test TEST For unit tests. Needs "path-to-stdout-file,path-to- | ||
stderr-file,expected-retc". | ||
--token TOKEN Grassfish API token | ||
--transfer-status {complete,overdue,pending} | ||
Filter by specific data transfer status. Repeating. | ||
-w WARN, --warning WARN | ||
Set the WARN threshold for Last Access in hours | ||
(considers player is offline). Default: > 8 h | ||
-u URL, --url URL Grassfish API URL. Default: /gv2/webservices/API | ||
Usage Examples | ||
-------------- | ||
|
||
.. code-block:: bash | ||
./grassfish-players --hostname=ds.example.com --token=TOKEN --box-id=gp11 | ||
Output: | ||
|
||
.. code-block:: text | ||
There are 6 players with warnings: 2 unlicensed, 2 transfer overdue, 6 accessed > 10 hours ago. 6 players checked. Filter: --box-state=['activated'] | ||
Box ID ! License Type ! Name ! Box State ! Lic ! Transfer ! Last Access | ||
----------+-------------------------+----------------------+-----------+-----------------+-------------------+-------------------------------------------- | ||
GP111-111 ! Player ! Grassfish Player 111 ! Activated ! True ! Complete ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] | ||
GP112-112 ! DsPlayerAdvancedSaas ! Grassfish Player 112 ! Activated ! True ! Pending ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] | ||
GP113-113 ! ColorDoorSignPlayerSaas ! Grassfish Player 113 ! Activated ! True ! Overdue [WARNING] ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] | ||
GP114-114 ! ColorDoorSignPlayerSaas ! Grassfish Player 114 ! Activated ! True ! Complete ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] | ||
GP115-115 ! ColorDoorSignPlayerSaas ! Grassfish Player 115 ! Activated ! False [WARNING] ! Complete ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] | ||
GP117-117 ! ColorDoorSignPlayerSaas ! Grassfish Player 117 ! Activated ! False [WARNING] ! Overdue [WARNING] ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] | ||
States | ||
------ | ||
|
||
* WARN if player is not licensed | ||
* WARN if player's transfer status is "Overdue" | ||
* WARN if player's last access timestamp is > ``--warning`` hours (which considers player is offline) | ||
|
||
|
||
Perfdata / Metrics | ||
------------------ | ||
|
||
.. csv-table:: | ||
:widths: 25, 15, 60 | ||
:header-rows: 1 | ||
|
||
Name, Type, Description | ||
grassfish_play_players, Number, Number of matching players found | ||
grassfish_play_unlicensed, Number, Number of unlicensed players | ||
grassfish_play_transfer_overdue, Number, Number of player with transfer status "Overdue" | ||
grassfish_play_access_overdue, Number, Number of players with last access timestamp > ``--warning`` hours | ||
grassfish_play_warnings, Number, grassfish_play_unlicensed + grassfish_play_transfer_overdue + grassfish_play_access_overdue | ||
|
||
|
||
Credits, License | ||
---------------- | ||
|
||
* Authors: `Linuxfabrik GmbH, Zurich <https://www.linuxfabrik.ch>`_ | ||
* License: The Unlicense, see `LICENSE file <https://unlicense.org/>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"Id": 111, | ||
"Name": "Grassfish Player 111", | ||
"CustomId": "GP1", | ||
"LocationId": 1, | ||
"EditionId": 1, | ||
"ConfigurationGroupId": 1, | ||
"BoxId": "GP111-111", | ||
"LastAccess": "2020-03-09T14:07:53Z", | ||
"LicenseType": "Player", | ||
"TransferStatus": "Complete", | ||
"IsInstalled": true, | ||
"IsLicensed": true, | ||
"Address": "MyAddress", | ||
"PostCode": "111", | ||
"City": "City", | ||
"Country": "Country", | ||
"TemperatureUnit": "Undefined", | ||
"BoxState": "Activated", | ||
"TimezoneId": 293, | ||
"RootPasswordSet": false, | ||
"Created": "2019-05-10T11:03:52Z", | ||
"Modified": "2021-11-25T12:34:33Z" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"Id": 112, | ||
"Name": "Grassfish Player 112", | ||
"CustomId": "GP1", | ||
"LocationId": 1, | ||
"EditionId": 1, | ||
"ConfigurationGroupId": 1, | ||
"BoxId": "GP112-112", | ||
"LastAccess": "2020-03-09T14:07:53Z", | ||
"LicenseType": "DsPlayerAdvancedSaas", | ||
"TransferStatus": "Pending", | ||
"IsInstalled": true, | ||
"IsLicensed": true, | ||
"Address": "MyAddress", | ||
"PostCode": "112", | ||
"City": "City", | ||
"Country": "Country", | ||
"TemperatureUnit": "Undefined", | ||
"BoxState": "Activated", | ||
"TimezoneId": 293, | ||
"RootPasswordSet": false, | ||
"Created": "2019-05-10T11:03:52Z", | ||
"Modified": "2021-11-25T12:34:33Z" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"Id": 113, | ||
"Name": "Grassfish Player 113", | ||
"CustomId": "GP1", | ||
"LocationId": 1, | ||
"EditionId": 1, | ||
"ConfigurationGroupId": 1, | ||
"BoxId": "GP113-113", | ||
"LastAccess": "2020-03-09T14:07:53Z", | ||
"LicenseType": "ColorDoorSignPlayerSaas", | ||
"TransferStatus": "Overdue", | ||
"IsInstalled": true, | ||
"IsLicensed": true, | ||
"Address": "MyAddress", | ||
"PostCode": "113", | ||
"City": "City", | ||
"Country": "Country", | ||
"TemperatureUnit": "Undefined", | ||
"BoxState": "Activated", | ||
"TimezoneId": 293, | ||
"RootPasswordSet": false, | ||
"Created": "2019-05-10T11:03:52Z", | ||
"Modified": "2021-11-25T12:34:33Z" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"Id": 114, | ||
"Name": "Grassfish Player 114", | ||
"CustomId": "GP1", | ||
"LocationId": 1, | ||
"EditionId": 1, | ||
"ConfigurationGroupId": 1, | ||
"BoxId": "GP114-114", | ||
"LastAccess": "2020-03-09T14:07:53Z", | ||
"LicenseType": "ColorDoorSignPlayerSaas", | ||
"TransferStatus": "Complete", | ||
"IsInstalled": false, | ||
"IsLicensed": true, | ||
"Address": "MyAddress", | ||
"PostCode": "114", | ||
"City": "City", | ||
"Country": "Country", | ||
"TemperatureUnit": "Undefined", | ||
"BoxState": "Activated", | ||
"TimezoneId": 293, | ||
"RootPasswordSet": false, | ||
"Created": "2019-05-10T11:03:52Z", | ||
"Modified": "2021-11-25T12:34:33Z" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"Id": 115, | ||
"Name": "Grassfish Player 115", | ||
"CustomId": "GP1", | ||
"LocationId": 1, | ||
"EditionId": 1, | ||
"ConfigurationGroupId": 1, | ||
"BoxId": "GP115-115", | ||
"LastAccess": "2020-03-09T14:07:53Z", | ||
"LicenseType": "ColorDoorSignPlayerSaas", | ||
"TransferStatus": "Complete", | ||
"IsInstalled": true, | ||
"IsLicensed": false, | ||
"Address": "MyAddress", | ||
"PostCode": "115", | ||
"City": "City", | ||
"Country": "Country", | ||
"TemperatureUnit": "Undefined", | ||
"BoxState": "Activated", | ||
"TimezoneId": 293, | ||
"RootPasswordSet": false, | ||
"Created": "2019-05-10T11:03:52Z", | ||
"Modified": "2021-11-25T12:34:33Z" | ||
} | ||
] |
Oops, something went wrong.