Icinga/icingaweb2

Dashlets twice in dashboard & not deletable

Opened this issue · 4 comments

Describe the bug

When adding a dashlet to the existing and preconfigured dashboards "Current Incidents" and "Overdue", the dashlets are added twice. Also, I can't delete any dashlets from those two dashboards. Modifying the dashlets works fine. Modifying one dashlet also modifies the twin.
Adding dashlets to newly configured dashboards adds them only once, and dashlets are easily deleted. I already removed all dashlets that still worked through the obsolete monitoring module and not the IcingaDB.

To Reproduce

  1. Create any sort of query in Icingaweb, e.g. for Host Problems.
  2. Add the query as dashlet to the aforementioned dashboards.
  3. Also, try to delete any sort of dashlet from those dashboards

I can't reproduce the issue with my colleague's dashboards or in the testing environment.

Expected behavior

Adding a dashlet should only add it once, and they should be deletable.

Screenshots

Screenshot of Dashboard Settings:
grafik

The doubling is not apparent in the /etc/icingaweb2/dashboards/[username]/dashboard.ini:

[Current Incidents]
title = "Current Incidents"

[Current Incidents.Service Problems]
url = "icingadb/[...]
title = "Service Problems"

[Current Incidents.Host Problems]
url = "icingadb/[...]
title = "Host Problems"

[Current Incidents.Recently recovered Hosts]
url = "icingadb/[...]
title = "Recently recovered Hosts"

[Current Incidents.Recently recovered Services]
url = "icingadb/[...]
title = "Recently recovered Services"

[Current Incidents.Late Host Check Results]
url = "icingadb/[...]
title = "Late Host Check Results"

[Current Incidents.Test]
url = "icingadb/[...]
title = "Test"

However, the dashboard.ini generally doesn't seem to contain all configuration items for the dashlets in the default dashboards.

Overdue dashboard:
grafik
grafik

In dashboard.ini:

[Overdue]
title = "Overdue"

[Overdue.Late Host Check Results]
url = "icingadb/[...]
title = "Late Host Check Results"

[Overdue.Late Service Check Results]
url = "icingadb/[...]
title = "Late Service Check Results"

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About):

grafik

  • Web browser used: Firefox, Edge
  • Icinga 2 version used (icinga2 --version): r2.14.2-1
  • PHP version used (php --version): PHP 8.0.30
  • Server operating system and version: SUSE Linux Enterprise Server 15 SP5

Additional context

Add any other context about the problem here.

Hi,

I think you've guessed it already: I cannot reproduce this. I get no duplicates and removal as well as editing works fine.

I can't reproduce the issue with my colleague's dashboards or in the testing environment.
The doubling is not apparent in the /etc/icingaweb2/dashboards/[username]/dashboard.ini:

If you can reliably reproduce this on your system, try a different browser, log in as a different user, change the locale. Or identify any differences between you and your colleagues. (Maybe they don't have access to a particular module)

However, the dashboard.ini generally doesn't seem to contain all configuration items for the dashlets in the default dashboards.

That's normal. Only once a default item is adjusted, it appears in the INI file.

I have the same problem. Steps to reproduce:

# delete existing configurations, just to be on the safe side
docker volume rm icinga-playground_icinga2 icinga-playground_icingaweb icinga-playground_mysql

# start icinga
git clone https://github.com/lippserd/docker-compose-icinga.git
cd docker-compose-icinga
git checkout 9c6f89114dc26fe42510c75cf1eb4d085c3f8491
docker-compose -p icinga-playground up -d

# login with username "icingaadmin" and password "icinga"
# the widgets are not duplicated, so far everything is okay
open http://127.0.0.1:8080/ || xdg-open http://127.0.0.1:8080

# since there is no vim within icingaweb2 and we cannot install it without root,
# we create a temporary container to create/edit files with vim
docker run --rm -it -v icinga-playground_icingaweb:/data debian:12 /bin/bash

# create dashboard for user "icingaadmin"
# used configuration, see below
apt-get update && apt-get install --yes vim
mkdir -p /data/etc/icingaweb2/dashboards/icingaadmin
vim /data/etc/icingaweb2/dashboards/icingaadmin/dashboard.ini

# exit container
exit

# open icingaweb again or reload, the widgets are duplicated
open http://127.0.0.1:8080/ || xdg-open http://127.0.0.1:8080
/data/etc/icingaweb2/dashboards/icingaadmin/dashboard.ini
[Current Incidents]
title = "Current Incidents"

[Current Incidents.Service Problems]
title = "Service Problems"
disabled = "1"

[Current Incidents.Recently Recovered Services]
title = "Recently Recovered Services"
disabled = "1"

[Current Incidents.Host Problems]
title = "Host Problems"
disabled = "1"

[Current Incidents.3_Servicegroups]
url = "icingadb/servicegroups?servicegroup.name_ci!=daily-business&sort=services_severity"
title = "Groups"
Screenshot

Bildschirmfoto 2024-05-31 um 16 17 05

Details

Tested with:

  • Firefox
  • Chrome
  • Safari
$ docker --version 
Docker version 26.1.1, build 4cf5afa

I wonder if the ini files of the users are included somewhere twice. But I haven't found anything about this.

My mistake. I have found the problem. Fix:

- [Current Incidents]
- title = "Current Incidents"
- 
[Current Incidents.Service Problems]
title = "Service Problems"
disabled = "1"

[Current Incidents.Recently Recovered Services]
title = "Recently Recovered Services"
disabled = "1"

[Current Incidents.Host Problems]
title = "Host Problems"
disabled = "1"

[Current Incidents.3_Servicegroups]
url = "icingadb/servicegroups?servicegroup.name_ci!=daily-business&sort=services_severity"
title = "Groups"

@Nayakum Maybe you have the same error in your configuration.