Forum Discussion

Lewis_Beard's avatar
3 years ago

Devices: Relationiship between name and displayName

Apologies for the newbie question, but my search-fu is weak, or coming up empty, and I'm new to the API. Feel free to skip the back-story and jump to the bottom for the question

A year ago before I really knew anything about LM, I was asked to make an integration from another system and given a Json template for the API and device creation, and I was told how to authenticate and had a token set up and  I did the whole deal.

At that time, I was told to make name and displayName be the same thing, but I was basically just doing the cosmonaut dog thing and pulling the levers.

Now I'm in a situation where I'm actually a LM user now, but our LM guy was hired away, and I'm going to tweak someone else's existing script that does some device renames.

 

And finally to the point: what exactly is the difference between name and displayName in LM and in particular in the API? The code I'm going to tweak is changing displayName, and I'm just wondering, how does displayName relate to name, what happens if they are different, and etc?

I've poked around the documentation, and I've looked at the info tab for devices and unless I'm missing the obvious, I dont even see a simple "name" property on the device in the LM UI. Sorry for the newbie question, hope it makes sense.

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    The name field is the value of system.hostname, which is typically the address used to contact the device. It could be an IP address, a FQDN, an mDNS name, etc. As long as the Collector can resolve it. Think of it this way, if you were to put the "name" into a ping command, would it ping properly?

    The displayName is simply the display name shown in the UI. If they are the same, the most notable difference is in the breadcrumbs at the top of the resource page. This is what it looks like when it's different:

    This is what it looks like when they're the same:

2 Replies

  • Anonymous's avatar
    Anonymous

    The name field is the value of system.hostname, which is typically the address used to contact the device. It could be an IP address, a FQDN, an mDNS name, etc. As long as the Collector can resolve it. Think of it this way, if you were to put the "name" into a ping command, would it ping properly?

    The displayName is simply the display name shown in the UI. If they are the same, the most notable difference is in the breadcrumbs at the top of the resource page. This is what it looks like when it's different:

    This is what it looks like when they're the same: