From 577619deb8c9528b6925d6abcda72d2bb5f0d1d3 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 17 Mar 2020 16:31:58 +0100 Subject: [PATCH] F #3859: Fix probe renaming (cherry picked from commit 7424216f46226450dc27bc0a34030c37dfcce314) --- src/im_mad/remotes/common.d/monitord-client-shepherd.sh | 2 +- src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh | 2 +- .../kvm-probes.d/host/beacon/monitord-client-shepherd.sh | 2 +- .../lxd-probes.d/host/beacon/monitord-client-shepherd.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/im_mad/remotes/common.d/monitord-client-shepherd.sh b/src/im_mad/remotes/common.d/monitord-client-shepherd.sh index 5d099a7b81..d480253f32 100755 --- a/src/im_mad/remotes/common.d/monitord-client-shepherd.sh +++ b/src/im_mad/remotes/common.d/monitord-client-shepherd.sh @@ -19,7 +19,7 @@ ( [ -f /tmp/one-monitord-client.pid ] || exit 0 running_pid=$(cat /tmp/one-monitord-client.pid) -pids=$(ps axuwww | grep -e /collectd-client.rb -e /monitord-client.rb| grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") +pids=$(ps axuwww | grep -e /monitord-client.rb| grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then kill -6 $pids diff --git a/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh b/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh index 58c69c2687..5e86f8942d 100755 --- a/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh +++ b/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh @@ -27,7 +27,7 @@ CLIENT_PID_FILE=/tmp/one-monitord-$HID.pid [ -f $CLIENT_PID_FILE ] || exit 0 running_pid=$(cat $CLIENT_PID_FILE) -pids=$(ps axuwww | grep -e "/collectd-client.rb.*${HID}" -e "/monitord-client.rb.*${HID} " | grep -v grep | \ +pids=$(ps axuwww | grep -e "/monitord-client.rb.*${HID} " | grep -v grep | \ awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then diff --git a/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh b/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh index ec4f70a5b5..0260877722 100755 --- a/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh +++ b/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh @@ -19,7 +19,7 @@ ( [ -f /tmp/one-monitord-client.pid ] || exit 0 running_pid=$(cat /tmp/one-monitord-client.pid) -pids=$(ps axuwww | grep -e "/collectd-client.rb kvm" -e "/monitord-client.rb kvm" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") +pids=$(ps axuwww | grep -e "/monitord-client.rb kvm" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then kill -6 $pids diff --git a/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh b/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh index 0edcd59638..f830755c02 100755 --- a/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh +++ b/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh @@ -19,7 +19,7 @@ ( [ -f /tmp/one-monitord-client.pid ] || exit 0 running_pid=$(cat /tmp/one-monitord-client.pid) -pids=$(ps axuwww | grep -e "/monitord-client.rb lxd" -e "/collectd-client.rb lxd" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") +pids=$(ps axuwww | grep -e "/monitord-client.rb lxd" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then kill -6 $pids