Add acknowledgement type to Graphite, InfluxDB, OpenTSDB metadata

fixes #12018
This commit is contained in:
Michael Friedrich 2016-06-23 13:04:23 +02:00
parent 6659b2e908
commit 7077ca1a53
4 changed files with 8 additions and 0 deletions

View File

@ -215,6 +215,7 @@ By enabling `enable_send_metadata` Icinga 2 automatically adds the following met
<prefix>.metadata.current_attempt
<prefix>.metadata.downtime_depth
<prefix>.metadata.acknowledgement
<prefix>.metadata.execution_time
<prefix>.metadata.latency
<prefix>.metadata.max_check_attempts
@ -230,6 +231,7 @@ Metadata metric overview:
max_check_attempts | maximum check attempts until the hard state is reached
reachable | checked object is reachable
downtime_depth | number of downtimes this object is in
acknowledgement | whether the object is acknowledged or not
execution_time | check execution time
latency | check latency
state | current state of the checked object
@ -294,6 +296,7 @@ internal check statistic data to Graphite:
max_check_attempts | maximum check attempts until the hard state is reached
reachable | checked object is reachable
downtime_depth | number of downtimes this object is in
acknowledgement | whether the object is acknowledged or not
execution_time | check execution time
latency | check latency
state | current state of the checked object
@ -387,6 +390,7 @@ internal check statistic data to OpenTSDB:
max_check_attempts | maximum check attempts until the hard state is reached
reachable | checked object is reachable
downtime_depth | number of downtimes this object is in
acknowledgement | whether the object is acknowledged or not
execution_time | check execution time
latency | check latency
state | current state of the checked object

View File

@ -141,6 +141,7 @@ void GraphiteWriter::CheckResultHandler(const Checkable::Ptr& checkable, const C
SendMetric(prefix_metadata, "state_type", checkable->GetStateType(), ts);
SendMetric(prefix_metadata, "reachable", checkable->IsReachable(), ts);
SendMetric(prefix_metadata, "downtime_depth", checkable->GetDowntimeDepth(), ts);
SendMetric(prefix_metadata, "acknowledgement", checkable->GetAcknowledgement(), ts);
SendMetric(prefix_metadata, "latency", cr->CalculateLatency(), ts);
SendMetric(prefix_metadata, "execution_time", cr->CalculateExecutionTime(), ts);
}
@ -160,6 +161,7 @@ void GraphiteWriter::CheckResultHandler(const Checkable::Ptr& checkable, const C
SendMetric(prefix, "state_type", checkable->GetStateType(), ts);
SendMetric(prefix, "reachable", checkable->IsReachable(), ts);
SendMetric(prefix, "downtime_depth", checkable->GetDowntimeDepth(), ts);
SendMetric(prefix, "acknowledgement", checkable->GetAcknowledgement(), ts);
SendMetric(prefix, "latency", cr->CalculateLatency(), ts);
SendMetric(prefix, "execution_time", cr->CalculateExecutionTime(), ts);
SendPerfdata(prefix, cr, ts);

View File

@ -222,6 +222,7 @@ void InfluxdbWriter::SendPerfdata(const Dictionary::Ptr& tmpl, const Checkable::
fields->Set(String("state_type"), FormatInteger(checkable->GetStateType()));
fields->Set(String("reachable"), FormatBoolean(checkable->IsReachable()));
fields->Set(String("downtime_depth"), FormatInteger(checkable->GetDowntimeDepth()));
fields->Set(String("acknowledgement"), FormatInteger(checkable->GetAcknowledgement()));
fields->Set(String("latency"), cr->CalculateLatency());
fields->Set(String("execution_time"), cr->CalculateExecutionTime());
}

View File

@ -129,6 +129,7 @@ void OpenTsdbWriter::CheckResultHandler(const Checkable::Ptr& checkable, const C
SendMetric(metric + ".state_type", tags, checkable->GetStateType(), ts);
SendMetric(metric + ".reachable", tags, checkable->IsReachable(), ts);
SendMetric(metric + ".downtime_depth", tags, checkable->GetDowntimeDepth(), ts);
SendMetric(metric + ".acknowledgement", tags, checkable->GetAcknowledgement(), ts);
SendPerfdata(metric, tags, cr, ts);