From 3896a7a72bd94c9bcf02ae0c6c51b4daca8a5419 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Tue, 8 Sep 2015 14:32:47 +0200 Subject: [PATCH] Modify ykval-munin-queuelength plugin. - don't auto configure if running a single node cluster. (i.e. no queues for sync requests to other servers). --- ykval-munin-queuelength.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ykval-munin-queuelength.php b/ykval-munin-queuelength.php index abda118..5ecf7b1 100755 --- a/ykval-munin-queuelength.php +++ b/ykval-munin-queuelength.php @@ -53,8 +53,14 @@ $shortnames = array_map("url2shortname", $urls); if ($argc == 2 && strcmp($argv[1], "autoconf") == 0) { - print "yes\n"; - exit(0); + if (is_array($urls) && count($urls) > 0) + { + echo "yes\n"; + exit(0); + } + + echo "no (sync pool not configured)\n"; + exit(0); } if ($argc==2 && strcmp($argv[1], "config") == 0)