[opinion] modifications to the Device groups attributes

Hello everyone,
i have made some changes to the mender-client inventory to have expand the device inventory for some basic monitoring.

The next steps i want to undertake is to be able to show an alias as already suggested.

The reason i want to do this, so non IT people would also be able to use mender dashboard and to be able to recognize an pi by a simple name and read there inventory.

now i’m not familiar with GOlang yet, and wanted to hear from experienced people how difficult/easy it would be to make these changes.
It would be a nice way for me to contribute to the mender project.
Greets Gene

Hi @genedupre,

Thanks for the feedback and interest in contributing to the Mender open source project!

This is supported, and perhaps more conceptually aligned, with identity attributes (not inventory).

Identity attributes are intended to be unique (as a set about a device), unlike inventory which is more informational/general purpose. You can read more about identity attributes here: https://docs.mender.io/2.3/client-configuration/identity

In your screenshot you are using mac as the identity attribute to show, but if you added hostname to identity you could select that as well from the “gear” icon in the header row.

Does that make sense?

Hello @eystein

thanks for the reply, yes i was aware of the Identity attributes, but as you said these need to be unique. this would be a problem if for example i would like to replace an RPI, has this pi will use the same hostname, and from what i understand it, just decommissioning an device does not remove this unique value from the mender db?

Greets Gene

Hi @genedupre,

I understand your concern, but I think this is more of a conceptual problem and it relates to identity (or how to identify devices): If your devices can have identical hostnames, how would your IT users know which one is which?

So I would say we are talking about identity here, not inventory - at least conceptually.

Mender supports having several identity attributes (and you can choose one of them at the time in the row of each device in the UI for quick identification). What I would suggest is that you use both mac and hostname as identity in your scenario. This way they will be unique as a set (because mac is unique) and you can choose hostname in the UI).

To test it quickly, log in to your device and open " /usr/share/mender/identity/mender-device-identity. Then append something like (I have not tried this, some tweaking may be required):

hostname_string=$(/bin/hostname -s)
echo hostname=$(hostname_string)

Then restart the Mender client and accept the device in the Mender UI. You should be able to select hostname from the gear icon.

Does this resolve the issue?

Hi @eystein,
yes it was a good idea to append an mac to the hostname to make sure the value is unique