Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Device xml per adapter? #28

Open
hulinning2 opened this issue Jun 4, 2019 · 7 comments
Open

Device xml per adapter? #28

hulinning2 opened this issue Jun 4, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@hulinning2
Copy link
Collaborator

There is a need of supporting device xml file per adapter.

Reasons: Customers wants to be able to obtain data from different adapters using a single device ID. As a result, vendors providing adapter need to modify OEM devices.xml to add their own tags.
It becomes an issue when devices.xml is updated by OEM.

It would be best if vendors can provide their own device xml file and agent can support device xml file per adapter for each device ID.

Thanks

@intolerance
Copy link
Collaborator

I second this as we're also adding additional sensors to the machine to augment the machines data set.

@wsobel
Copy link
Member

wsobel commented Jul 29, 2019

The only issue will be making sure the element ids are unique. This could be done by prefixing the ids with the device UUID (they MUST be unique) or a shortened version of such.

There was some work done in the JS version of the agent to address discovery, same issue needs to be addressed here.

@hulinning2
Copy link
Collaborator Author

I think integrator needs to ensure that ID are unique among different devices.xml files.
Even a single devices.xml file it is still possible having duplicate ID and agent just does not load and the integrator will have to correct it.

Thanks

@wsobel
Copy link
Member

wsobel commented Oct 22, 2019

This could be pretty easily handled will a uuid prefix for each agent to uniquify the ids. The change would not be too complex. Currently, the agent reads from one XML file on startup. It would need to parse one per adapter(s) and then merge the results. The original XML is discarded anyway and the internal object graph is used to represent the devices and then generates out the probe, so that will not be a problem with the current architecture.

The change would need to be made to the AgentConfiguration::loadConfig method and the Agent constructor where it loads the one device file. Instead, it would need to get a list of device files and then append to a list of devices.

If more than one device file exists, it would need to prefix ids to make sure they are unique (could also check if not unique first) or make a config option.

@wsobel wsobel added the enhancement New feature or request label Oct 22, 2019
@wsobel
Copy link
Member

wsobel commented Oct 14, 2020

We can see about queuing this up for 1.7. Not sure if there will be time.

@wsobel
Copy link
Member

wsobel commented Dec 2, 2022

I'm going to raise this up again. The new agent can update and merge Device files. Is this still a requirement? We can even send the Device.xml from the adapter or data source.

@hulinning2
Copy link
Collaborator Author

Yes please
Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants