示例#1
0
文件: oracle.go 项目: noblehng/bosun
func sqlplusMetricNameConv(name string) string {
	name = strings.Replace(name, "<", "below_", -1)
	name = strings.Replace(name, ">=", "above_", -1)
	name = strings.Replace(name, "(", "", -1)
	name = strings.Replace(name, ")", "", -1)
	name = strings.Replace(name, "%", "ratio", -1)

	// ignore this error
	name, _ = opentsdb.Replace(strings.ToLower(name), "_")
	return name
}
示例#2
0
func replace(name string) string {
	r, _ := opentsdb.Replace(name, "_")
	return r
}