Hello! Is this somehow stored somewhere in the mender server? I would like to get the external / public IP of the device.
Thanks!
Hello! Is this somehow stored somewhere in the mender server? I would like to get the external / public IP of the device.
Thanks!
Hi
By default, a few of these should show up in your inventory.
There is the geo-ip
, which checks the external IP location. You also have your network interfaces show up (for me wlan0
and eth0
), but if you’re behind NAT
as you know, these are not really that helpful).
Thank you! Sorry for the late reply.
Where is “geo-ip” ? I can’t see it in inventory. Does it have to be enabled?
The geo-ip
is just returned from a local inventory script found in /usr/share/mender/inventory/
.
If this folder contains mender-inventory-geo
, then you should be good (It was added sometime around 3.0
I think [from the top of my head]).
If not, you can also just add it yourself, there’s not that much too it. It curls a network IP service, and returns the result to the Mender client
Thanks a lot for the quick answer!
I look at Inventory | Mender documentation
However it seems like it just retrieves information from a 3rd party site https://ipvigilante.com .
This is not optimal since I only want to rely on the mender server itself.
There is no such built-in feature?
Oh… Now I see what you mean!
However it seems like it just retrieves information from a 3rd party site https://ipvigilante.com .
This is correct.
This is not optimal since I only want to rely on the mender server itself.
There is no such built-in feature?
No, there is no such functionality in our server. I’m guessing (from my limited backend experience), that it will not be added either, as it will not scale well with a large number of devices (which we have).
However, if you find some other way of obtaining it from the client, you are free to create your own inventory
script for it.
If you are essentially running a whitelist
for your external requests, then hmm…
I guess, you would sort of want an endpoint like ipvigilante
on the Server, for the client to poll. This would actually work (as opposed to storing it from the request).
However, there are no immediate plans in the works for this, as it’s a rarely (first time this) requested feature. But if the community wants it enough… Who knows
Thank you for clarifying this!
Maybe it could be an option on self hosted?
I think we’ll just have a simple endpoint on our own server meanwhile.
Thanks again!
Maybe it could be an option on self hosted?
Nothing keeping you from adding this on a self-hosted instance
I think we’ll just have a simple endpoint on our own server meanwhile.
Should work just fine
And best of luck!
Also, will you mark the thread as resolved?
Thanks for all the help. How do I mark it as resolved? I see no function for that in the … menu
@emilm you can mark a post as solution, its near the bottom - click the three dots to unfold and click the “Solution” checkbox.
Greetz,
Josef
How do I mark it as resolved?
You just made us realise this was not enabled in the get-started section - thanks. Option should be there now
Great, I have now marked it as solution