Error: Object 'XY' of type 'Service' re-defined:

  • Hi, i got this error by redefining a service which was already there. By deploying i got an error, but director deployed the service twice. now in icingaweb2, if i choose one of the doubled deployed services i get the error:


    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /usr/share/icingaweb2/library/vendor/Zend/Db/Statement/Pdo.php on line 244 in icingaweb2 -> so i cant delete it from webinterface. i tried to delete it in the config file shown when hovering mouse over the file path in icingadirector one time but tis didnt solve the problem. any suggestions? Thank you

  • root@monitoring:~# icinga2 --version

    icinga2 - The Icinga 2 network monitoring daemon (version: r2.6.3-1)


    Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)

    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>

    This is free software: you are free to change and redistribute it.

    There is NO WARRANTY, to the extent permitted by law.


    Application information:

    Installation root: /usr

    Sysconf directory: /etc

    Run directory: /run

    Local state directory: /var

    Package data directory: /usr/share/icinga2

    State path: /var/lib/icinga2/icinga2.state

    Modified attributes path: /var/lib/icinga2/modified-attributes.conf

    Objects path: /var/cache/icinga2/icinga2.debug

    Vars path: /var/cache/icinga2/icinga2.vars

    PID path: /run/icinga2/icinga2.pid


    System information:

    Platform: Ubuntu

    Platform version: 14.04.5 LTS, Trusty Tahr

    Kernel: Linux

    Kernel version: 4.4.0-81-generic

    Architecture: x86_64


    Build information:

    Compiler: GNU 4.8.4

    Build host: lgw01-43


  • The overflow looks like that the PHP memory limit with 128M is too low. Try increasing that to 256M in your php.ini and restart Apache.


    Apart from that, you cannot have two templates with the same name (your screenshot looks like that).

  • thank you. i know that i cant have 2 services with same name... but within 2500 services this can happen i guess. changing my php.ini to 256 did no solve the problem. i restartet apache2 and icinga2. now when i click on this service, in icingaweb2 the side greyed out and after a while icingaweb2 shows connection to server lost - for a moment... but dont show me the config page of service..


    it wont let me delete it anymore from web. editing the service_template.conf file didnt help too, how can i delete this service?

  • its version 1.31... for testing i made snapshot today an tried git pull to the actual version which works, but didnt solve the problem. upgrading icinga2 doesnt help too. so i tried with both up to date with no luck and decided to role back snapshot.

  • i dont know how to handle that... anywhere to find some explanations for the cli? i mean, once there was a check that you cant deploy doubled things, where is it?

    And after getting trouble with doubled checks, i found some buggy behavior about service sets and changing settings too. i made another thread as soon i can tell whats going wrong.


    And the doubled check caused that changings from director side wont be set. in other words i cant change my settings any more. if there is no solution i have to write back a snapshot

  • the problem is that we need icinga working and for now it does not. with the error of the doubled check for example i cant change some settings any more. most of my host get their checks over the service set bound to a host group. now, if i move a host out of host group, the checks will stuck on host. when i watch under host -> services they are not shown in director, but in icinga... or i removed a check from a set, gave it another command and added it back, the hosts all work unchanged... although as i told, the check for double named service or hosts didnt work for me either... this evening i will play back my backup from sunday...

  • root@monitoring:~# icingacli director service exists Bridge_File_Age_00CE_Mailnew

    Service 'Bridge_File_Age_00CE_Mailnew' exists

    root@monitoring:~# icingacli director service delete Bridge_File_Age_00CE_Mailnew

    ERROR: Icinga\Exception\IcingaException in /usr/share/php/Icinga/Cli/Command.php:141 with message: Object name parameter is required


    BUTT :)


    root@monitoring:~# icingacli director service set Bridge_File_Age_00CE_Mailnew --object_name Bridge_File_Age_00CE_Mailnew.defekt

    Service 'Bridge_File_Age_00CE_Mailnew' has been modified


    did the trick! thank you!!

    The post was edited 1 time, last by DataSam ().

  • Not at all, deploying is ok and works again, but the doubled renamed service cant be deleted what i want.


    root@monitoring:~# icingacli director service delete Bridge_File_Age_00CE_Mailnew.defekt

    ERROR: Icinga\Exception\IcingaException in /usr/share/php/Icinga/Cli/Command.php:141 with message: Object name parameter is required


    root@monitoring:~# icingacli director service show Bridge_File_Age_00CE_Mailnew.defekt

    template Service "Bridge_File_Age_00CE_Mailnew.defekt" {

    import "Bridge_File_Age_00CE_Mailnew.defekt"


    max_check_attempts = "3"

    check_period = "immer"

    check_interval = 1h

    retry_interval = 20m

    enable_notifications = true

    enable_active_checks = true

    enable_passive_checks = true

    enable_event_handler = true

    enable_perfdata = true

    }


    any more ideas? i think it has something to do with the import rule, its wrong. when i choose this service template now in director icingaweb2 the side greys out unresponsible, the original service works again. just this service is the problem now. maybe it can be deletet when import funcion is away.. i am to stupid to do so..

    The post was edited 1 time, last by DataSam ().

  • root@monitoring:~# icingacli director service set Bridge_File_Age_00CE_Mailnew.defekt --imports "NRPE_RAM*"

    Service 'Bridge_File_Age_00CE_Mailnew.defekt' has been modified


    über CLI irgendwas anderes importiert, webinterface läuft wieder und der defekt Service lies sich löschen... !


    Zangengeburt.