Dear all, I am resending the mail I sent last week as I did not receive an answer. Thnak you and best regards,
Diana Thank you Michael, contrary to what I wrote the acknowledgement seems not to be lost, but the downtimes are. The '/var/lib/icinga2/icinga2.state’ file is updated, I got the following in the icinga2.log [2017-06-13 16:36:06 +0200] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state' [2017-06-13 16:41:12 +0200] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state' [2017-06-13 16:46:18 +0200] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state' [2017-06-13 16:51:24 +0200] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state’ The command icinga2 daemon -C -x notice | grep ‘conf.d/downtimes’ does not returning anything as the file conf.d/downtimes contains only the example (on both the standalone server and the HA server). Then for test you suggested I did the following. The downtimes have been set in the morning. I reloaded the service as I had to configured the Api user and I lost the downtimes set. I executed the following [root@icinga-20 conf.d]# curl -k -s -u 'IcingaApi:ro_api' https://localhost:5665/v1/objects/downtimes {"error":404.0,"status":"No objects found.”} and I got the same also after having set back the downtime on about 20 hosts The query is instead working with the following: curl -k -s -u 'IcingaApi:ro_api' https://localhost:5665/v1/objects/services or curl -k -s -u 'IcingaApi:ro_api' https://localhost:5665/v1/objects/hosts which both return a long list. Instead on the standalone server I got the list of downtimes and they are not lost after a reload or restart [root@icinga-10]# curl -k -s -u 'IcingaApi:ro_api' https://localhost:5665/v1/objects/downtimes {"results":[{"attrs":{"__name":"apl-ftk-df-31!icinga-10.cern.ch-1497365910-0","active":true,"author":"icingaadmin","comment":"test 1","config_owner":"","duration":0.0,"end_time":1497455898.0,"entry_time":1497365910.4335010052,"fixed":true,"ha_mode":0.0,"host_name":"apl-ftk-df-31","legacy_id":1.0,"name":"icinga-10.cern.ch-1497365910-0","original_attributes":null,"package":"_api","paused":false,"scheduled_by":"","service_name":"","start_time":1497365898.0,"templates":["icinga-10.cern.ch-1497365910-0"],"trigger_time":1497365910.4429600239,"triggered_by":"","triggers":[],"type":"Downtime","version":1497365910.433576107,"was_cancelled":false,"zone":"master"},"joins":{},"meta":{},"name":"apl-ftk-df-31!icinga-10.cern.ch-1497365910-0","type":"Downtime"}]} I will check again if the configuration on the two nodes is the same, but I would appreciate any hints. Thank you and best regards, Diana On 13 Jun 2017, at 11:21, Michael Friedrich <michael.friedr...@icinga.com> wrote: > >> On 13. Jun 2017, at 10:57, Diana Scannicchio <diana.scannicc...@gmail.com> >> wrote: >> >> Dear experts, >> I am running Icinga2 version 2.6.3 in high availability mode using two >> servers. >> Since the previous version when reloading or restarting the icinga2 service >> all the downtime or acknowledgemnt that we had set are lost. >> This is of course affecting normal operations. >> >> The OS version is SLC 6.8 (kernel 2.6.32-642.15.1.el6.x86_6) see below more >> info. >> The icinga2web version used is 2.4.1. >> >> The files related to the downtime are for example written in >> /var/lib/icinga2/api/packages/_api/conf.d/downtimes >> but is seems they are not reloaded after a restart/reload of the service and >> consequently we have to set them again. > > Can you verify that the corresponding directory is loaded during > startup/config validation, i.e. > > icinga2 daemon -C -x notice | grep ‘conf.d/downtimes’ > > The acknowledgements are stored within /var/lib/icinga2/icinga2.state in a > different location, is that file actively updated by the icinga2 daemon > itself? > > Pick an example host and service, and illustrate the work flow on > > - create a downtime > - query it via API on /v1/objects/downtimes > - restart/reload > - icinga2 daemon -C -x notice | grep ‘<hostname>’ > - query via API /v1/objects/downtimes - is it there? > > Similar thing for acknowledgements, but querying the URL endpoint > /v1/objects/services and checking for ‘acknowledgement’ as attribute. > > Kind regards, > Michael > > >> >> Would you have any hints about where/what to look or how to fix? >> The issue appears only on the system configured in high availability, while >> on a single standalone server with same icinga2 version (and same nodes and >> checks) the downtime and acknowledgement survive a service reload or restart. >> >> Thank you for any help or suggestion you could provide and best regards, >> >> Diana >> >> >> - >> Diana Scannicchio >> University of California, Irvine >> ATLAS TDAQ SysAdmin group >> Mobile: +41 75 411 5855 >> Office: +41 22 76 75240 >> OnCall: 164851 >> >> [root@icinga-20 icinga2]# icinga2 object list --type Endpoint >> Object 'icinga-21.cern.ch' of type 'Endpoint': >> % declared in '/etc/icinga2/zones.conf', lines 18:1-18:42 >> * __name = "icinga-21.cern.ch" >> * host = "icinga-21.cern.ch" >> % = modified in '/etc/icinga2/zones.conf', lines 19:5-19:37 >> * log_duration = 86400 >> * name = "icinga-21.cern.ch" >> * package = "_etc" >> * port = "5665" >> % = modified in '/etc/icinga2/zones.conf', lines 20:5-20:17 >> * templates = [ "icinga-21.cern.ch" ] >> % = modified in '/etc/icinga2/zones.conf', lines 18:1-18:42 >> * type = "Endpoint" >> * zone = "" >> >> Object 'icinga-20.cern.ch' of type 'Endpoint': >> % declared in '/etc/icinga2/zones.conf', lines 13:1-13:42 >> * __name = "icinga-20.cern.ch" >> * host = "icinga-20.cern.ch" >> % = modified in '/etc/icinga2/zones.conf', lines 14:5-14:37 >> * log_duration = 86400 >> * name = "icinga-20.cern.ch" >> * package = "_etc" >> * port = "5665" >> % = modified in '/etc/icinga2/zones.conf', lines 15:5-15:17 >> * templates = [ "icinga-20.cern.ch" ] >> % = modified in '/etc/icinga2/zones.conf', lines 13:1-13:42 >> * type = "Endpoint" >> * zone = “" >> >> >> [root@icinga-20 icinga2]# icinga2 --version >> icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.3) >> >> 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: /var/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: /var/run/icinga2/icinga2.pid >> >> System information: >> Platform: Scientific Linux CERN SLC >> Platform version: 6.8 (Carbon) >> Kernel: Linux >> Kernel version: 2.6.32-642.15.1.el6.x86_64 >> Architecture: x86_64 >> >> Build information: >> Compiler: GNU 4.8.2 >> Build host: e6e3648876de >> >> >> >> [root@icinga-20 icinga2]# icinga2 feature list >> Disabled features: debuglog gelf graphite influxdb livestatus opentsdb >> perfdata syslog >> Enabled features: api checker command compatlog ido-mysql mainlog >> notification statusdata >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> icinga-users mailing list >> icinga-users@lists.icinga.org >> https://lists.icinga.org/mailman/listinfo/icinga-users > > _______________________________________________ > icinga-users mailing list > icinga-users@lists.icinga.org > https://lists.icinga.org/mailman/listinfo/icinga-users _______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users