1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Merge pull request #1497 from brknkfr/nextcloud_apps

[nextcloud_]: Allow to disable check for app updates
This commit is contained in:
Kenyon Ralph 2025-06-06 11:32:21 -07:00 committed by GitHub
commit 0c06911a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,6 +34,7 @@ Set username and password in your munin-node configuration
env.scheme <default: https> env.scheme <default: https>
env.timeout <default: 2s> env.timeout <default: 2s>
env.updates_warning <default: 1> env.updates_warning <default: 1>
env.check_app_updates <default: true>
It's advised to use a serverinfo token, or at least to set an app password (for It's advised to use a serverinfo token, or at least to set an app password (for
this plugin) in your nextcloud instance and not to use the "real" password of this plugin) in your nextcloud instance and not to use the "real" password of
@ -71,13 +72,18 @@ if [ "${MUNIN_DEBUG:-0}" = 1 ]; then
set -x set -x
fi fi
API_PATH="${api_path:-/ocs/v2.php/apps/serverinfo/api/v1/info}?format=json&skipApps=false" CHECK_APP_UPDATES="${check_app_updates:-true}"
API_PATH="${api_path:-/ocs/v2.php/apps/serverinfo/api/v1/info}?format=json&skipApps=$check_app_updates"
DOMAIN="${0##*nextcloud_}" DOMAIN="${0##*nextcloud_}"
SCHEME="${scheme:-https}://" SCHEME="${scheme:-https}://"
TIMEOUT="${timeout:-2}" TIMEOUT="${timeout:-2}"
UPDATES_WARNING="${updates_warning:-1}" UPDATES_WARNING="${updates_warning:-1}"
CLEANDOMAIN="$(clean_fieldname "${DOMAIN}")" CLEANDOMAIN="$(clean_fieldname "${DOMAIN}")"
if [ "$CHECK_APP_UPDATES" = "false" ]; then
UPDATES_WARNING="-1"
fi
SERVERINFO_TOKEN="${serverinfo_token}" SERVERINFO_TOKEN="${serverinfo_token}"
if [ -z "${SERVERINFO_TOKEN}" ]; then if [ -z "${SERVERINFO_TOKEN}" ]; then
USERNAME="${username:-}" USERNAME="${username:-}"