-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Logs UI] Logs overview queries for the observability dashboard #70413
Conversation
d985d6d
to
92607df
Compare
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.
Looks like I'm getting an error that I can't quite track down. The error seems to be a vague one related to the esSearcher observable:
VM2611:1 POST http://localhost:5601/internal/search/es 400 (Bad Request)
logs_overview_fetchers.ts:44 Error: Bad Request
at Fetch.fetchResponse (fetch.ts:162)
at async interceptResponse (intercept.ts:58)
at async http:/localhost:5601/9007199254740991/bundles/core/core.entry.js:50572
Is the esSearcher
API documented anywhere or are you just piecing it together reading code?
I trigger this with the following patch:
diff --git a/x-pack/plugins/observability/public/application/index.tsx b/x-pack/plugins/observability/public/application/index.tsx
index 21a9fabf445..7e9e3bc6358 100644
--- a/x-pack/plugins/observability/public/application/index.tsx
+++ b/x-pack/plugins/observability/public/application/index.tsx
@@ -9,10 +9,28 @@ import { EuiThemeProvider } from '../../../../legacy/common/eui_styled_component
import { AppMountParameters, CoreStart } from '../../../../../src/core/public';
import { Home } from '../pages/home';
import { PluginContext } from '../context/plugin_context';
+import { getDataHandler } from '../data_handler';
export const renderApp = (core: CoreStart, { element }: AppMountParameters) => {
const i18nCore = core.i18n;
const isDarkMode = core.uiSettings.get('theme:darkMode');
+
+ const getData = async () => {
+ const now = new Date();
+ const params = {
+ startTime: '2020-06-29T11:38:23.747Z',
+ endTime: now.toString(),
+ bucketSize: '30s',
+ };
+ const data = await getDataHandler('infra_logs')?.fetchData(params);
+ console.log('logs data', { data });
+ };
+
+ getData().catch((e) => {
+ console.log('an error occurred while getting obs data');
+ console.log(e);
+ });
+
ReactDOM.render(
<PluginContext.Provider value={{ core }}>
<EuiThemeProvider darkMode={isDarkMode}>
and then navigating to /app/observability
@afgomez as we discussed today can you return the logs rate per minute in the series, and the average in the stats, please? I've done the same on APM: https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/observability_dashboard/get_transaction_coordinates.ts#L50 |
@jasonrhodes seems an issue with how the date is passed. The |
Oh I did |
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.
Looks great, nice work.
@jasonrhodes I was planning to :) |
Yes but now I get credit for being the one who suggested it. #leadering |
The graphs need to show the log rate per minute instead of the log count. This commit adds two helper functions to normalize those values.
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.
Observability registration LGTM.
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
History
To update your PR or re-run it, just comment with: |
Merging now. There's a test missing that I will add in a separate PR. |
* master: [APM-UI] e2e speed up build (elastic#70704) skip flaky suite (elastic#70764) skip flaky suite (elastic#70762) [Security Solution][Endpoint] Update to new manifest format (without compression) (elastic#70752) [functional tests] test url field formatter on dashboard and discover (elastic#70736) logout from transform_poweruser user in after method of transform tests (elastic#70644) [SECURITY] Bug fix for topN on draggables (elastic#70450) [Logs UI] Reorganise log rate anomaly table (elastic#69516) Update dependency @elastic/charts to v19.7.0 (elastic#69791) Add googlecloud metricbeat module to Kibana Home (elastic#70652) [Logs UI] Logs overview queries for the observability dashboard (elastic#70413) [Lens] Fitting functions (elastic#69820)
* master: [APM-UI] e2e speed up build (elastic#70704) skip flaky suite (elastic#70764) skip flaky suite (elastic#70762) [Security Solution][Endpoint] Update to new manifest format (without compression) (elastic#70752) [functional tests] test url field formatter on dashboard and discover (elastic#70736) logout from transform_poweruser user in after method of transform tests (elastic#70644) [SECURITY] Bug fix for topN on draggables (elastic#70450) [Logs UI] Reorganise log rate anomaly table (elastic#69516) Update dependency @elastic/charts to v19.7.0 (elastic#69791) Add googlecloud metricbeat module to Kibana Home (elastic#70652) [Logs UI] Logs overview queries for the observability dashboard (elastic#70413)
* actions/feature: fixed type errors [APM-UI] e2e speed up build (elastic#70704) skip flaky suite (elastic#70764) skip flaky suite (elastic#70762) [Security Solution][Endpoint] Update to new manifest format (without compression) (elastic#70752) [functional tests] test url field formatter on dashboard and discover (elastic#70736) logout from transform_poweruser user in after method of transform tests (elastic#70644) [SECURITY] Bug fix for topN on draggables (elastic#70450) [Logs UI] Reorganise log rate anomaly table (elastic#69516) Update dependency @elastic/charts to v19.7.0 (elastic#69791) Add googlecloud metricbeat module to Kibana Home (elastic#70652) [Logs UI] Logs overview queries for the observability dashboard (elastic#70413)
Summary
This PR provides log overview data for the observability dashboard.
Checklist
Delete any items that are not applicable to this PR.