Skip to content

Commit

Permalink
[ganglia] Using $(hostname -s) vs ${HOSTNAME} (#1147)
Browse files Browse the repository at this point in the history
Recent change in the hostname implementation has required that we find
short hostname using a different mechanism.  This patch makes that
change.
  • Loading branch information
cjac committed Feb 26, 2024
1 parent 2af960e commit 43d02c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ganglia/ganglia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function main() {
sed -e '/bind /s/^ / #/' -i /etc/ganglia/gmond.conf
sed -e "/udp_send_channel {/a\ host = ${master_hostname}" -i /etc/ganglia/gmond.conf

if [[ "${HOSTNAME}" == "${master_hostname}" ]]; then
if [[ "$(hostname -s)" == "${master_hostname}" ]]; then
# Setup Ganglia host only on the master node ("0"-master in HA mode)
setup_ganglia_host || err 'Setting up Ganglia host failed'
else
Expand Down

0 comments on commit 43d02c3

Please sign in to comment.