Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions gmond/gmond.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,9 @@ Ganglia_host_get( char *remIP, apr_sockaddr_t *sa, Ganglia_metric_id *metric_id)
else
{
/* We already have this host in our "hosts" hash update timestamp */
hostdata->last_heard_from = apr_time_now();
if ( !metric_id->spoof ) {
hostdata->last_heard_from = apr_time_now();
}
}

if (buff) free(buff);
Expand Down Expand Up @@ -1158,6 +1160,9 @@ Ganglia_update_vidals( Ganglia_host *host, Ganglia_value_msg *vmsg)
{
/* nothing more needs to be done. we handled the timestamps above. */
host->gmond_started = vmsg->Ganglia_value_msg_u.gu_int.ui;
if(vmsg->Ganglia_value_msg_u.gstr.metric_id.spoof) { // always true?
host->last_heard_from = apr_time_now();
}
debug_msg("Got a heartbeat message %d\n", host->gmond_started);
/* Processing is finished */
}
Expand Down Expand Up @@ -1424,7 +1429,9 @@ Ganglia_value_save( Ganglia_host *host, Ganglia_value_msg *message )
break;
}

metric->last_heard_from = apr_time_now();
if ( !message->Ganglia_value_msg_u.gstr.metric_id.spoof ) {
metric->last_heard_from = apr_time_now();
}

/* Save the last update metric */
apr_thread_mutex_lock(host->mutex);
Expand Down