Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 26 additions & 29 deletions metricbeat/module/kubernetes/state_service/_meta/data.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,47 @@
{
"@timestamp": "2019-11-27T18:13:26.661Z",
"@timestamp": "2019-12-18T14:47:52.427Z",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting this actually uses the current timestamp. In x-pack/aws, seems like there is a default timestamp: https://github.com/elastic/beats/blob/master/x-pack/metricbeat/module/aws/billing/_meta/data.json#L2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I launch metricbeat with debug output and copy data.json from there.
Have been doing that for a while, probably there is some other way of obtaining that file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm for most of the modules/metricsets, I see a TestData function that generates data.json like https://github.com/elastic/beats/blob/master/x-pack/metricbeat/module/aws/billing/billing_integration_test.go#L16

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, thanks for sharing!

"@metadata": {
"beat": "metricbeat",
"type": "_doc",
"version": "8.0.0"
},
"event": {
"dataset": "kubernetes.service",
"module": "kubernetes",
"duration": 44555276
},
"metricset": {
"period": 10000,
"name": "state_service"
"name": "state_service",
"period": 10000
},
"service": {
"address": "kube-state-metrics.kube-system:8080",
"type": "kubernetes"
"type": "kubernetes",
"address": "kube-state-metrics.kube-system:8080"
},
"kubernetes": {
"namespace": "istio-system",
"service": {
"name": "prometheus",
"created": "2019-11-25T21:00:49.000Z",
"cluster_ip": "10.98.33.120",
"type": "ClusterIP",
"labels": {
"label_release": "istio",
"label_app": "prometheus",
"label_operator_istio_io_component": "Prometheus",
"label_operator_istio_io_managed": "Reconcile",
"label_operator_istio_io_version": "1.4.0"
}
"name": "productpage",
"created": "2019-11-25T21:08:36.000Z",
"cluster_ip": "10.104.43.66"
},
"namespace": "default",
"labels": {
"app": "productpage"
}
},
"agent": {
"type": "metricbeat",
"ephemeral_id": "c2655cd5-2091-4cd2-848d-6abba04bc26c",
"hostname": "minikube",
"id": "e9952df4-592e-4102-84a6-ad0b333b3b98",
"version": "8.0.0"
},
"ecs": {
"version": "1.2.0"
},
"host": {
"name": "minikube"
},
"agent": {
"ephemeral_id": "74d75916-9e2d-4d4c-8b5d-30dfdec1eb34",
"hostname": "minikube",
"id": "228b79ac-d00f-4272-89ea-867e9b07faa3",
"version": "8.0.0",
"type": "metricbeat"
},
"event": {
"dataset": "kubernetes.service",
"module": "kubernetes",
"duration": 45413119
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
{
"RootFields": {},
"ModuleFields": {
"labels": {
"app": "example2"
},
"namespace": "default"
},
"MetricSetFields": {
"cluster_ip": "1.2.3.5",
"created": "2017-07-14T02:40:00.000Z",
"external_ip": "1.2.3.10",
"labels": {
"label_app": "example6"
},
"name": "test-service6",
"type": "ClusterIP"
"name": "test-service2",
"type": "NodePort"
},
"Index": "",
"ID": "",
Expand All @@ -27,16 +27,16 @@
{
"RootFields": {},
"ModuleFields": {
"labels": {
"app": "example3"
},
"namespace": "default"
},
"MetricSetFields": {
"cluster_ip": "1.2.3.6",
"created": "2017-07-14T02:40:00.000Z",
"ingress_hostname": "www.example.com",
"ingress_ip": "1.2.3.8",
"labels": {
"label_app": "example5"
},
"name": "test-service5",
"load_balancer_ip": "1.2.3.7",
"name": "test-service3",
"type": "LoadBalancer"
},
"Index": "",
Expand All @@ -53,16 +53,17 @@
{
"RootFields": {},
"ModuleFields": {
"labels": {
"app": "example5"
},
"namespace": "default"
},
"MetricSetFields": {
"cluster_ip": "1.2.3.4",
"created": "2017-07-14T02:40:00.000Z",
"labels": {
"label_app": "example1"
},
"name": "test-service1",
"type": "ClusterIP"
"ingress_hostname": "www.example.com",
"ingress_ip": "1.2.3.8",
"name": "test-service5",
"type": "LoadBalancer"
},
"Index": "",
"ID": "",
Expand All @@ -78,16 +79,16 @@
{
"RootFields": {},
"ModuleFields": {
"labels": {
"app": "example4"
},
"namespace": "default"
},
"MetricSetFields": {
"cluster_ip": "1.2.3.5",
"created": "2017-07-14T02:40:00.000Z",
"labels": {
"label_app": "example2"
},
"name": "test-service2",
"type": "NodePort"
"external_name": "www.example.com",
"name": "test-service4",
"type": "ExternalName"
},
"Index": "",
"ID": "",
Expand All @@ -103,16 +104,16 @@
{
"RootFields": {},
"ModuleFields": {
"labels": {
"app": "example6"
},
"namespace": "default"
},
"MetricSetFields": {
"created": "2017-07-14T02:40:00.000Z",
"external_name": "www.example.com",
"labels": {
"label_app": "example4"
},
"name": "test-service4",
"type": "ExternalName"
"external_ip": "1.2.3.10",
"name": "test-service6",
"type": "ClusterIP"
},
"Index": "",
"ID": "",
Expand All @@ -128,17 +129,16 @@
{
"RootFields": {},
"ModuleFields": {
"labels": {
"app": "example1"
},
"namespace": "default"
},
"MetricSetFields": {
"cluster_ip": "1.2.3.6",
"cluster_ip": "1.2.3.4",
"created": "2017-07-14T02:40:00.000Z",
"labels": {
"label_app": "example3"
},
"load_balancer_ip": "1.2.3.7",
"name": "test-service3",
"type": "LoadBalancer"
"name": "test-service1",
"type": "ClusterIP"
},
"Index": "",
"ID": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
"module": "kubernetes"
},
"kubernetes": {
"namespace": "default",
"labels": {
"k8s_app": "kube-state-metrics"
},
"namespace": "kube-system",
"service": {
"cluster_ip": "10.96.0.1",
"created": "2019-07-19T10:39:29.000Z",
"labels": {
"label_component": "apiserver",
"label_provider": "kubernetes"
},
"name": "kubernetes",
"cluster_ip": "10.105.144.35",
"created": "2019-07-19T10:41:47.000Z",
"name": "kube-state-metrics",
"type": "ClusterIP"
}
},
Expand All @@ -34,16 +33,15 @@
"module": "kubernetes"
},
"kubernetes": {
"namespace": "kube-system",
"labels": {
"component": "apiserver",
"provider": "kubernetes"
},
"namespace": "default",
"service": {
"cluster_ip": "10.96.0.10",
"created": "2019-07-19T10:39:31.000Z",
"labels": {
"label_k8s_app": "kube-dns",
"label_kubernetes_io_cluster_service": "true",
"label_kubernetes_io_name": "KubeDNS"
},
"name": "kube-dns",
"cluster_ip": "10.96.0.1",
"created": "2019-07-19T10:39:29.000Z",
"name": "kubernetes",
"type": "ClusterIP"
}
},
Expand All @@ -63,14 +61,16 @@
"module": "kubernetes"
},
"kubernetes": {
"labels": {
"k8s_app": "kube-dns",
"kubernetes_io_cluster_service": "true",
"kubernetes_io_name": "KubeDNS"
},
"namespace": "kube-system",
"service": {
"cluster_ip": "10.105.144.35",
"created": "2019-07-19T10:41:47.000Z",
"labels": {
"label_k8s_app": "kube-state-metrics"
},
"name": "kube-state-metrics",
"cluster_ip": "10.96.0.10",
"created": "2019-07-19T10:39:31.000Z",
"name": "kube-dns",
"type": "ClusterIP"
}
},
Expand Down
Loading