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

Nested inventory data support #177

Closed
varas opened this issue Oct 19, 2020 · 1 comment · Fixed by #176
Closed

Nested inventory data support #177

varas opened this issue Oct 19, 2020 · 1 comment · Fixed by #176
Assignees
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@varas
Copy link
Contributor

varas commented Oct 19, 2020

Description

JSON shape defined for inventory on the public docs:
https://docs.newrelic.com/docs/create-integrations/infrastructure-integrations-sdk/specifications/host-integration-executable-file-json-specifications#inventory

mentions:

inventory data type is a hash of one or more JSON sub-objects

And https://docs.newrelic.com/docs/create-integrations/infrastructure-integrations-sdk/specifications/host-integration-executable-file-json-specifications#inventory

Values may either be a scalar type (string or number) or another hash object of key/values.

But turns out there are some issues:

  1. Agent doesn't support several embedded layers: see test failing at Fix: nested inventory items #176

  2. Platform ingest all kind of inventory data with success, but later on data is not showned.

  3. And there's a UI issue as well:

UI is misleading as nested objects aren't reflected: https://docs.newrelic.com/docs/infrastructure/infrastructure-ui-pages/infra-ui-pages/infrastructure-inventory-page-search-your-entire-infrastructure

The inventory item name is comprised of three elements

And those not even nested keys, they are actually: inventory source split in 2 + 1 single key

Expected Behavior

  1. Agent should be able to properly handle nested inventory items.

  2. Consider inventory public API docs, so expectations might be made on how clients should behave.

  3. Inventory UI might be required to be updated as well to represent nested key/value pair items.

Steps to Reproduce

See above PR failing test. It's payload could be used to reproduce the 3 mentioned issues.

Your Environment

Integration returning nested objects for inventory (test attached payload).

@varas varas added the bug Categorizes issue or PR as related to a bug. label Oct 19, 2020
@varas varas self-assigned this Oct 19, 2020
@varas
Copy link
Contributor Author

varas commented Oct 19, 2020

  1. fixed at Fix: nested inventory items #176
  2. this is just raising awareness, not intended to be fixed soon, feel free to create another issue
  3. inventory UI is able to display nested items as indexed by the compound key generated by category/source/key1/.../keyN, we might want to update docs to reflect this at https://docs.newrelic.com/docs/infrastructure/infrastructure-ui-pages/infra-ui-pages/infrastructure-inventory-page-search-your-entire-infrastructure

@noly noly linked a pull request Oct 29, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants