Skip to content

Powershell-framework 1.10 - Register-IcingaServiceCheck results in powershell errors #582

@chr1sos

Description

@chr1sos

Expected Behavior

Register Background Daemon and Service Checks to collect metrics over time should work.

Register-IcingaBackgroundDaemon -Command 'Start-IcingaServiceCheckDaemon';

Register-IcingaServiceCheck -CheckCommand 'Invoke-IcingaCheckCPU' -Interval 30 -TimeIndexes 1, 3, 5, 15;

Show-IcingaRegisteredServiceChecks;

Current Behavior

Register-IcingaServiceCheck fails and print several powershell errors:

Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\cache\framework_cache.psm1:411 char:21
... figObject | Add-Member -MemberType NoteProperty -Name $ConfigKey -Val ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand

Possible Solution

Steps to Reproduce (for bugs)

  1. follow guide to install IcingaForWindows (first installation on a new system)
  2. run Register-IcingaBackgroundDaemon -Command 'Start-IcingaServiceCheckDaemon';
  3. run Register-IcingaServiceCheck -CheckCommand 'Invoke-IcingaCheckCPU' -Interval 30 -TimeIndexes 1, 3, 5, 15;
  4. multiple errors occured

Context

collect metrics over time not usable with framework 1.10

Your Environment

  • PowerShell Version used ($PSVersionTable.PSVersion):
    Major Minor Build Revision
    5_______1_____17763__592
  • Operating System and version (Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption):
    Version_____BuildNumber__Caption
    10.0.17763__17763______Microsoft Windows Server 2019 Standard Evaluation
    (fresh installed to exclude possible side effects)

Metadata

Metadata

Assignees

Labels

BugThere is an issue present

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions