File tree Expand file tree Collapse file tree
builtin/providers/librato Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,11 +108,32 @@ func resourceLibratoAlertConditionsHash(v interface{}) int {
108108 var buf bytes.Buffer
109109 m := v .(map [string ]interface {})
110110 buf .WriteString (fmt .Sprintf ("%s-" , m ["type" ].(string )))
111+ buf .WriteString (fmt .Sprintf ("%s-" , m ["metric_name" ].(string )))
112+
113+ source , present := m ["source" ]
114+ if present {
115+ buf .WriteString (fmt .Sprintf ("%f-" , source .(string )))
116+ }
117+
118+ detect_reset , present := m ["detect_reset" ]
119+ if present {
120+ buf .WriteString (fmt .Sprintf ("%f-" , detect_reset .(bool )))
121+ }
122+
123+ duration , present := m ["duration" ]
124+ if present {
125+ buf .WriteString (fmt .Sprintf ("%f-" , duration .(int )))
126+ }
127+
111128 threshold , present := m ["threshold" ]
112129 if present {
113130 buf .WriteString (fmt .Sprintf ("%f-" , threshold .(float64 )))
114131 }
115- buf .WriteString (fmt .Sprintf ("%s-" , m ["metric_name" ].(string )))
132+
133+ summary_function , present := m ["summary_function" ]
134+ if present {
135+ buf .WriteString (fmt .Sprintf ("%f-" , summary_function .(string )))
136+ }
116137
117138 return hashcode .String (buf .String ())
118139}
You can’t perform that action at this time.
0 commit comments