diff --git a/tests/all.sh b/tests/all.sh index a046f91..89ec737 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -224,7 +224,8 @@ function discoverAll() { else DATA_COUNT=$(echo "$DATA_COUNT + 1" | bc) if [[ $DATA_COUNT -gt 10 ]]; then - echo "Data old: $DATA_OLD, data new: $DATA" + echo "Data old: $DATA_OLD" + echo "Data new: $DATA" return 1 fi discoverAll "$DATA" "$DATA_COUNT" diff --git a/zabbix/zabbix_php_fpm_discovery.sh b/zabbix/zabbix_php_fpm_discovery.sh index 46c93e9..439c84e 100644 --- a/zabbix/zabbix_php_fpm_discovery.sh +++ b/zabbix/zabbix_php_fpm_discovery.sh @@ -300,6 +300,9 @@ function SavePrintResults() { PrintDebug "Saving pending pools list to file $PENDING_FILE..." ${S_PRINTF} "%s\n" "${PENDING_LIST[@]}" >"$PENDING_FILE" + #We must sort the cache list + readarray -t CACHE < <(for a in "${CACHE[@]}"; do echo "$a"; done | sort) + if [[ -n $DEBUG_MODE ]]; then PrintDebug "List of pools to be saved to cache pools file:" PrintCacheList