@cryptotaxi247 / netdata-1 / commits / 603d8a9bc

[nginx_plus] fix handling of non-contiguous peer ids

`summary_stats()` mistakenly assumed that `/status` REST response contains peers with zero-based contiguous IDs, which is not the case when upstreams are changed dynamically (via dashboard or API).

illes committed Aug 29, 2018 at 15:01 UTC 603d8a9bc53bd5e75b7412ba0e3e75f252392412
1 file changed +1
python.d/nginx_plus.chart.py
+1
@@ -374,6 +374,7 @@ class WebUpstream:
374 return peer
375
376 def peers_stats(self, peers):
377 + peers = {int(peer['id']): peer for peer in peers}
378 data = dict()
379 for peer in self.peers.values():
380 if not peer.active: