未验证 提交 f45106ec 编写于 作者: C chris-sun-star 提交者: GitHub

Merge pull request #30 from chris-sun-star/master

fix error message
...@@ -13,6 +13,7 @@ require ( ...@@ -13,6 +13,7 @@ require (
github.com/go-sql-driver/mysql v1.6.0 github.com/go-sql-driver/mysql v1.6.0
github.com/golang/protobuf v1.5.2 // indirect github.com/golang/protobuf v1.5.2 // indirect
github.com/gwatts/gin-adapter v0.0.0-20170508204228-c44433c485ad github.com/gwatts/gin-adapter v0.0.0-20170508204228-c44433c485ad
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/huandu/go-clone v1.3.0 github.com/huandu/go-clone v1.3.0
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-isatty v0.0.12 github.com/mattn/go-isatty v0.0.12
......
...@@ -148,7 +148,7 @@ func (m *MysqldExporter) Collect() ([]metric.Metric, error) { ...@@ -148,7 +148,7 @@ func (m *MysqldExporter) Collect() ([]metric.Metric, error) {
metricFamilies, err := m.registry.Gather() metricFamilies, err := m.registry.Gather()
if err != nil { if err != nil {
return nil, errors.Wrap(err, "node exporter registry gather") return nil, errors.Wrap(err, "mysql exporter registry gather")
} }
for _, metricFamily := range metricFamilies { for _, metricFamily := range metricFamilies {
metricsFromMetricFamily := metric.ParseFromMetricFamily(metricFamily) metricsFromMetricFamily := metric.ParseFromMetricFamily(metricFamily)
......
...@@ -130,7 +130,7 @@ func TestCollectConditionNotSatisfied(t *testing.T) { ...@@ -130,7 +130,7 @@ func TestCollectConditionNotSatisfied(t *testing.T) {
k1: 1 k1: 1
collectConfig: collectConfig:
- sql: select t1, t2, m1, m2 from test_metric - sql: select t1, t2, m1, m2 from test_metric
condition: k0 conditions: [k0]
name: test name: test
tags: tags:
tag1: t1 tag1: t1
...@@ -161,7 +161,7 @@ func TestCollectConditionNotFound(t *testing.T) { ...@@ -161,7 +161,7 @@ func TestCollectConditionNotFound(t *testing.T) {
k1: 1 k1: 1
collectConfig: collectConfig:
- sql: select t1, t2, m1, m2 from test_metric - sql: select t1, t2, m1, m2 from test_metric
condition: k2 conditions: [k2]
name: test name: test
tags: tags:
tag1: t1 tag1: t1
...@@ -193,7 +193,7 @@ func TestCollectConditionNotBool(t *testing.T) { ...@@ -193,7 +193,7 @@ func TestCollectConditionNotBool(t *testing.T) {
k2: x k2: x
collectConfig: collectConfig:
- sql: select t1, t2, m1, m2 from test_metric - sql: select t1, t2, m1, m2 from test_metric
condition: k2 conditions: [k2]
name: test name: test
tags: tags:
tag1: t1 tag1: t1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册