Skip to content

Commit

Permalink
Merge pull request #190 from linkernetworks/phstsai/VX-225
Browse files Browse the repository at this point in the history
[Task] VX-225: Refactor the prometheus
  • Loading branch information
Hung-Wei Chiu authored Jul 30, 2018
2 parents 1d348b7 + 825d23e commit ea8ae45
Show file tree
Hide file tree
Showing 9 changed files with 1,031 additions and 751 deletions.
4 changes: 2 additions & 2 deletions src/entity/metrics_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package entity

// ContainerResourceMetrics is the sructure for Container Resource Metrics
type ContainerResourceMetrics struct {
CPUUsagePercentage float32 `json:"cpuUsagePercentage"`
MemoryUsageBytes float32 `json:"memoryUsageBytes"`
CPUUsagePercentage float32 `json:"cpuUsagePercentage"`
MemoryUsageBytes []SamplePair `json:"memoryUsageBytes"`
}

// ContainerStatusMetrics is the sructure for Container Status Metrics
Expand Down
8 changes: 8 additions & 0 deletions src/entity/metrics_node.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package entity

import "github.com/prometheus/common/model"

// SamplePair pairs a SampleValue with a Timestamp.
type SamplePair struct {
Timestamp model.Time `json:"timestamp"`
Value model.SampleValue `json:"value"`
}

// NICNetworkTrafficMetrics is the structure for NIC metwork traffic metrics
type NICNetworkTrafficMetrics struct {
ReceiveBytesTotal int `json:"receiveBytesTotal"`
Expand Down
Loading

0 comments on commit ea8ae45

Please sign in to comment.