feat: add support for uptime kuma 1.21.1
This commit is contained in:
parent
b33d2323ca
commit
2773d02ee6
4 changed files with 35 additions and 4 deletions
|
@ -8,7 +8,7 @@ This package was developed to configure Uptime Kuma with Ansible. The Ansible co
|
||||||
|
|
||||||
Python version 3.6+ is required.
|
Python version 3.6+ is required.
|
||||||
|
|
||||||
Supported Uptime Kuma versions: 1.17.0 - 1.21.0
|
Supported Uptime Kuma versions: 1.17.0 - 1.21.1
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
---
|
---
|
||||||
|
|
|
@ -5,7 +5,7 @@ if [ $version ]
|
||||||
then
|
then
|
||||||
versions=("$version")
|
versions=("$version")
|
||||||
else
|
else
|
||||||
versions=(1.21.0 1.20.2 1.19.6 1.18.5 1.17.1)
|
versions=(1.21.1 1.20.2 1.19.6 1.18.5 1.17.1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for version in ${versions[*]}
|
for version in ${versions[*]}
|
||||||
|
|
|
@ -109,8 +109,8 @@ def notification_docstring(mode) -> str:
|
||||||
:param str, optional lineChannelAccessToken: Notification option for ``type`` :attr:`~.NotificationType.LINE`
|
:param str, optional lineChannelAccessToken: Notification option for ``type`` :attr:`~.NotificationType.LINE`
|
||||||
:param str, optional lineUserID: Notification option for ``type`` :attr:`~.NotificationType.LINE`
|
:param str, optional lineUserID: Notification option for ``type`` :attr:`~.NotificationType.LINE`
|
||||||
:param str, optional lunaseaTarget: Notification option for ``type`` :attr:`~.NotificationType.LUNASEA`. Allowed values: "device", "user".
|
:param str, optional lunaseaTarget: Notification option for ``type`` :attr:`~.NotificationType.LUNASEA`. Allowed values: "device", "user".
|
||||||
:param str, optional lunaseaUserID: Notification option for ``type`` :attr:`~.NotificationType.LUNASEA`
|
:param str, optional lunaseaUserID: Notification option for ``type`` :attr:`~.NotificationType.LUNASEA`. User ID.
|
||||||
:param str, optional lunaseaDevice: Notification option for ``type`` :attr:`~.NotificationType.LUNASEA`
|
:param str, optional lunaseaDevice: Notification option for ``type`` :attr:`~.NotificationType.LUNASEA`. Device ID.
|
||||||
:param str, optional internalRoomId: Notification option for ``type`` :attr:`~.NotificationType.MATRIX`
|
:param str, optional internalRoomId: Notification option for ``type`` :attr:`~.NotificationType.MATRIX`
|
||||||
:param str, optional accessToken: Notification option for ``type`` :attr:`~.NotificationType.MATRIX`
|
:param str, optional accessToken: Notification option for ``type`` :attr:`~.NotificationType.MATRIX`
|
||||||
:param str, optional homeserverUrl: Notification option for ``type`` :attr:`~.NotificationType.MATRIX`
|
:param str, optional homeserverUrl: Notification option for ``type`` :attr:`~.NotificationType.MATRIX`
|
||||||
|
@ -275,6 +275,16 @@ def notification_docstring(mode) -> str:
|
||||||
- ``WARNING``
|
- ``WARNING``
|
||||||
- ``CRITICAL``
|
- ``CRITICAL``
|
||||||
:param str, optional splunkRestURL: Notification option for ``type`` :attr:`~.NotificationType.SPLUNK`. Splunk Rest URL.
|
:param str, optional splunkRestURL: Notification option for ``type`` :attr:`~.NotificationType.SPLUNK`. Splunk Rest URL.
|
||||||
|
:param int, optional opsgeniePriority: Notification option for ``type`` :attr:`~.NotificationType.OPSGENIE`. Priority. Available values are numbers between ``1`` and ``5``.
|
||||||
|
:param str, optional opsgenieRegion: Notification option for ``type`` :attr:`~.NotificationType.OPSGENIE`. Region. Available values are:
|
||||||
|
|
||||||
|
- ``us``: US (Default)
|
||||||
|
- ``eu``: EU
|
||||||
|
:param str, optional opsgenieApiKey: Notification option for ``type`` :attr:`~.NotificationType.OPSGENIE`. API Key.
|
||||||
|
:param str, optional twilioAccountSID: Notification option for ``type`` :attr:`~.NotificationType.TWILIO`. Account SID.
|
||||||
|
:param str, optional twilioAuthToken: Notification option for ``type`` :attr:`~.NotificationType.TWILIO`. Auth Token.
|
||||||
|
:param str, optional twilioToNumber: Notification option for ``type`` :attr:`~.NotificationType.TWILIO`. To Number.
|
||||||
|
:param str, optional twilioFromNumber: Notification option for ``type`` :attr:`~.NotificationType.TWILIO`. From Number.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,12 @@ class NotificationType(str, Enum):
|
||||||
SPLUNK = "Splunk"
|
SPLUNK = "Splunk"
|
||||||
"""Splunk"""
|
"""Splunk"""
|
||||||
|
|
||||||
|
OPSGENIE = "Opsgenie"
|
||||||
|
"""Opsgenie"""
|
||||||
|
|
||||||
|
TWILIO = "twilio"
|
||||||
|
"""twilio"""
|
||||||
|
|
||||||
|
|
||||||
notification_provider_options = {
|
notification_provider_options = {
|
||||||
NotificationType.ALERTA: dict(
|
NotificationType.ALERTA: dict(
|
||||||
|
@ -411,6 +417,17 @@ notification_provider_options = {
|
||||||
splunkAutoResolve=dict(type="str"),
|
splunkAutoResolve=dict(type="str"),
|
||||||
splunkSeverity=dict(type="str"),
|
splunkSeverity=dict(type="str"),
|
||||||
splunkRestURL=dict(type="str")
|
splunkRestURL=dict(type="str")
|
||||||
|
),
|
||||||
|
NotificationType.OPSGENIE: dict(
|
||||||
|
opsgeniePriority=dict(type="int"),
|
||||||
|
opsgenieRegion=dict(type="str"),
|
||||||
|
opsgenieApiKey=dict(type="str")
|
||||||
|
),
|
||||||
|
NotificationType.TWILIO: dict(
|
||||||
|
twilioAccountSID=dict(type="str"),
|
||||||
|
twilioAuthToken=dict(type="str"),
|
||||||
|
twilioToNumber=dict(type="str"),
|
||||||
|
twilioFromNumber=dict(type="str")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,5 +447,9 @@ notification_provider_conditions = dict(
|
||||||
smseaglePriority=dict(
|
smseaglePriority=dict(
|
||||||
min=0,
|
min=0,
|
||||||
max=9
|
max=9
|
||||||
|
),
|
||||||
|
opsgeniePriority=dict(
|
||||||
|
min=1,
|
||||||
|
max=5
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue