Skip to content
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

[Fleet] Agent list not displaying correctly #65238

Closed
skh opened this issue May 5, 2020 · 4 comments · Fixed by #65260
Closed

[Fleet] Agent list not displaying correctly #65238

skh opened this issue May 5, 2020 · 4 comments · Fixed by #65260
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Fleet Fleet team's agent central management project Ingest Management:alpha1 Group issues for ingest management alpha1 Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@skh
Copy link
Contributor

skh commented May 5, 2020

On the agent list, I see this error:

Error: Objects are not valid as a React child (found: object with keys {architecture, hostname, name, id, ip, mac}). If you meant to render a collection of children, use an array instead.
    in a (created by LinkAnchor)
    in LinkAnchor (created by Context.Consumer)
    in Link (created by ConnectedLinkComponent)
    in ConnectedLinkComponent (created by Context.Consumer)
    in withRouter(ConnectedLinkComponent) (created by EuiBasicTable)
    in div (created by EuiTableRowCell)
    in td (created by EuiTableRowCell)
    in EuiTableRowCell (created by EuiBasicTable)
    in tr (created by EuiTableRow)
    in EuiTableRow (created by EuiBasicTable)
    in tbody (created by EuiTableBody)
    in EuiTableBody (created by EuiBasicTable)
    in table (created by EuiTable)
    in EuiTable (created by EuiBasicTable)
    in div (created by EuiBasicTable)
    in div (created by EuiBasicTable)
    in EuiBasicTable (created by AgentListPage)
    in AgentListPage (created by FleetApp)
    in main (created by EuiPageBody)
    in EuiPageBody (created by WithHeaderLayout)
    in div (created by EuiPage)
    in EuiPage (created by Page)
    in Page (created by WithHeaderLayout)
    in WithHeaderLayout (created by ListLayout)
    in ListLayout (created by FleetApp)
    in Route (created by FleetApp)
    in Switch (created by FleetApp)
    in Router (created by HashRouter)
    in HashRouter (created by FleetApp)
    in FleetApp (created by IngestManagerRoutes)
    in div (created by Container)
    in Container (created by DefaultLayout)
    in DefaultLayout (created by IngestManagerRoutes)
    in Route (created by ProtectedRoute)
    in ProtectedRoute (created by IngestManagerRoutes)
    in Switch (created by IngestManagerRoutes)
    in Router (created by HashRouter)
    in HashRouter (created by IngestManagerRoutes)
    in EuiErrorBoundary (created by IngestManagerRoutes)
    in IngestManagerRoutes (created by IngestManagerApp)
    in FleetStatusProvider (created by IngestManagerApp)
    in usePackageInstall.Provider (created by IngestManagerApp)
    in ThemeProvider (created by EuiThemeProvider)
    in EuiThemeProvider (created by IngestManagerApp)
    in EuiContext (created by I18nContext)
    in PseudoLocaleWrapper (created by I18nProvider)
    in IntlProvider (created by I18nProvider)
    in I18nProvider (created by I18nContext)
    in I18nContext (created by IngestManagerApp)
    in IngestManagerApp
    at throwOnInvalidObjectType (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:320915:15)
    at reconcileChildFibers (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321773:7)
    at reconcileChildren (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:324256:28)
    at updateHostComponent (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:324778:3)
    at beginWork$1 (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:326360:14)
    at HTMLUnknownElement.callCallback (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:306503:14)
    at Object.invokeGuardedCallbackDev (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:306552:16)
    at invokeGuardedCallback (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:306607:31)
    at beginWork$$1 (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:331947:7)
    at performUnitOfWork (http://localhost:5601/9007199254740991/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:330862:12)

Steps to reproduce:

  • start ES and Kibana locally
  • enroll a agent (if that matters, I'm using the linux version of the agent)
  • be redirected, or later navigate to, the agent list page
@skh skh added bug Fixes for quality problems that affect the customer experience Feature:Fleet Fleet team's agent central management project Team:Fleet Team label for Observability Data Collection Fleet team labels May 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Feature:Fleet)

@skh
Copy link
Contributor Author

skh commented May 5, 2020

This happened with an agent build from April 30, I'm retesting with a current build now.

@michalpristas
Copy link

this seems to solve the error

diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx
index 5e7fe745a0..3a45a3130b 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx
@@ -238,7 +238,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
 
   const columns = [
     {
-      field: 'local_metadata.host',
+      field: 'local_metadata.host.hostname',
       name: i18n.translate('xpack.ingestManager.agentList.hostColumnTitle', {
         defaultMessage: 'Host',
       }),
@@ -308,13 +308,13 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
       },
     },
     {
-      field: 'local_metadata.version',
+      field: 'local_metadata.elastic.agent.version',
       width: '100px',
       name: i18n.translate('xpack.ingestManager.agentList.versionTitle', {
         defaultMessage: 'Version',
       }),
       render: (version: string, agent: Agent) =>
-        agent.local_metadata['agent.version'] || version || '',
+        agent.local_metadata['elastic.agent.version'] || version || '',
     },

but version is still not displayed, maybe because key there is "elastic.agent" instead of agent being subobject
also the same host issue is visible on details page so this needs to be addressed as well

@michalpristas
Copy link

michalpristas commented May 5, 2020

I fixed version on agent side but
on details page

agent.local_metadata["host.hostname"]: undefined
agent.local_metadata.host["hostname"]: "Michals-MBP-2.lan"

@ruflin ruflin added the Ingest Management:alpha1 Group issues for ingest management alpha1 label May 5, 2020
@nchaulet nchaulet self-assigned this May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Fleet Fleet team's agent central management project Ingest Management:alpha1 Group issues for ingest management alpha1 Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants