Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location not updating #119

Open
sinyb opened this issue Aug 8, 2023 · 1 comment
Open

Location not updating #119

sinyb opened this issue Aug 8, 2023 · 1 comment

Comments

@sinyb
Copy link

sinyb commented Aug 8, 2023

When I update attribute host.geolocation via REST API:
curl -k -s -S -i -u root:password -H 'Accept: application/json' -X POST https://localhost:5665/v1/objects/hosts/$MYHOST -d '{ "attrs": { "vars.geolocation": "12.34,67.89"}, "pretty": true }'

it is not automaticaly updated on the map, only after a refresh

Expected Behavior

Host should appear on new coordinates in some reasonable time, just as it's status is automaticaly updated if a status change happens (Up/Down/whatever)

Current Behavior

Currently, host moves to new coordinates only after page refresh.

Possible Solution

Either check location every time, or have some way to notify map module about change.

Steps to Reproduce (for bugs)

  1. open map showing host
  2. update geolocation attribute via curl (see up)
  3. host stays in the same place until refresh (F5)

Context

I am monitoring (besides other things like servers, routers, ...) a fleet of cars that have GPS reporting to the base every minute, so I'd like to show them on the map, together with their current Up/Down status (they are Up only when engine is running).

Your Environment

  • Icinga Web 2 Map version (System - About): 1.1.0
  • Icinga Web 2 version and modules (System - About): 2.11.4
  • Version used (icinga2 --version): r2.13.8-1
  • Operating System and version: openSUSE Leap 15.5
  • Enabled features (icinga2 feature list): api checker command ido-mysql mainlog notification perfdata
  • Config validation (icinga2 daemon -C):
    [2023-08-08 12:06:15 +0200] information/cli: Icinga application loader (version: r2.13.8-1)
    [2023-08-08 12:06:15 +0200] information/cli: Loading configuration file(s).
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Committing config item(s).
    [2023-08-08 12:06:15 +0200] information/ApiListener: My API identity: gxxx.xx.xx
    [2023-08-08 12:06:15 +0200] warning/ApplyRule: Apply rule 'backup-downtime' (in /etc/icinga2/conf.d/downtimes.conf: 8:1-8:52) for type 'ScheduledDowntime' does not match anywhere!
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 8670 Notifications.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 4449 Dependencies.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 21 HostGroups.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 510 Hosts.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 FileLogger.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 13 Comments.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 3 Zones.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 ExternalCommandListener.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 Endpoint.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 2 ApiUsers.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 ApiListener.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 NotificationComponent.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 284 CheckCommands.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 1 PerfdataWriter.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 5 UserGroups.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 8 ServiceGroups.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 6 TimePeriods.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 24 Users.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 3817 Services.
    [2023-08-08 12:06:15 +0200] information/ConfigItem: Instantiated 6 NotificationCommands.
    [2023-08-08 12:06:15 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
    [2023-08-08 12:06:15 +0200] information/cli: Finished validating the configuration file(s).
@nbuchwitz
Copy link
Owner

The map module uses the coordinates the backend provides. So my guess would be that the update is not deployed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants