Icinga2: [dev.icinga.com #10827] Can't change default warning/critical thresholds for checks that have defaults set in ITL

Created on 11 Dec 2015  路  9Comments  路  Source: Icinga/icinga2

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

  • debug.log elimat - _2015-12-14 08:40:37 +00:00_
bug

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..

All 9 comments

Updated by mfriedrich on 2015-12-13 09:28:41 +00:00

  • Status changed from _New_ to _Feedback_
  • Assigned to set to _elimat_

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

  • File added _debug.log_

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

  • __name = "fnox-vm-prod-db008!load"
  • action_url = ""
  • 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"

  • enable_active_checks = true
  • enable_event_handler = true
  • enable_flapping = false
  • enable_notifications = true
  • enable_passive_checks = true
  • enable_perfdata = true
  • event_command = ""
  • flapping_threshold = 30
  • groups = [ ]
  • host_name = "fnox-vm-prod-db008"
    % = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 51:1-51:20

  • icon_image = ""

  • icon_image_alt = ""
  • 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 = ""

  • notes_url = ""
  • 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"

  • vars
  • backup_downtime = "00:00-06:00"
    % = modified in '/etc/icinga2/conf.d/services/generic.conf', lines 58:5-58:40

  • volatile = false

  • zone = ""

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

  • Description updated

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

  • Status changed from _Feedback_ to _Rejected_
  • Assigned to deleted elimat

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.

Was this page helpful?
0 / 5 - 0 ratings