Skip to content

Invoke-IcingaCheckUsedPartitionSpace does not handle limits correctly #477

@smarsching

Description

@smarsching

The Invoke-IcingaCheckUsedPartitionSpace plugin does not handle limits correctly: When the free space, not the used space, is checked, the critical limit must still be greater than the warning limit. Otherwise, the service reports an unknown state along with an error message.

For example, consider the following service configuration:

Service "windows-disk-c" {
  import "generic-satellite-service"

  check_command = "Invoke-IcingaCheckUsedPartitionSpace"
  display_name = "Disk C:"
  vars.IcingaCheckUsedPartitionSpace_Array_Include = ["C:"]
  vars.IcingaCheckUsedPartitionSpace_Object_Critical = "8%:"
  vars.IcingaCheckUsedPartitionSpace_Object_Warning = "15%:"
}

When using this configuration, the service reports an unknown state and an error message like this:

Partition C: Warning threshold range "87057595000" is greater than Critical threshold range "94227044000"

This is irritating for two reasons:

  1. When checking free space, the warning threshold should be greater than the critical threshold. After all, the colon after the treshold values indicates that these are lower, not upper thresholds.
  2. The number 87057595000 is actually less than 94227044000, so the error message is not even correct.

When using

  vars.IcingaCheckUsedPartitionSpace_Object_Critical = "15%:"
  vars.IcingaCheckUsedPartitionSpace_Object_Warning = "8%:"

No error is reported and the service status is OK instead UNKNOWN, but using a lower warning than critical limit makes no sense at all in this context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions