|
| 1 | +Check grassfish-players |
| 2 | +======================= |
| 3 | + |
| 4 | +Overview |
| 5 | +-------- |
| 6 | + |
| 7 | +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. |
| 8 | + |
| 9 | +Tested with Grassfish v1.12. |
| 10 | + |
| 11 | +Hints: |
| 12 | + |
| 13 | +* May take more than 10 seconds to execute. |
| 14 | + |
| 15 | + |
| 16 | +Fact Sheet |
| 17 | +---------- |
| 18 | + |
| 19 | +.. csv-table:: |
| 20 | + :widths: 30, 70 |
| 21 | + |
| 22 | + "Check Plugin Download", "https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/grassfish-players" |
| 23 | + "Check Interval Recommendation", "Once an hour" |
| 24 | + "Can be called without parameters", "No" |
| 25 | + "Available for", "Python 3, Windows" |
| 26 | + "Requirements", "None" |
| 27 | + |
| 28 | + |
| 29 | +Help |
| 30 | +---- |
| 31 | + |
| 32 | +.. code-block:: text |
| 33 | +
|
| 34 | + usage: grassfish-players [-h] [-V] [--always-ok] [--api-version API_VERSION] |
| 35 | + [--box-id BOX_ID] |
| 36 | + [--box-state {activated,deleted,new,reserved,undefined}] |
| 37 | + [--custom-id CUSTOM_ID] -H HOSTNAME |
| 38 | + [--is-installed {yes,no}] [--is-licensed {yes,no}] |
| 39 | + [--lengthy] [--port PORT] [--test TEST] --token |
| 40 | + TOKEN [--transfer-status {complete,overdue,pending}] |
| 41 | + [-w WARN] [-u URL] |
| 42 | +
|
| 43 | + This monitoring plugin shows you a list of Grassfish players whose data |
| 44 | + transfer status is overdue, whose last access date is more than `--warning` |
| 45 | + hours ago or who are unlicensed. The list of players can be filtered. You must |
| 46 | + provide both the Grassfish hostname and a Grassfish token for this check to |
| 47 | + work. |
| 48 | +
|
| 49 | + options: |
| 50 | + -h, --help show this help message and exit |
| 51 | + -V, --version show program's version number and exit |
| 52 | + --always-ok Always returns OK. |
| 53 | + --api-version API_VERSION |
| 54 | + Grassfish API Version. Default: 1.12 |
| 55 | + --box-id BOX_ID Filter by specific box IDs. Supports Python Regular |
| 56 | + Expressions (regex). |
| 57 | + --box-state {activated,deleted,new,reserved,undefined} |
| 58 | + Filter by specific box state. Repeating. |
| 59 | + --custom-id CUSTOM_ID |
| 60 | + Filter by specific custom IDs. Supports Python Regular |
| 61 | + Expressions (regex). |
| 62 | + -H HOSTNAME, --hostname HOSTNAME |
| 63 | + Grassfish hostname. Default: None |
| 64 | + --is-installed {yes,no} |
| 65 | + Filter by boxes that are installed (= "yes") or not (= |
| 66 | + "no"). Repeating. |
| 67 | + --is-licensed {yes,no} |
| 68 | + Filter by boxes that are licensed (= "yes") or not (= |
| 69 | + "no"). Repeating. |
| 70 | + --lengthy Extended reporting. |
| 71 | + --port PORT Grassfish port. Default: 443 |
| 72 | + --test TEST For unit tests. Needs "path-to-stdout-file,path-to- |
| 73 | + stderr-file,expected-retc". |
| 74 | + --token TOKEN Grassfish API token |
| 75 | + --transfer-status {complete,overdue,pending} |
| 76 | + Filter by specific data transfer status. Repeating. |
| 77 | + -w WARN, --warning WARN |
| 78 | + Set the WARN threshold for Last Access in hours |
| 79 | + (considers player is offline). Default: > 8 h |
| 80 | + -u URL, --url URL Grassfish API URL. Default: /gv2/webservices/API |
| 81 | +
|
| 82 | +
|
| 83 | +Usage Examples |
| 84 | +-------------- |
| 85 | + |
| 86 | +.. code-block:: bash |
| 87 | +
|
| 88 | + ./grassfish-players --hostname=ds.example.com --token=TOKEN --box-id=gp11 |
| 89 | +
|
| 90 | +Output: |
| 91 | + |
| 92 | +.. code-block:: text |
| 93 | +
|
| 94 | + There are 6 players with warnings: 2 unlicensed, 2 transfer overdue, 6 accessed > 10 hours ago. 6 players checked. Filter: --box-state=['activated'] |
| 95 | +
|
| 96 | + Box ID ! License Type ! Name ! Box State ! Lic ! Transfer ! Last Access |
| 97 | + ----------+-------------------------+----------------------+-----------+-----------------+-------------------+-------------------------------------------- |
| 98 | + GP111-111 ! Player ! Grassfish Player 111 ! Activated ! True ! Complete ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] |
| 99 | + GP112-112 ! DsPlayerAdvancedSaas ! Grassfish Player 112 ! Activated ! True ! Pending ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] |
| 100 | + GP113-113 ! ColorDoorSignPlayerSaas ! Grassfish Player 113 ! Activated ! True ! Overdue [WARNING] ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] |
| 101 | + GP114-114 ! ColorDoorSignPlayerSaas ! Grassfish Player 114 ! Activated ! True ! Complete ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] |
| 102 | + GP115-115 ! ColorDoorSignPlayerSaas ! Grassfish Player 115 ! Activated ! False [WARNING] ! Complete ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] |
| 103 | + GP117-117 ! ColorDoorSignPlayerSaas ! Grassfish Player 117 ! Activated ! False [WARNING] ! Overdue [WARNING] ! 2020-03-09 14:07:53 (2Y 12M ago) [WARNING] |
| 104 | +
|
| 105 | +
|
| 106 | +States |
| 107 | +------ |
| 108 | + |
| 109 | +* WARN if player is not licensed |
| 110 | +* WARN if player's transfer status is "Overdue" |
| 111 | +* WARN if player's last access timestamp is > ``--warning`` hours (which considers player is offline) |
| 112 | + |
| 113 | + |
| 114 | +Perfdata / Metrics |
| 115 | +------------------ |
| 116 | + |
| 117 | +.. csv-table:: |
| 118 | + :widths: 25, 15, 60 |
| 119 | + :header-rows: 1 |
| 120 | + |
| 121 | + Name, Type, Description |
| 122 | + grassfish_play_players, Number, Number of matching players found |
| 123 | + grassfish_play_unlicensed, Number, Number of unlicensed players |
| 124 | + grassfish_play_transfer_overdue, Number, Number of player with transfer status "Overdue" |
| 125 | + grassfish_play_access_overdue, Number, Number of players with last access timestamp > ``--warning`` hours |
| 126 | + grassfish_play_warnings, Number, grassfish_play_unlicensed + grassfish_play_transfer_overdue + grassfish_play_access_overdue |
| 127 | + |
| 128 | + |
| 129 | +Credits, License |
| 130 | +---------------- |
| 131 | + |
| 132 | +* Authors: `Linuxfabrik GmbH, Zurich <https://www.linuxfabrik.ch>`_ |
| 133 | +* License: The Unlicense, see `LICENSE file <https://unlicense.org/>`_. |
0 commit comments