You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.4 KiB
31 lines
1.4 KiB
3 years ago
|
From bc20bf810660b96a7b24ecdb058a666e941c6cea Mon Sep 17 00:00:00 2001
|
||
|
From: Olof Mattsson <olof@devopsninja.nu>
|
||
|
Date: Thu, 22 Mar 2018 11:40:00 +0100
|
||
|
Subject: [PATCH 10/10] Fix to handle shovels in connections list on shovel
|
||
|
source server. (#92)
|
||
|
|
||
|
---
|
||
|
scripts/check_rabbitmq_connections | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/scripts/check_rabbitmq_connections b/scripts/check_rabbitmq_connections
|
||
|
index d8bcdfd..b059bac 100755
|
||
|
--- a/scripts/check_rabbitmq_connections
|
||
|
+++ b/scripts/check_rabbitmq_connections
|
||
|
@@ -149,9 +149,9 @@ $values->{'send_rate'} = 0;
|
||
|
for my $connection (@$result) {
|
||
|
if (not defined($p->opts->clientuser) or $p->opts->clientuser eq $connection->{"user"}) {
|
||
|
$values->{'connections'}++;
|
||
|
- $values->{'connections_notrunning'}++ if $connection->{"state"} ne "running";
|
||
|
- $values->{'receive_rate'} += $connection->{"recv_oct_details"}->{"rate"};
|
||
|
- $values->{'send_rate'} += $connection->{"send_oct_details"}->{"rate"};
|
||
|
+ $values->{'connections_notrunning'}++ if ((not defined $connection->{"state"}) || ($connection->{"state"} ne "running"));
|
||
|
+ $values->{'receive_rate'} += $connection->{"recv_oct_details"}->{"rate"} if (defined $connection->{"recv_oct_details"}->{"rate"});
|
||
|
+ $values->{'send_rate'} += $connection->{"send_oct_details"}->{"rate"} if (defined $connection->{"send_oct_details"}->{"rate"});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.20.1
|
||
|
|