diff --git a/bmc-log-collector/TAG b/bmc-log-collector/TAG index b0bb87854..85b7c695b 100644 --- a/bmc-log-collector/TAG +++ b/bmc-log-collector/TAG @@ -1 +1 @@ -0.9.5 +0.9.6 diff --git a/bmc-log-collector/metrics.go b/bmc-log-collector/metrics.go index 6e4373c06..69aed171b 100644 --- a/bmc-log-collector/metrics.go +++ b/bmc-log-collector/metrics.go @@ -11,16 +11,16 @@ import ( var counterRequestFailed = promauto.NewCounterVec( prometheus.CounterOpts{ - Name: "failed_counter", - Help: "The failed count for Redfish of BMC accessing", + Name: "bmc_log_requests_failed_total", + Help: "Failed count of accessing BMC to get the system event log", }, []string{"serial"}, ) var counterRequestSuccess = promauto.NewCounterVec( prometheus.CounterOpts{ - Name: "success_counter", - Help: "The success count for Redfish of BMC accessing", + Name: "bmc_log_requests_success_total", + Help: "Succeeded count of accessing BMC to get the system event log", }, []string{"serial"}, ) diff --git a/bmc-log-collector/metrics_test.go b/bmc-log-collector/metrics_test.go index 29c8e9669..dd00a7ef3 100644 --- a/bmc-log-collector/metrics_test.go +++ b/bmc-log-collector/metrics_test.go @@ -49,14 +49,14 @@ var _ = Describe("Get Metrics export", Ordered, func() { }) It("verify HELP line in metrics", func() { - Expect(searchMetricsComment(metricsLines, "# HELP failed_counter The failed count for Redfish of BMC accessing")).To(Equal(true)) + Expect(searchMetricsComment(metricsLines, "# HELP bmc_log_requests_failed_total Failed count of accessing BMC to get the system event log")).To(Equal(true)) }) It("verify TYPE line in metrics", func() { - Expect(searchMetricsComment(metricsLines, "# TYPE failed_counter counter")).To(Equal(true)) + Expect(searchMetricsComment(metricsLines, "# TYPE bmc_log_requests_failed_total counter")).To(Equal(true)) }) It("iDRAC ABC123X 172.16.0.1 failed", func() { - metricsLine, err := findMetrics(metricsLines, "failed_counter") + metricsLine, err := findMetrics(metricsLines, "bmc_log_requests_failed_total") Expect(err).NotTo(HaveOccurred()) p := expfmt.TextParser{} @@ -93,14 +93,14 @@ var _ = Describe("Get Metrics export", Ordered, func() { }) It("verify HELP line in metrics", func() { - Expect(searchMetricsComment(metricsLines, "# HELP success_counter The success count for Redfish of BMC accessing")).To(Equal(true)) + Expect(searchMetricsComment(metricsLines, "# HELP bmc_log_requests_success_total Succeeded count of accessing BMC to get the system event log")).To(Equal(true)) }) It("verify TYPE line in metrics", func() { - Expect(searchMetricsComment(metricsLines, "# TYPE success_counter counter")).To(Equal(true)) + Expect(searchMetricsComment(metricsLines, "# TYPE bmc_log_requests_success_total counter")).To(Equal(true)) }) It("iDRAC ABC123X 172.16.0.1 success", func() { - metricsLine, err := findMetrics(metricsLines, "success_counter") + metricsLine, err := findMetrics(metricsLines, "bmc_log_requests_success_total") Expect(err).NotTo(HaveOccurred()) p := expfmt.TextParser{} metricsFamily, err := p.TextToMetricFamilies(strings.NewReader(metricsLine))