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

[META] Change Inventory to consume new services exposed by EEM #200055

Closed
cauemarcondes opened this issue Nov 13, 2024 · 2 comments
Closed

[META] Change Inventory to consume new services exposed by EEM #200055

cauemarcondes opened this issue Nov 13, 2024 · 2 comments
Labels
Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@cauemarcondes
Copy link
Contributor

cauemarcondes commented Nov 13, 2024

Inventory changes:

  • Get entity types API (GET /internal/inventory/entities/types)

Description: This API fetches all entity types available
Return type: string[]
Replace it by: GET /internal/entities/v2/definitions/types #201470
Where it's/could be used:

  • It's used to fill up the Entity types filter input in the unified search bar.
  • It could be used to render the group by page.

Notes:


  • Group by API (GET /internal/inventory/entities/group_by/{field})

_Description: Group entities by the provided field (currently only by entity.type is supported).
Action: This API can be deleted.
Where it's/could be used:

  • It's used to create the group by page.

  • Get all entities (GET /internal/inventory/entities)

_Description: Fetches all entities by a given entity type.
Return type: InventoryEntity
Replace it by:

POST kbn:/internal/entities/v2/_search
{
    "type": "service",
    "limit": 500,
    "metadata_fields": ["data_stream.type"]
}

Notes:

  • The new API fetches last 5m of data, we can change it by adding a start and end properties. (Should we add a date picker on the ui?)
  • The API should return the same object as the current api.
  • The current API sorts entities by entity.last_seen_timestamp field, this should still be the same.
  • The user can change the sorting field or direction, we must pass it to the new API. https://github.com/elastic/elastic-entity-model/issues/205
  • Pagination should still be handled in the client side, 500 entities will be returned displaying 20 entities per page.
  • Alerts count will still be fetched on our side using the data returned by the new API request.
  • Links to solutions(apm/infra...)/dashboard will still be handled in the UI.
  • Kuery filters is under discussion: https://github.com/elastic/elastic-entity-model/issues/206
  • Use the entity.display_name field or fallback to entity.id field it the first is not available: https://github.com/elastic/elastic-entity-model/issues/207

  • Adhoc data view

We need to provide a dataview to the KQL bar and to the "Open in discover" button. We can create it ourselves by calling this API GET kibana_entity_definitions/_search and get the field index_patterns. Or EEM could provide it for us. @simianhacker / @elastic/obs-entities


APM changes:

  • APM fetches the datastream_type from a given service name on the entities latest index. We'll need to update it to call the new API instead:
    API: GET /internal/apm/entities/services/{serviceName}/summary
POST kbn:/internal/entities/v2/_search
{
    "type": "service",
    "limit": 1,
    "metadata_fields": ["data_stream.type"],
    "filters": ["service.name == \"service-9\"", "service.environment == \"Synthtrace: other_bucket_group development\""]
}
  • Delete GET /internal/apm/entities/services.
  • /link-to/entity/{serviceName} route:
    This link is used to link service names shown on logs explorer and discover, It also uses the summary API GET /internal/apm/entities/services/{serviceName}/summary, and needs to be tested.

Hosts changes:

  • Like APM, the Hosts page also has a summary API to fetch the datastream_type from a given entity type (host or container) and id.
    API: /api/infra/entities/{entityType}/{entityId}/summary
POST kbn:/internal/entities/v2/_search
{
    "type": "host",
    "limit": 1,
    "metadata_fields": ["data_stream.type"],
    "filters": ["host.name == \"k8s-standalone-549ccd-c9nrv\""]
}
POST kbn:/internal/entities/v2/_search
{
    "type": "container",
    "limit": 1,
    "metadata_fields": ["data_stream.type"],
    "filters": ["container.id == \"d8e5efb1823f6dade09f6f2e57fd4e8cd67e76b782ecd18b6398d80445454ee3\""]
}
@cauemarcondes cauemarcondes added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Nov 13, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@cauemarcondes
Copy link
Contributor Author

Broke this down on small issues:
#202295
#202296
#202298
#202300
#202299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

No branches or pull requests

2 participants