Skip to content

Commit

Permalink
Merge pull request #162 from OpenSLO/feature/threshold-metrics
Browse files Browse the repository at this point in the history
Fix for amazon prom vs prom
  • Loading branch information
ian-bartholomew authored Sep 29, 2022
2 parents 4a5285e + d0bc127 commit 27f7c4a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/pkg/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,20 @@ func getN9MetricSource(m v1.MetricSource) (nobl9v1alpha.MetricSpec, error) {
Query: &query,
},
}
case supportedMetricSources["Prometheus"], supportedMetricSources["AmazonPrometheus"]:
case supportedMetricSources["Prometheus"]:
query := m.MetricSourceSpec["promql"]
ms = nobl9v1alpha.MetricSpec{
Prometheus: &nobl9v1alpha.PrometheusMetric{
PromQL: &query,
},
}
case supportedMetricSources["AmazonPrometheus"]:
query := m.MetricSourceSpec["promql"]
ms = nobl9v1alpha.MetricSpec{
AmazonPrometheus: &nobl9v1alpha.AmazonPrometheusMetric{
PromQL: &query,
},
}
case supportedMetricSources["NewRelic"]:
query := m.MetricSourceSpec["nrql"]
ms = nobl9v1alpha.MetricSpec{
Expand Down

0 comments on commit 27f7c4a

Please sign in to comment.