1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Merge pull request #1477 from brknkfr/jellyfin_sessions_graph

[jellyfin_sessions] Updated graph parameters
This commit is contained in:
Kenyon Ralph 2025-01-27 23:49:18 -08:00 committed by GitHub
commit efe575c234
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,14 +71,19 @@ case $1 in
;;
config)
echo "graph_title Sessions on Jellyfin system"
echo "graph_vlabel sessions"
echo "graph_title Sessions on Jellyfin"
echo "graph_category appserver"
echo "graph_vlabel jellyfin sessions"
echo "graph_info Currently active sessions on jellyfin"
echo "graph_args --base 1000 --lower-limit 0"
echo "sessions.label sessions"
echo "sessions.info Active sessions on jellyfin"
echo "sessions.min 0"
exit 0
;;
esac
if active_sessions=$(curl -s -f -m "$max_time" -H "Authorization: MediaBrowser Token=$api_key" -X GET "$url_sessions"?activeWithinSeconds="$interval" | jq '. | length') | grep -E "[0-9]+"; then
if active_sessions=$(curl -s -f -m "$max_time" -H "Authorization: MediaBrowser Token=$api_key" -X GET "$url_sessions"?activeWithinSeconds="$interval" | jq '. | length' | grep -E "[0-9]+"); then
echo "sessions.value $active_sessions"
else
echo "sessions.value U"