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 #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) config)
echo "graph_title Sessions on Jellyfin system" echo "graph_title Sessions on Jellyfin"
echo "graph_vlabel sessions" 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.label sessions"
echo "sessions.info Active sessions on jellyfin"
echo "sessions.min 0"
exit 0 exit 0
;; ;;
esac 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" echo "sessions.value $active_sessions"
else else
echo "sessions.value U" echo "sessions.value U"