"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/perfdata/graphitewriter.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

graphitewriter.cpp  (icinga2-2.11.5):graphitewriter.cpp  (icinga2-2.12.0)
skipping to change at line 190 skipping to change at line 190
CONTEXT("Reconnecting to Graphite '" + GetName() + "'"); CONTEXT("Reconnecting to Graphite '" + GetName() + "'");
SetShouldConnect(true); SetShouldConnect(true);
if (GetConnected()) if (GetConnected())
return; return;
Log(LogNotice, "GraphiteWriter") Log(LogNotice, "GraphiteWriter")
<< "Reconnecting to Graphite on host '" << GetHost() << "' port ' " << GetPort() << "'."; << "Reconnecting to Graphite on host '" << GetHost() << "' port ' " << GetPort() << "'.";
m_Stream = std::make_shared<AsioTcpStream>(IoEngine::Get().GetIoContext() ); m_Stream = Shared<AsioTcpStream>::Make(IoEngine::Get().GetIoContext());
try { try {
icinga::Connect(m_Stream->lowest_layer(), GetHost(), GetPort()); icinga::Connect(m_Stream->lowest_layer(), GetHost(), GetPort());
} catch (const std::exception& ex) { } catch (const std::exception& ex) {
Log(LogWarning, "GraphiteWriter") Log(LogWarning, "GraphiteWriter")
<< "Can't connect to Graphite on host '" << GetHost() << "' port '" << GetPort() << ".'"; << "Can't connect to Graphite on host '" << GetHost() << "' port '" << GetPort() << ".'";
SetConnected(false);
throw;
} }
SetConnected(true); SetConnected(true);
Log(LogInformation, "GraphiteWriter") Log(LogInformation, "GraphiteWriter")
<< "Finished reconnecting to Graphite in " << std::setw(2) << Uti lity::GetTime() - startTime << " second(s)."; << "Finished reconnecting to Graphite in " << std::setw(2) << Uti lity::GetTime() - startTime << " second(s).";
} }
/** /**
* Reconnect handler called by the timer. * Reconnect handler called by the timer.
skipping to change at line 363 skipping to change at line 367
<< checkCommand->GetName() << "' with val ue: " << val; << checkCommand->GetName() << "' with val ue: " << val;
continue; continue;
} }
} }
String escapedKey = EscapeMetricLabel(pdv->GetLabel()); String escapedKey = EscapeMetricLabel(pdv->GetLabel());
SendMetric(checkable, prefix, escapedKey + ".value", pdv->GetValu e(), ts); SendMetric(checkable, prefix, escapedKey + ".value", pdv->GetValu e(), ts);
if (GetEnableSendThresholds()) { if (GetEnableSendThresholds()) {
if (pdv->GetCrit()) if (!pdv->GetCrit().IsEmpty())
SendMetric(checkable, prefix, escapedKey + ".crit ", pdv->GetCrit(), ts); SendMetric(checkable, prefix, escapedKey + ".crit ", pdv->GetCrit(), ts);
if (pdv->GetWarn()) if (!pdv->GetWarn().IsEmpty())
SendMetric(checkable, prefix, escapedKey + ".warn ", pdv->GetWarn(), ts); SendMetric(checkable, prefix, escapedKey + ".warn ", pdv->GetWarn(), ts);
if (pdv->GetMin()) if (!pdv->GetMin().IsEmpty())
SendMetric(checkable, prefix, escapedKey + ".min" , pdv->GetMin(), ts); SendMetric(checkable, prefix, escapedKey + ".min" , pdv->GetMin(), ts);
if (pdv->GetMax()) if (!pdv->GetMax().IsEmpty())
SendMetric(checkable, prefix, escapedKey + ".max" , pdv->GetMax(), ts); SendMetric(checkable, prefix, escapedKey + ".max" , pdv->GetMax(), ts);
} }
} }
} }
/** /**
* Computes metric data and sends to Graphite * Computes metric data and sends to Graphite
* *
* @param checkable Host/service object * @param checkable Host/service object
* @param prefix Computed metric prefix string * @param prefix Computed metric prefix string
 End of changes. 6 change blocks. 
5 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)