-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[STAN] Add stats data stream metric types #7861
Conversation
🌐 Coverage report
|
Rollover test{
"acknowledged": true,
"shards_acknowledged": true,
"old_index": ".ds-metrics-stan.stats-default-2023.09.21-000001",
"new_index": ".ds-metrics-stan.stats-default-2023.09.21-000002",
"rolled_over": true,
"dry_run": false,
"conditions": {}
} Mappings"stan": {
"properties": {
"cluster": {
"properties": {
"id": {
"type": "keyword",
"time_series_dimension": true
}
}
},
"server": {
"properties": {
"id": {
"type": "keyword",
"time_series_dimension": true
}
}
},
"stats": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "counter"
},
"channels": {
"type": "long",
"time_series_metric": "gauge"
},
"clients": {
"type": "long",
"time_series_metric": "gauge"
},
"messages": {
"type": "long",
"time_series_metric": "counter"
},
"role": {
"type": "keyword",
"ignore_above": 1024
},
"state": {
"type": "keyword",
"ignore_above": 1024
},
"subscriptions": {
"type": "long",
"time_series_metric": "gauge"
}
}
}
}
} |
Is the dashboard breaking related to the metric type here, or was it broken before? @gpop63 |
@constanca-m dashboard was broken before |
TSDB testing kit output:
|
@@ -12,21 +12,26 @@ | |||
If clustered, role of this node in the cluster (Leader, Follower, Candidate) | |||
- name: clients | |||
type: integer | |||
metric_type: gauge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please recheck if the below mentioned fields are indeed showing the current count and hence gauge.
- clients
- subscriptions
- channels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clients and subscriptions:
Before
{
"@timestamp":"2023-10-21T17:47:37.290Z",
"service":{
"address":"http://stan:8222/streaming/serverz",
"type":"stan"
},
"stan":{
"server":{
"id":"o2SjxYZjVJhoILVqjXFn90"
},
"cluster":{
"id":"test-cluster"
},
"stats":{
"subscriptions":4,
"clients":4,
"channels":3,
"bytes":15776304,
"messages":188031,
"state":"STANDALONE"
}
}
}
After closing STAN client
{
"@timestamp":"2023-10-21T17:47:47.290Z",
"service":{
"address":"http://stan:8222/streaming/serverz",
"type":"stan"
},
"stan":{
"server":{
"id":"o2SjxYZjVJhoILVqjXFn90"
},
"cluster":{
"id":"test-cluster"
},
"stats":{
"subscriptions":3,
"clients":3,
"channels":3,
"bytes":15777984,
"messages":188051,
"state":"STANDALONE"
}
}
}
Channels:
Through testing, I found no direct method to delete a STAN channel via API. Instead, I manually deleted the channel's folder from /data/stan/<channel-name>
and restarted STAN to apply the change.
Before
{
"cluster_id": "test-cluster",
"server_id": "o2SjxYZjVJhoILVqjXFn90",
"version": "0.25.5",
"go": "go1.19.10",
"state": "STANDALONE",
"now": "2023-10-21T17:56:28.819900398Z",
"start_time": "2023-10-21T17:43:18.424936206Z",
"uptime": "13m10s",
"clients": 2,
"subscriptions": 2,
"channels": 4,
"total_msgs": 189077,
"total_bytes": 15864166,
"in_msgs": 1611,
"in_bytes": 140157,
"out_msgs": 4099,
"out_bytes": 180354,
"open_fds": 25,
"max_fds": 1048576
}
After
{
"cluster_id": "test-cluster",
"server_id": "hCSE0bDHkBTTVv9iV3GBAd",
"version": "0.25.5",
"go": "go1.19.10",
"state": "STANDALONE",
"now": "2023-10-21T17:56:58.678350936Z",
"start_time": "2023-10-21T17:56:34.919167622Z",
"uptime": "23s",
"clients": 2,
"subscriptions": 2,
"channels": 2,
"total_msgs": 187431,
"total_bytes": 15727676,
"in_msgs": 0,
"in_bytes": 0,
"out_msgs": 2,
"out_bytes": 96,
"open_fds": 21,
"max_fds": 1048576
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Package stan - 1.3.9 containing this change is available at https://epr.elastic.co/search?package=stan |
What does this PR do?
Add metric types for
stats
data stream fields.Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots
The dashboard for STAN metrics seems to be broken (this has to be addressed). I recreated the lenses just for visualization and data validation.