This issue has been migrated from Redmine: https://dev.icinga.com/issues/10827
Created by elimat on 2015-12-11 15:09:23 +00:00
Assignee: _(none)_
Status: _Rejected_ (closed on _2016-03-18 15:08:58 +00:00_)
Target Version: _(none)_
Last Update: _2016-03-18 15:08:58 +00:00 (in Redmine)_
Icinga Version: 2.4.1
Backport?: Not yet backported
Include in Changelog: 1
We have a problem where checks that have defaults values for Warning and Critical thresholds cant be set to something else.
I set a custom variable to the value I want. then the checks use this the next time it runs. How ever the next time it runs it uses the the default values from ITL.
I have some contrib checks and they does not have this problem. But "procs" and "load" checks have the same issue.
below is an example of how the apply rule for "load" check locks like
apply Service "load" {
import "generic-service"
check_command = "load"
command_endpoint = host.vars.remote_client
vars.load_wload1 = 10.0
vars.load_wload5 = 8.0
vars.load_wload15 = 6.0
vars.load_cload1 = 20.0
vars.load_cload5 = 12.0
vars.load_cload15 = 8.0
assign where host.vars.remote_client && host.vars.os == "Linux"
}
Attachments
Updated by mfriedrich on 2015-12-13 09:28:41 +00:00
Please show the output of icinga2 object list for these service objects. Furthermore please extract the executed command from the debug log on the client and add it here.
Updated by elimat on 2015-12-14 08:41:36 +00:00
dnsmichi wrote:
Please show the output of icinga2 object list for these service objects. Furthermore please extract the executed command from the debug log on the client and add it here.
output of object list of load check:
[root@prod-icinga01 conf.d]# icinga2 object list --type service --name fnox-vm-prod-db008*load
Object 'fnox-vm-prod-db008!load' of type 'Service':
% declared in '/etc/icinga2/conf.d/services/generic.conf', lines 51:1-51:20
check_command = "load"
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 54:3-54:24
check_interval = 60
% = modified in '/etc/icinga2/conf.d/templates.conf', lines 28:3-28:21
check_period = ""
command_endpoint = "fnox-vm-prod-db008"
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 55:3-55:44
display_name = "load"
host_name = "fnox-vm-prod-db008"
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 51:1-51:20
icon_image = ""
max_check_attempts = 5
% = modified in '/etc/icinga2/conf.d/templates.conf', lines 27:3-27:24
name = "load"
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 51:1-51:20
notes = ""
package = "_etc"
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 51:1-51:20
retry_interval = 30
% = modified in '/etc/icinga2/conf.d/templates.conf', lines 29:3-29:22
templates = [ "load", "generic-service" ]
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 51:1-51:20
% = modified in '/etc/icinga2/conf.d/templates.conf', lines 26:1-26:34
type = "Service"
backup_downtime = "00:00-06:00"
% = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 58:5-58:40
volatile = false
debuglog from icinga2 client: fnox-vm-prod-db008 is attached.
Let me know if you need more info.
Thanks
Updated by elimat on 2015-12-22 09:58:03 +00:00
I think I have found how I get the issue.
It looks like the service name can't be the same as the check_command name. I have been using "load" as service name and its the same name as the check command. I have now tried to change the service name to "Load" with capital L and my issues are gone. I still feel this to be a bug since it should still work if I want to use the same name for the service name as the check name.
Updated by mfriedrich on 2016-02-24 21:07:43 +00:00
That apply rule for "load" does not match the output of "object list". The custom attributes defined in "vars" is totally missing. I guess a different apply rule is defined, and is not setting any thresholds. For further confusion there are multiple checks executed for local check_load. Try to trim your configuration to just one local load check in order to analyse the issue.
Updated by mfriedrich on 2016-03-18 15:08:58 +00:00
I'm closing this as invalid.
I also see custom thresholds are not working when I have the same service name as check command name. I tested this with proc and load and both not working, if I change the service name it works perfectly.
Is there any solution to this? I want to name my services as the check command..
Same for me with Icinga2 2.8.1. I think this bug should be reopen.
I don't think so, without any further problem description. Hop on the forums or mailing lists and share your problem and details.
Same problem. Had to switch service names of procs and load and now it works.
Most helpful comment
I also see custom thresholds are not working when I have the same service name as check command name. I tested this with proc and load and both not working, if I change the service name it works perfectly.
Is there any solution to this? I want to name my services as the check command..