Skip to content

Commit

Permalink
[Metricbeat] Migrate Kubernetes state_node Metricset to use ReporterV…
Browse files Browse the repository at this point in the history
…2 interface (#10962)

This is the first Kubernetes modules which uses the new testing interface too
  • Loading branch information
sayden authored Mar 11, 2019
1 parent c1047b6 commit 265ab8b
Show file tree
Hide file tree
Showing 8 changed files with 688 additions and 88 deletions.
1 change: 1 addition & 0 deletions metricbeat/mb/testing/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
_ "github.com/elastic/beats/metricbeat/module/couchbase/node"
_ "github.com/elastic/beats/metricbeat/module/kibana/status"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/apiserver"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/state_node"
_ "github.com/elastic/beats/metricbeat/module/php_fpm/pool"
_ "github.com/elastic/beats/metricbeat/module/php_fpm/process"
_ "github.com/elastic/beats/metricbeat/module/rabbitmq/connection"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +1,88 @@
[
{
"_namespace": "node",
"cpu": {
"allocatable": {
"cores": 3
"RootFields": null,
"ModuleFields": null,
"MetricSetFields": {
"cpu": {
"allocatable": {
"cores": 3
},
"capacity": {
"cores": 4
}
},
"capacity": {
"cores": 4
}
},
"memory": {
"allocatable": {
"bytes": 3097786880
"memory": {
"allocatable": {
"bytes": 3097786880
},
"capacity": {
"bytes": 4097786880
}
},
"capacity": {
"bytes": 4097786880
}
},
"name": "minikube-test",
"pod": {
"allocatable": {
"total": 210
"name": "minikube-test",
"pod": {
"allocatable": {
"total": 210
},
"capacity": {
"total": 310
}
},
"capacity": {
"total": 310
"status": {
"ready": "true",
"unschedulable": true
}
},
"status": {
"ready": "true",
"unschedulable": true
}
"Index": "",
"ID": "",
"Namespace": "kubernetes.node",
"Timestamp": "0001-01-01T00:00:00Z",
"Error": null,
"Host": "",
"Service": "",
"Took": 0
},
{
"_namespace": "node",
"cpu": {
"allocatable": {
"cores": 2
"RootFields": null,
"ModuleFields": null,
"MetricSetFields": {
"cpu": {
"allocatable": {
"cores": 2
},
"capacity": {
"cores": 2
}
},
"capacity": {
"cores": 2
}
},
"memory": {
"allocatable": {
"bytes": 2097786880
"memory": {
"allocatable": {
"bytes": 2097786880
},
"capacity": {
"bytes": 2097786880
}
},
"capacity": {
"bytes": 2097786880
}
},
"name": "minikube",
"pod": {
"allocatable": {
"total": 110
"name": "minikube",
"pod": {
"allocatable": {
"total": 110
},
"capacity": {
"total": 110
}
},
"capacity": {
"total": 110
"status": {
"ready": "true",
"unschedulable": false
}
},
"status": {
"ready": "true",
"unschedulable": false
}
"Index": "",
"ID": "",
"Namespace": "kubernetes.node",
"Timestamp": "0001-01-01T00:00:00Z",
"Error": null,
"Host": "",
"Service": "",
"Took": 0
}
]
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
[
{
"_namespace": "node",
"cpu": {
"allocatable": {
"cores": 2
"RootFields": null,
"ModuleFields": null,
"MetricSetFields": {
"cpu": {
"allocatable": {
"cores": 2
},
"capacity": {
"cores": 2
}
},
"capacity": {
"cores": 2
}
},
"memory": {
"allocatable": {
"bytes": 1992347648
"memory": {
"allocatable": {
"bytes": 1992347648
},
"capacity": {
"bytes": 2097205248
}
},
"capacity": {
"bytes": 2097205248
}
},
"name": "minikube",
"pod": {
"allocatable": {
"total": 110
"name": "minikube",
"pod": {
"allocatable": {
"total": 110
},
"capacity": {
"total": 110
}
},
"capacity": {
"total": 110
"status": {
"ready": "true",
"unschedulable": false
}
},
"status": {
"ready": "true",
"unschedulable": false
}
"Index": "",
"ID": "",
"Namespace": "kubernetes.node",
"Timestamp": "0001-01-01T00:00:00Z",
"Error": null,
"Host": "",
"Service": "",
"Took": 0
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: http
url: "/metrics"
suffix: plain
Loading

0 comments on commit 265ab8b

Please sign in to comment.