Skip to content

Commit

Permalink
bosun: denormalized metadata should resolve.
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Peterson committed Dec 14, 2015
1 parent 5000c82 commit bf2b8fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/bosun/sched/sched.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"net"
"reflect"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -159,6 +160,12 @@ func (s *Schedule) DeleteMetadata(tags opentsdb.TagSet, name string) error {
}

func (s *Schedule) MetadataMetrics(metric string) (*database.MetricMetadata, error) {
//denormalized metrics should give metric metadata for their undenormalized counterparts
if strings.HasPrefix(metric, "__") {
if idx := strings.Index(metric, "."); idx != -1 {
metric = metric[idx+1:]
}
}
mm, err := s.DataAccess.Metadata().GetMetricMetadata(metric)
if err != nil {
return nil, err
Expand Down

0 comments on commit bf2b8fe

Please sign in to comment.