[Stack Monitoring] health api support for data ingested from package#138964
[Stack Monitoring] health api support for data ingested from package#138964klacabane merged 11 commits intoelastic:mainfrom
Conversation
| getNewIndexPatterns, | ||
| getLegacyIndexPattern, |
There was a problem hiding this comment.
Took the opportunity to reuse the functions used to build the patterns throughout the server code
|
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
|
@elasticmachine merge upstream |
matschaffer
left a comment
There was a problem hiding this comment.
I tried using your profile from elastic/integrations#4018 then running this branch against it. Since I don't think this branch supports metrics-* for the regular UI I then enabled internal collection, but so far I'm only seeing internal-collection data in the health api. Nothing agent based yet.
GET http://localhost:5602/ftw/api/monitoring/v1/_health
{
"monitoredClusters": {
"clusters": {
"0pMSN574ShOT3UQkRDRHxg": {
"cluster": {
"0pMSN574ShOT3UQkRDRHxg": {
"index_summary": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.108Z"
}
},
"index_recovery": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.111Z"
}
},
"index": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.108Z"
}
},
"cluster_stats": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.099Z"
}
}
}
},
"elasticsearch": {
"6TyLurl-R3ChzhNEa2u8zw": {
"node_stats": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.061Z"
}
},
"shard": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.108Z"
}
}
}
},
"kibana": {
"71916d11-34bc-451d-b87e-f9ff2fb1137c": {
"stats": {
"internal-monitoring": {
"index": ".monitoring-kibana-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:22.268Z"
}
}
},
"5b2de169-2785-441b-ae8c-186a1936b17d": {
"stats": {
"internal-monitoring": {
"index": ".monitoring-kibana-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:23.866Z"
}
}
}
}
},
"standalone": {
}
},
"execution": {
"timedOut": false,
"errors": [
]
}
},
"metricbeatErrors": {
"products": {
},
"execution": {
"timedOut": false,
"errors": [
]
}
},
"settings": {
"ccs": true,
"logsIndex": "filebeat-*",
"metricbeatIndex": "metricbeat-*",
"hasRemoteClusterConfigured": false
}
}
Maybe we can toss it around in our 1:1
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @klacabane |
matschaffer
left a comment
There was a problem hiding this comment.
We paired up on this and that last commit should have things working nicely!
…lastic#138964) * query for data_stream datasets * support package collection mode * build index with metrics pattern * trailing comma * use getNewIndexPatterns everywhere * Include new stack_monitoring infix in healthcheck dataset name Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Mat Schaffer <mat@elastic.co>
Summary
Closes #138864
Add support for data ingested from packages in the
metrics-{product}.*patterns.This change only fetches the data for the successfully monitored products, but we can also retrieve the errors like we do for metricbeat since an
error.messagemay be populated on failure. This will be handled in elastic/integrations#4011Testing
localhost:5602/api/monitoring/v1/_health- a monitored cluster should show up with cluster, elasticsearch and logstash data collected with thepackagemethod