Closed gitmopp closed 7 years ago
From my understanding the problem is in lib/livestatus/logtable.cpp.
return Service::GetByNamePair(host_name, service_description);
In lib/icinga/service.cpp: Service::GetByNamePair
tries to return the value from host->GetServiceByShortName(serviceName)
GET log
does not work if the host or service does not exist anymore in Icinga2 as an object. So if you delete a service from Icinga2 the GET log
command will not return valid data.
Problem here is that you'll need the object pointer for automatic table joins with additional attributes, if specified.
Cannot be solved with the requirement of a valid object.
Livestatus
GET log
does not return ahost_name
in some cases. In the example I changed the host_names. The length of the host_name is unchanged. I don' t have any special characters in the host_name.Expected Behavior
GET log
should return the host_nameCurrent Behavior
host_name is missing
Possible Solution
I didn' t look in the code.
Steps to Reproduce (for bugs)
The file /var/log/icinga2/compat/archives/icinga-06-01-2017-14.log shows the correct information:
When I run the Livequery I get
As you can see the host_name GHIJ432 is missing. It works for most other hosts.
Your Environment
icinga2 --version
): 2.6.3icinga2 feature list
): api checker command compatlog ido-mysql influxdb livestatus mainlog notification