Skip to content

Commit

Permalink
Fix stats and status tests
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Oct 11, 2022
1 parent e224f97 commit dc8b2a8
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 126 deletions.
56 changes: 2 additions & 54 deletions packages/kibana/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,67 +31,15 @@ UI in Kibana. To enable this usage, set `xpack.enabled: true` on the package con

Stats data stream uses the stats endpoint of Kibana, which is available in 6.4 by default.

**Exported fields**

| Field | Description | Type |
|---|---|---|
| @timestamp | Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events. | date |
| data_stream.dataset | Data stream dataset. | constant_keyword |
| data_stream.namespace | Data stream namespace. | constant_keyword |
| data_stream.type | Data stream type. | constant_keyword |
| kibana.stats.concurrent_connections | Number of client connections made to the server. Note that browsers can send multiple simultaneous connections to request multiple server assets at once, and they can re-use established connections. | long |
| kibana.stats.host.name | Kibana instance hostname | keyword |
| kibana.stats.index | Name of Kibana's internal index | keyword |
| kibana.stats.kibana.status | | keyword |
| kibana.stats.name | Kibana instance name | keyword |
| kibana.stats.os.distro | | keyword |
| kibana.stats.os.distroRelease | | keyword |
| kibana.stats.os.load.15m | | half_float |
| kibana.stats.os.load.1m | | half_float |
| kibana.stats.os.load.5m | | half_float |
| kibana.stats.os.memory.free_in_bytes | | long |
| kibana.stats.os.memory.total_in_bytes | | long |
| kibana.stats.os.memory.used_in_bytes | | long |
| kibana.stats.os.platform | | keyword |
| kibana.stats.os.platformRelease | | keyword |
| kibana.stats.process.event_loop_delay.ms | Event loop delay in milliseconds | scaled_float |
| kibana.stats.process.memory.heap.size_limit.bytes | Max. old space size allocated to Node.js process, in bytes | long |
| kibana.stats.process.memory.heap.total.bytes | Total heap allocated to process in bytes | long |
| kibana.stats.process.memory.heap.uptime.ms | Uptime of process in milliseconds | long |
| kibana.stats.process.memory.heap.used.bytes | Heap used by process in bytes | long |
| kibana.stats.process.memory.resident_set_size.bytes | | long |
| kibana.stats.process.uptime.ms | | long |
| kibana.stats.request.disconnects | Number of requests that were disconnected | long |
| kibana.stats.request.total | Total number of requests | long |
| kibana.stats.response_time.avg.ms | Average response time in milliseconds | long |
| kibana.stats.response_time.max.ms | Maximum response time in milliseconds | long |
| kibana.stats.snapshot | Whether the Kibana build is a snapshot build | boolean |
| kibana.stats.status | Kibana instance's health status | keyword |
| kibana.stats.usage.index | | keyword |
| service.id | Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes. This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event. Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead. | keyword |
| service.version | Version of the service the data was collected from. This allows to look at a data set only for a specific version of a service. | keyword |
{{fields "stats"}}

{{event "stats"}}

### Status

This status endpoint is available in 6.0 by default and can be enabled in Kibana >= 5.4 with the config option `status.v6ApiFormat: true`.

**Exported fields**

| Field | Description | Type |
|---|---|---|
| @timestamp | Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events. | date |
| data_stream.dataset | Data stream dataset. | constant_keyword |
| data_stream.namespace | Data stream namespace. | constant_keyword |
| data_stream.type | Data stream type. | constant_keyword |
| kibana.status.metrics.concurrent_connections | Current concurrent connections. | long |
| kibana.status.metrics.requests.disconnects | Total number of disconnected connections. | long |
| kibana.status.metrics.requests.total | Total number of connections. | long |
| kibana.status.name | Kibana instance name. | keyword |
| kibana.status.status.overall.state | Kibana overall state. | keyword |
| service.id | Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes. This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event. Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead. | keyword |
| service.version | Version of the service the data was collected from. This allows to look at a data set only for a specific version of a service. | keyword |
{{fields "status"}}

{{event "status"}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: kibana/metrics
dataset: kibana.stack_monitoring.stats
vars:
hosts:
- "https://kibana:5601"
- "http://elastic-package-service-kibana-1:5601"
username: elastic
password: changeme
data_stream: ~
48 changes: 24 additions & 24 deletions packages/kibana/data_stream/stats/sample_event.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"@timestamp": "2022-10-11T13:24:57.757Z",
"@timestamp": "2022-10-11T19:06:28.320Z",
"agent": {
"ephemeral_id": "4e2e71ae-5cc0-4f0b-aad9-212bfcdd57d3",
"id": "79e48fe3-2ecd-4021-aed5-6e7e69d47606",
"ephemeral_id": "f796f6ed-21e4-48d5-bb4f-4cc69b3fb3f2",
"id": "b3e85606-c252-4a5e-af71-7b138302dbd9",
"name": "docker-fleet-agent",
"type": "metricbeat",
"version": "8.5.0"
Expand All @@ -16,15 +16,15 @@
"version": "8.0.0"
},
"elastic_agent": {
"id": "79e48fe3-2ecd-4021-aed5-6e7e69d47606",
"id": "b3e85606-c252-4a5e-af71-7b138302dbd9",
"snapshot": true,
"version": "8.5.0"
},
"event": {
"agent_id_status": "verified",
"dataset": "kibana.stack_monitoring.stats",
"duration": 82140000,
"ingested": "2022-10-11T13:24:58Z",
"duration": 57404375,
"ingested": "2022-10-11T19:06:29Z",
"module": "kibana"
},
"host": {
Expand All @@ -33,10 +33,10 @@
"hostname": "docker-fleet-agent",
"id": "b6bc6723e51b43959ce07f0c3105c72d",
"ip": [
"192.168.0.7"
"172.31.0.7"
],
"mac": [
"02-42-C0-A8-00-07"
"02-42-AC-1F-00-07"
],
"name": "docker-fleet-agent",
"os": {
Expand All @@ -52,11 +52,11 @@
"kibana": {
"elasticsearch": {
"cluster": {
"id": "U8DCOXCFQHWlaKczNT4LNQ"
"id": "II5HA1VCQPGB4bQLCi5yZw"
}
},
"stats": {
"concurrent_connections": 32,
"concurrent_connections": 0,
"host": {
"name": "0.0.0.0"
},
Expand All @@ -66,40 +66,40 @@
"distro": "Ubuntu",
"distroRelease": "Ubuntu-20.04",
"load": {
"15m": 3.24,
"1m": 4.92,
"5m": 4.23
"15m": 3.1,
"1m": 4.29,
"5m": 3.7
},
"memory": {
"free_in_bytes": 5639352320,
"free_in_bytes": 5613236224,
"total_in_bytes": 12544004096,
"used_in_bytes": 6904651776
"used_in_bytes": 6930767872
},
"platform": "linux",
"platformRelease": "linux-5.10.124-linuxkit"
},
"process": {
"event_loop_delay": {
"ms": 10.643508512820512
"ms": 10.846537460869566
},
"memory": {
"heap": {
"size_limit": {
"bytes": 2197815296
},
"total": {
"bytes": 338423808
"bytes": 608399360
},
"used": {
"bytes": 261625064
"bytes": 295489000
}
},
"resident_set_size": {
"bytes": 478478336
"bytes": 716869632
}
},
"uptime": {
"ms": 8929086
"ms": 25686
}
},
"request": {
Expand All @@ -108,10 +108,10 @@
},
"response_time": {
"avg": {
"ms": 7
"ms": 13
},
"max": {
"ms": 14
"ms": 48
}
},
"snapshot": true,
Expand All @@ -127,8 +127,8 @@
"pid": 7
},
"service": {
"address": "https://kibana:5601/api/stats?extended=true",
"id": "3e424458-6cef-4a42-9812-bbd591083316",
"address": "http://elastic-package-service-kibana-1:5601/api/stats?extended=true",
"id": "d67ef18d-cefc-4ca5-b844-123adf3a0eb7",
"type": "kibana",
"version": "8.5.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: kibana/metrics
dataset: kibana.stack_monitoring.status
vars:
hosts:
- "https://kibana:5601"
- "http://elastic-package-service-kibana-1:5601"
username: elastic
password: changeme
data_stream: ~
22 changes: 11 additions & 11 deletions packages/kibana/data_stream/status/sample_event.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"@timestamp": "2022-10-11T13:26:28.295Z",
"@timestamp": "2022-10-11T19:07:58.348Z",
"agent": {
"ephemeral_id": "4e2e71ae-5cc0-4f0b-aad9-212bfcdd57d3",
"id": "79e48fe3-2ecd-4021-aed5-6e7e69d47606",
"ephemeral_id": "f796f6ed-21e4-48d5-bb4f-4cc69b3fb3f2",
"id": "b3e85606-c252-4a5e-af71-7b138302dbd9",
"name": "docker-fleet-agent",
"type": "metricbeat",
"version": "8.5.0"
Expand All @@ -16,15 +16,15 @@
"version": "8.0.0"
},
"elastic_agent": {
"id": "79e48fe3-2ecd-4021-aed5-6e7e69d47606",
"id": "b3e85606-c252-4a5e-af71-7b138302dbd9",
"snapshot": true,
"version": "8.5.0"
},
"event": {
"agent_id_status": "verified",
"dataset": "kibana.stack_monitoring.status",
"duration": 34376125,
"ingested": "2022-10-11T13:26:29Z",
"duration": 21930208,
"ingested": "2022-10-11T19:07:59Z",
"module": "kibana"
},
"host": {
Expand All @@ -33,10 +33,10 @@
"hostname": "docker-fleet-agent",
"id": "b6bc6723e51b43959ce07f0c3105c72d",
"ip": [
"192.168.0.7"
"172.31.0.7"
],
"mac": [
"02-42-C0-A8-00-07"
"02-42-AC-1F-00-07"
],
"name": "docker-fleet-agent",
"os": {
Expand All @@ -52,7 +52,7 @@
"kibana": {
"status": {
"metrics": {
"concurrent_connections": 30,
"concurrent_connections": 0,
"requests": {
"disconnects": 0,
"total": 6
Expand All @@ -69,8 +69,8 @@
"period": 10000
},
"service": {
"address": "https://kibana:5601/api/status",
"id": "3e424458-6cef-4a42-9812-bbd591083316",
"address": "http://elastic-package-service-kibana-1:5601/api/status",
"id": "40f3cc0f-ff7c-4e7e-a470-bbdb124a32ca",
"name": "kibana",
"type": "kibana",
"version": "8.5.0"
Expand Down
Loading

0 comments on commit dc8b2a8

Please sign in to comment.