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
+5 -5
View File
@@ -1,6 +1,6 @@
# check_mirotalksfu.py - Nagios plugin for MirotalkSFU server
# check_mirotalksfu.py - Nagios plugin for Mirotalk SFU server
This Nagios plugin will query a MirotalkSFU server and report on its status.
This Nagios plugin will query a Mirotalk SFU server and report on its status.
The "MIROTALKSFU OK" message will include the roundtrip response time, the
number of rooms open, and the number of users connected.
@@ -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
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
container. The full command, assuming your container is named `librenms`, is
first install the `requests` module by running `apk add py3-requests` inside the Dispatcher container. The full command, assuming your container is named
`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
if args.timeout:
timeout = args.timeout
timeout = float(args.timeout)
else:
timeout = 10
@@ -61,7 +61,6 @@ def main(args):
rooms=data['totalRooms']
users=data['totalUsers']
print("MIROTALKSFU OK - %s second response time | rooms=%s users=%s" % (delay, rooms, users))
#print(json.dumps(response.json()))
else:
print("MIROTALKSFU WARN - Unknown error")
sys.exit(CODE_WARN)