# Show hosts in the map

**URL:** <https://community.icinga.com/t/show-hosts-in-the-map/13644>\
**Category:** Visualization, Metrics & Reporting\
**Created:** [May 28, 2024, 1:38pm UTC](https://community.icinga.com/t/show-hosts-in-the-map/13644 "2024-05-28T13:38:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NobreInGitHub](https://community.icinga.com/user_avatar/community.icinga.com/nobreingithub/32/7814_2.png) [@NobreInGitHub](https://community.icinga.com/u/NobreInGitHub)\
**Post date:** [May 28, 2024, 1:38pm UTC](https://community.icinga.com/t/show-hosts-in-the-map/13644/1 "2024-05-28T13:38:52Z")

</div>

Hello, I have a problem with hosts in module map

Icinga 2 installed on CentOS 8

my configuration

/etc/icingaweb2/modules/map/config.ini

[provider]  
osm\_provider = “OpenStreetMap”

[options]  
location\_lat = “vars.location\_lat”  
location\_lon = “vars.location\_lon”

[openstreetmap]  
url = “https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png”  
attribution = “Map data © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors”

For test, my configuration

/etc/icinga2/conf.d/hosts.conf

object Host “example\_host” {  
import “generic-host”  
address = “192.168.1.1”  
vars.location\_lat = 40.7128  
vars.location\_lon = -74.0060  
}

But, I don’t have any hosts in map.  
Already check for erros on  
sudo icinga2 daemon -C  
Verify file permissions with  
ls -l /etc/icingaweb2/modules/map/config.ini

with command  
icinga2 object list --type Host --name example\_host  
…

- vars
  - location\_lat = 40.712800  
% = modified in ‘/etc/icinga2/conf.d/hosts.conf’, lines 57:5-57:31
  - location\_lon = -74.006000  
% = modified in ‘/etc/icinga2/conf.d/hosts.conf’, lines 58:5-58:32

- volatile = false
- zone = “”

…

Any help, maybe I forget something?

Thanks

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [May 28, 2024, 2:20pm UTC](https://community.icinga.com/t/show-hosts-in-the-map/13644/2 "2024-05-28T14:20:12Z")

</div>

how did you get this config of the map module? this seems to be a bit off.  
If you use this maps module:

> **[GitHub - nbuchwitz/icingaweb2-module-map: An openstreetmap based map module...](https://github.com/nbuchwitz/icingaweb2-module-map)**
>
> An openstreetmap based map module for host and service state visualization with Icinga Web 2 - nbuchwitz/icingaweb2-module-map

it uses:

> vars.geolocation = “,”

see:

> <https://github.com/nbuchwitz/icingaweb2-module-map/blob/master/doc/02-Add-Items-to-map.md>
