Add ntfy authentication to NEWS.
This commit is contained in:
parent
783a6d3b45
commit
8a9d5d93f5
3 changed files with 10 additions and 7 deletions
3
NEWS
3
NEWS
|
@ -1,3 +1,6 @@
|
||||||
|
1.7.8.dev0
|
||||||
|
* #621: Add optional authentication to the ntfy monitoring hook.
|
||||||
|
|
||||||
1.7.7
|
1.7.7
|
||||||
* #642: Add MySQL database hook "add_drop_database" configuration option to control whether dumped
|
* #642: Add MySQL database hook "add_drop_database" configuration option to control whether dumped
|
||||||
MySQL databases get dropped right before restore.
|
MySQL databases get dropped right before restore.
|
||||||
|
|
|
@ -62,14 +62,14 @@ def ping_monitor(hook_config, config_filename, state, monitoring_log_level, dry_
|
||||||
auth = None
|
auth = None
|
||||||
if (username and password) is not None:
|
if (username and password) is not None:
|
||||||
auth = requests.auth.HTTPBasicAuth(username, password)
|
auth = requests.auth.HTTPBasicAuth(username, password)
|
||||||
logger.info(f'{config_filename}: Using basic auth with user {username} for Ntfy')
|
logger.info(f'{config_filename}: Using basic auth with user {username} for ntfy')
|
||||||
elif username is not None:
|
elif username is not None:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
f'{config_filename}: Password missing for Ntfy authentication, defaulting to no auth'
|
f'{config_filename}: Password missing for ntfy authentication, defaulting to no auth'
|
||||||
)
|
)
|
||||||
elif password is not None:
|
elif password is not None:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
f'{config_filename}: Username missing for Ntfy authentication, defaulting to no auth'
|
f'{config_filename}: Username missing for ntfy authentication, defaulting to no auth'
|
||||||
)
|
)
|
||||||
|
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
|
@ -79,7 +79,7 @@ def ping_monitor(hook_config, config_filename, state, monitoring_log_level, dry_
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except requests.exceptions.RequestException as error:
|
except requests.exceptions.RequestException as error:
|
||||||
logger.warning(f'{config_filename}: Ntfy error: {error}')
|
logger.warning(f'{config_filename}: ntfy error: {error}')
|
||||||
|
|
||||||
|
|
||||||
def destroy_monitor(
|
def destroy_monitor(
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -1,6 +1,6 @@
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
VERSION = '1.7.7'
|
VERSION = '1.7.8.dev0'
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
Loading…
Reference in a new issue