1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-28 17:57:22 +03:00

F #3859: Rename collectd-cl. to monitord-cl. (#4343)

This commit is contained in:
Jan Orel 2020-03-11 17:50:31 +01:00 committed by GitHub
parent a60c8a9f24
commit 2161d5e6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 47 additions and 46 deletions

1
.gitignore vendored
View File

@ -18,6 +18,7 @@ src/monitor/src/monitor/onemonitord
share/doc/one/html share/doc/one/html
src/vmm_mad/remotes/lib/lxd/svncterm_server/genfont src/vmm_mad/remotes/lib/lxd/svncterm_server/genfont
src/vmm_mad/remotes/lib/lxd/svncterm_server/svncterm_server src/vmm_mad/remotes/lib/lxd/svncterm_server/svncterm_server
src/im_mad/remotes/status.db
*.class *.class
src/oca/java/bin src/oca/java/bin

View File

@ -1116,8 +1116,8 @@ VMM_EXEC_PACKET_SCRIPTS="src/vmm_mad/remotes/packet/cancel \
# Information Manager Probes, to be installed under $REMOTES_LOCATION/im # Information Manager Probes, to be installed under $REMOTES_LOCATION/im
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
IM_PROBES_FILES="\ IM_PROBES_FILES="\
src/im_mad/remotes/run_probes \ src/im_mad/remotes/run_monitord_client \
src/im_mad/remotes/stop_probes" src/im_mad/remotes/stop_monitord_client"
IM_PROBES_LIB_FILES="\ IM_PROBES_LIB_FILES="\
src/im_mad/remotes/lib/kvm.rb \ src/im_mad/remotes/lib/kvm.rb \
@ -1128,11 +1128,11 @@ IM_PROBES_LIB_FILES="\
# KVM PROBES # KVM PROBES
IM_PROBES_KVM_FILES="\ IM_PROBES_KVM_FILES="\
src/im_mad/remotes/kvm.d/collectd-client_control.sh \ src/im_mad/remotes/kvm.d/monitord-client_control.sh \
src/im_mad/remotes/kvm.d/collectd-client.rb" src/im_mad/remotes/kvm.d/monitord-client.rb"
IM_PROBES_KVM_HOST_BEACON_FILES="\ IM_PROBES_KVM_HOST_BEACON_FILES="\
src/im_mad/remotes/kvm-probes.d/host/beacon/collectd-client-shepherd.sh \ src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh \
src/im_mad/remotes/kvm-probes.d/host/beacon/date.sh" src/im_mad/remotes/kvm-probes.d/host/beacon/date.sh"
IM_PROBES_KVM_HOST_MONITOR_FILES="\ IM_PROBES_KVM_HOST_MONITOR_FILES="\
@ -1156,7 +1156,7 @@ IM_PROBES_KVM_VM_MONITOR_FILES="\
src/im_mad/remotes/kvm-probes.d/vms/monitor/monitor_ds_vm.rb" src/im_mad/remotes/kvm-probes.d/vms/monitor/monitor_ds_vm.rb"
IM_PROBES_KVM_VM_STATUS_FILES="\ IM_PROBES_KVM_VM_STATUS_FILES="\
src/im_mad/remotes/kvm-probes.d/vms/status/status.rb" src/im_mad/remotes/kvm-probes.d/vms/status/state.rb"
IM_PROBES_ETC_KVM_PROBES_FILES="\ IM_PROBES_ETC_KVM_PROBES_FILES="\
src/im_mad/remotes/kvm-probes.d/pci.conf \ src/im_mad/remotes/kvm-probes.d/pci.conf \
@ -1164,11 +1164,11 @@ IM_PROBES_ETC_KVM_PROBES_FILES="\
# DUMMY PROBES # DUMMY PROBES
IM_PROBES_DUMMY_FILES="\ IM_PROBES_DUMMY_FILES="\
src/im_mad/remotes/dummy.d/collectd-client_control.sh \ src/im_mad/remotes/dummy.d/monitord-client_control.sh \
src/im_mad/remotes/dummy.d/collectd-client.rb" src/im_mad/remotes/dummy.d/monitord-client.rb"
IM_PROBES_DUMMY_HOST_BEACON_FILES="\ IM_PROBES_DUMMY_HOST_BEACON_FILES="\
src/im_mad/remotes/dummy-probes.d/host/beacon/collectd-client-shepherd_local.sh \ src/im_mad/remotes/dummy-probes.d/host/beacon/monitord-client-shepherd_local.sh \
src/im_mad/remotes/dummy-probes.d/host/beacon/date.sh" src/im_mad/remotes/dummy-probes.d/host/beacon/date.sh"
IM_PROBES_DUMMY_HOST_MONITOR_FILES="\ IM_PROBES_DUMMY_HOST_MONITOR_FILES="\
@ -1181,15 +1181,15 @@ IM_PROBES_DUMMY_VM_MONITOR_FILES="\
src/im_mad/remotes/dummy-probes.d/vms/monitor/monitor.rb" src/im_mad/remotes/dummy-probes.d/vms/monitor/monitor.rb"
IM_PROBES_DUMMY_VM_STATUS_FILES="\ IM_PROBES_DUMMY_VM_STATUS_FILES="\
src/im_mad/remotes/kvm-probes.d/vms/status/status.rb" src/im_mad/remotes/kvm-probes.d/vms/status/state.rb"
# LXD PROBES # LXD PROBES
IM_PROBES_LXD_FILES="\ IM_PROBES_LXD_FILES="\
src/im_mad/remotes/lxd.d/collectd-client_control.sh \ src/im_mad/remotes/lxd.d/monitord-client_control.sh \
src/im_mad/remotes/lxd.d/collectd-client.rb" src/im_mad/remotes/lxd.d/monitord-client.rb"
IM_PROBES_LXD_HOST_BEACON_FILES="\ IM_PROBES_LXD_HOST_BEACON_FILES="\
src/im_mad/remotes/lxd-probes.d/host/beacon/collectd-client-shepherd.sh \ src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh \
src/im_mad/remotes/lxd-probes.d/host/beacon/date.sh" src/im_mad/remotes/lxd-probes.d/host/beacon/date.sh"
IM_PROBES_LXD_HOST_MONITOR_FILES="\ IM_PROBES_LXD_HOST_MONITOR_FILES="\
@ -1213,7 +1213,7 @@ IM_PROBES_LXD_VM_MONITOR_FILES="\
src/im_mad/remotes/lxd-probes.d/vms/monitor/monitor_ds_vm.rb" src/im_mad/remotes/lxd-probes.d/vms/monitor/monitor_ds_vm.rb"
IM_PROBES_LXD_VM_STATUS_FILES="\ IM_PROBES_LXD_VM_STATUS_FILES="\
src/im_mad/remotes/lxd-probes.d/vms/status/status.rb" src/im_mad/remotes/lxd-probes.d/vms/status/state.rb"
IM_PROBES_ETC_LXD_PROBES_FILES="\ IM_PROBES_ETC_LXD_PROBES_FILES="\
src/im_mad/remotes/lxd-probes.d/pci.conf \ src/im_mad/remotes/lxd-probes.d/pci.conf \

View File

@ -43,8 +43,8 @@ AllCops:
- src/sunstone/bin/novnc-server - src/sunstone/bin/novnc-server
- src/sunstone/config.ru - src/sunstone/config.ru
- src/im_mad/remotes/dummy-probes.d/vms/monitor/monitor.rb - src/im_mad/remotes/dummy-probes.d/vms/monitor/monitor.rb
- src/im_mad/remotes/dummy.d/collectd-client.rb - src/im_mad/remotes/dummy.d/monitord-client.rb
- src/im_mad/remotes/dummy.d/collectd-client.rb - src/im_mad/remotes/dummy.d/monitord-client.rb
- src/im_mad/remotes/kvm-probes.d/host/monitor/numa_usage.rb - src/im_mad/remotes/kvm-probes.d/host/monitor/numa_usage.rb
- src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb - src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb
- src/im_mad/remotes/kvm-probes.d/host/system/numa_host.rb - src/im_mad/remotes/kvm-probes.d/host/system/numa_host.rb
@ -52,7 +52,7 @@ AllCops:
- src/im_mad/remotes/lib/probe_db.rb - src/im_mad/remotes/lib/probe_db.rb
- src/im_mad/remotes/lxd-probes.d/host/monitor/numa_usage.rb - src/im_mad/remotes/lxd-probes.d/host/monitor/numa_usage.rb
- src/im_mad/remotes/lxd-probes.d/host/system/numa_host.rb - src/im_mad/remotes/lxd-probes.d/host/system/numa_host.rb
- src/im_mad/remotes/lxd-probes.d/vms/status/status.rb - src/im_mad/remotes/lxd-probes.d/vms/status/state.rb
- src/im_mad/remotes/node-probes.d/numa_usage.rb - src/im_mad/remotes/node-probes.d/numa_usage.rb
- src/im_mad/remotes/lib/linux.rb - src/im_mad/remotes/lib/linux.rb
- src/im_mad/remotes/node-probes.d/numa_host.rb - src/im_mad/remotes/node-probes.d/numa_host.rb
@ -79,8 +79,8 @@ AllCops:
- src/im_mad/remotes/lxd-probes.d/host/system/pci.rb - src/im_mad/remotes/lxd-probes.d/host/system/pci.rb
- src/im_mad/remotes/lxd-probes.d/pci.rb - src/im_mad/remotes/lxd-probes.d/pci.rb
- src/im_mad/remotes/kvm-probes.d/pci.rb - src/im_mad/remotes/kvm-probes.d/pci.rb
- src/im_mad/remotes/kvm.d/collectd-client.rb - src/im_mad/remotes/kvm.d/monitord-client.rb
- src/im_mad/remotes/lxd.d/collectd-client.rb - src/im_mad/remotes/lxd.d/monitord-client.rb
- src/im_mad/remotes/vcenter.d/poll - src/im_mad/remotes/vcenter.d/poll
- src/im_mad/remotes/packet.d/poll - src/im_mad/remotes/packet.d/poll
- src/im_mad/remotes/ec2.d/poll - src/im_mad/remotes/ec2.d/poll
@ -317,7 +317,7 @@ AllCops:
- src/im_mad/remotes/lxd-probes.d/lxd.rb - src/im_mad/remotes/lxd-probes.d/lxd.rb
- src/im_mad/remotes/kvm-probes.d/kvm.rb - src/im_mad/remotes/kvm-probes.d/kvm.rb
- src/im_mad/remotes/kvm-probes.d/machines-models.rb - src/im_mad/remotes/kvm-probes.d/machines-models.rb
- src/im_mad/remotes/common.d/collectd-client.rb - src/im_mad/remotes/common.d/monitord-client.rb
- src/im_mad/remotes/node-probes.d/pci.rb - src/im_mad/remotes/node-probes.d/pci.rb
- src/hm_mad/one_hm.rb - src/hm_mad/one_hm.rb
- src/vnm_mad/one_vnm.rb - src/vnm_mad/one_vnm.rb

View File

@ -474,7 +474,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
break unless host break unless host
cmd = 'cat /tmp/one-collectd-client.pid | xargs kill -HUP' cmd = 'cat /tmp/one-monitord-client.pid | xargs kill -HUP'
system("ssh #{host['NAME']} \"#{cmd}\" 2>/dev/null") system("ssh #{host['NAME']} \"#{cmd}\" 2>/dev/null")
if !$CHILD_STATUS.success? if !$CHILD_STATUS.success?

View File

@ -77,7 +77,7 @@ class InformationManagerDriver < OpenNebulaDriver
input[:hostname], input[:hostname],
:START_MONITOR, :START_MONITOR,
:stdin => input[:stdin], :stdin => input[:stdin],
:script_name => 'run_probes', :script_name => 'run_monitord_client',
:zip => true, :zip => true,
:base64 => true) :base64 => true)
end end
@ -91,7 +91,7 @@ class InformationManagerDriver < OpenNebulaDriver
input[:host_id], input[:host_id],
input[:hostname], input[:hostname],
:STOP_MONITOR, :STOP_MONITOR,
:script_name => 'stop_probes', :script_name => 'stop_monitord_client',
:stdin => input[:stdin], :stdin => input[:stdin],
:zip => true, :zip => true,
:base64 => true) :base64 => true)

View File

@ -16,7 +16,7 @@
# limitations under the License. # # limitations under the License. #
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
#Arguments: hypervisor ds_location collectd_port monitor_push_period host_id hostname #Arguments: hypervisor ds_location monitord_port monitor_push_period host_id hostname
HYPERVISOR=$1 HYPERVISOR=$1
DATASTORE_LOCATION=${2:-"/var/lib/one/datastores"} DATASTORE_LOCATION=${2:-"/var/lib/one/datastores"}

View File

@ -17,9 +17,9 @@
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
( (
[ -f /tmp/one-collectd-client.pid ] || exit 0 [ -f /tmp/one-monitord-client.pid ] || exit 0
running_pid=$(cat /tmp/one-collectd-client.pid) running_pid=$(cat /tmp/one-monitord-client.pid)
pids=$(ps axuwww | grep /collectd-client.rb | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") pids=$(ps axuwww | grep -e /collectd-client.rb -e /monitord-client.rb| grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$")
if [ -n "$pids" ]; then if [ -n "$pids" ]; then
kill -6 $pids kill -6 $pids

View File

@ -21,13 +21,13 @@ HNAME=$3
STDIN=`cat -` STDIN=`cat -`
CLIENT_PID_FILE=/tmp/one-monitor-$HID.pid CLIENT_PID_FILE=/tmp/one-monitord-$HID.pid
( (
[ -f $CLIENT_PID_FILE ] || exit 0 [ -f $CLIENT_PID_FILE ] || exit 0
running_pid=$(cat $CLIENT_PID_FILE) running_pid=$(cat $CLIENT_PID_FILE)
pids=$(ps axuwww | grep "/collectd-client.rb.*${HID} " | grep -v grep | \ pids=$(ps axuwww | grep -e "/collectd-client.rb.*${HID}" -e "/monitord-client.rb.*${HID} " | grep -v grep | \
awk '{ print $2 }' | grep -v "^${running_pid}$") awk '{ print $2 }' | grep -v "^${running_pid}$")
if [ -n "$pids" ]; then if [ -n "$pids" ]; then

View File

@ -40,7 +40,7 @@ BASENAME=$(basename $0 _control.sh)
CLIENT=$DIR/${BASENAME}.rb CLIENT=$DIR/${BASENAME}.rb
# Collectd client PID # Collectd client PID
CLIENT_PID_FILE=/tmp/one-collectd-client.pid CLIENT_PID_FILE=/tmp/one-monitord-client.pid
# Launch the client # Launch the client
function start_client() { function start_client() {
@ -51,7 +51,7 @@ function start_client() {
# Stop the client # Stop the client
function stop_client() { function stop_client() {
local pids=$(ps axuww | grep /collectd-client.rb | grep -v grep | awk '{print $2}') local pids=$(ps axuww | grep /monitord-client.rb | grep -v grep | awk '{print $2}')
if [ -n "$pids" ]; then if [ -n "$pids" ]; then
kill -9 $pids kill -9 $pids

View File

@ -1 +0,0 @@
../../../common.d/collectd-client-shepherd_local.sh

View File

@ -0,0 +1 @@
../../../common.d/monitord-client-shepherd_local.sh

View File

@ -1 +0,0 @@
../common.d/collectd-client.rb

View File

@ -0,0 +1 @@
../common.d/monitord-client.rb

View File

@ -43,7 +43,7 @@ BASENAME=$(basename $0 _control.sh)
CLIENT=$DIR/${BASENAME}.rb CLIENT=$DIR/${BASENAME}.rb
# Collectd client PID # Collectd client PID
CLIENT_PID_FILE=/tmp/one-monitor-$HID.pid CLIENT_PID_FILE=/tmp/one-monitord-$HID.pid
# Launch the client # Launch the client
function start_client() { function start_client() {

View File

@ -17,9 +17,9 @@
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
( (
[ -f /tmp/one-collectd-client.pid ] || exit 0 [ -f /tmp/one-monitord-client.pid ] || exit 0
running_pid=$(cat /tmp/one-collectd-client.pid) running_pid=$(cat /tmp/one-monitord-client.pid)
pids=$(ps axuwww | grep "/collectd-client.rb lxd" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_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}$")
if [ -n "$pids" ]; then if [ -n "$pids" ]; then
kill -6 $pids kill -6 $pids

View File

@ -1 +0,0 @@
../common.d/collectd-client.rb

View File

@ -1 +0,0 @@
../common.d/collectd-client_control.sh

View File

@ -0,0 +1 @@
../common.d/monitord-client.rb

View File

@ -0,0 +1 @@
../common.d/monitord-client_control.sh

View File

@ -17,9 +17,9 @@
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
( (
[ -f /tmp/one-collectd-client.pid ] || exit 0 [ -f /tmp/one-monitord-client.pid ] || exit 0
running_pid=$(cat /tmp/one-collectd-client.pid) running_pid=$(cat /tmp/one-monitord-client.pid)
pids=$(ps axuwww | grep "/collectd-client.rb kvm" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_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}$")
if [ -n "$pids" ]; then if [ -n "$pids" ]; then
kill -6 $pids kill -6 $pids

View File

@ -1 +0,0 @@
../common.d/collectd-client.rb

View File

@ -1 +0,0 @@
../common.d/collectd-client_control.sh

View File

@ -0,0 +1 @@
../common.d/monitord-client.rb

View File

@ -0,0 +1 @@
../common.d/monitord-client_control.sh

View File

@ -16,7 +16,7 @@
# limitations under the License. # # limitations under the License. #
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
#Arguments: hypervisor(0) ds_location(1) collectd_port(2) host_id(3) hostname(4) #Arguments: hypervisor(0) ds_location(1) monitord_port(2) host_id(3) hostname(4)
source $(dirname $0)/../scripts_common.sh source $(dirname $0)/../scripts_common.sh

View File

@ -118,7 +118,7 @@ int TCPStream<E>::action_loop(int threads, std::string& error)
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
/* Create TCP socket for incoming collectd client connections */ /* Create TCP socket for incoming monitord client connections */
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
_socket = socket(res->ai_family, res->ai_socktype | SOCK_NONBLOCK, _socket = socket(res->ai_family, res->ai_socktype | SOCK_NONBLOCK,
res->ai_protocol); res->ai_protocol);