1

Compare commits

...

2 Commits

Author SHA1 Message Date
kenji 67e365c8b3 Fix timeout type 2025-06-06 11:40:20 -04:00
kenji 810df62a78 Change py3-requests install to dispatcher container 2025-06-06 11:39:21 -04:00
2 changed files with 6 additions and 7 deletions
+3 -3
View File
@@ -16,8 +16,8 @@ The following parameters are supported by the plugin:
- `-A APIKEY` or `--apikey APIKEY`: specify the API key as `APIKEY` for HTTP endpoints - `-A APIKEY` or `--apikey APIKEY`: specify the API key as `APIKEY` for HTTP endpoints
Note that if running on LibreNMS in the official Docker container, then you must Note that if running on LibreNMS in the official Docker container, then you must
first install the `requests` module by running `apk add py3-requests` inside the first install the `requests` module by running `apk add py3-requests` inside the Dispatcher container. The full command, assuming your container is named
container. The full command, assuming your container is named `librenms`, is `dispatcher`, is
``` ```
docker exec -it librenms apk add py3-requests docker exec -it dispatcher apk add py3-requests
``` ```
+1 -2
View File
@@ -15,7 +15,7 @@ def main(args):
# load default values if not passed as arguments # load default values if not passed as arguments
if args.timeout: if args.timeout:
timeout = args.timeout timeout = float(args.timeout)
else: else:
timeout = 10 timeout = 10
@@ -61,7 +61,6 @@ def main(args):
rooms=data['totalRooms'] rooms=data['totalRooms']
users=data['totalUsers'] users=data['totalUsers']
print("MIROTALKSFU OK - %s second response time | rooms=%s users=%s" % (delay, rooms, users)) print("MIROTALKSFU OK - %s second response time | rooms=%s users=%s" % (delay, rooms, users))
#print(json.dumps(response.json()))
else: else:
print("MIROTALKSFU WARN - Unknown error") print("MIROTALKSFU WARN - Unknown error")
sys.exit(CODE_WARN) sys.exit(CODE_WARN)