munin-monitoring / contrib

Contributed stuff for munin (plugins, tools, etc...)
http://munin-monitoring.org
1.05k stars 678 forks source link

[icecast2_stats_] Fix sources parsing if there is only one source #1369

Closed codeurimpulsif closed 1 year ago

codeurimpulsif commented 1 year ago

Goal

Informations

By default with Icecast2, when more than one source is available ["icestats"]["source"] is an array of dict (each dict is a source) but when only one source is available ["icestats"]["source"] is just a dict with the single source values.

This change check if ["icestats"]["source"] is a dict or not to make an appropriate parsing choice.