PoshSensu icon indicating copy to clipboard operation
PoshSensu copied to clipboard

Having issue with a basic configuration

Open electricJP opened this issue 8 years ago • 0 comments

Hello, I'm testing use PoshSensu, and it doesn't seem to work (anymore?): My JSON config: { "sensu_socket_ip": "localhost", "sensu_socket_port": "3030", "logging_enabled": true, "logging_level": "debug", "logging_directory": "C:\PoshSensu\Logs", "logging_filename": "poshsensu.log", "logging_max_file_size_mb": "10", "checks_directory": "C:\Program Files\WindowsPowerShell\Modules\PoshSensu\Checks", "check_groups": [ { "group_name": "quickchecks", "max_execution_time": 30, "ttl": 180, "interval": 30, "checks": [ { "name": "Counters", "type": "metric", "command": "wmi.ps1" } ] } ] }

What I get: PS C:> Start-SensuChecks -ConfigPath 'C:\PoshSensu\poshsensu_config.json' -TestMode The property 'check_groups_path' cannot be found on this object. Verify that the property exists. At C:\Program Files\WindowsPowerShell\Modules\poshsensu\Functions\Internal.ps1:54 char:9

  • if (-not([string]::IsNullOrEmpty($Config.check_groups_path)))
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'check_groups_path' cannot be found on this object. Verify that the property exists. At C:\Program Files\WindowsPowerShell\Modules\poshsensu\Functions\Internal.ps1:54 char:9

  • if (-not([string]::IsNullOrEmpty($Config.check_groups_path)))
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'check_groups_path' cannot be found on this object. Verify that the property exists. At C:\Program Files\WindowsPowerShell\Modules\poshsensu\Functions\Internal.ps1:54 char:9

  • if (-not([string]::IsNullOrEmpty($Config.check_groups_path)))
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

Format-SensuChecks : Cannot validate argument on parameter 'SensuChecks'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\Program Files\WindowsPowerShell\Modules\poshsensu\Functions\Start-SensuChecks.ps1:82 char:67

  • ... $bgJobsScriptBlocks = Format-SensuChecks -SensuChecks $validChecks
  •                                                          ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Format-SensuChecks], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Format-SensuChecks

You cannot call a method on a null-valued expression. At C:\Program Files\WindowsPowerShell\Modules\poshsensu\Functions\Start-SensuChecks.ps1:88 char:38

  • ... ForEach ($bgJobScript in $bgJobsScriptBlocks.GetEnumerator())
  •                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

2016-06-17T10:36:19 [3092] - Start-SensuChecks - INFO - No Data From Background Jobs ::: Details: No data has been returned from background jobs yet. Looping again quickly to see if any data has been returend yet. 2016-06-17T10:36:21 [3092] - Start-SensuChecks - INFO - No Data From Background Jobs ::: Details: No data has been returned from background jobs yet. Looping again quickly to see if any data has been returend yet. 2016-06-17T10:36:23 [3092] - Start-SensuChecks - INFO - No Data From Background Jobs ::: Details: No data has been returned from background jobs yet. Looping again quickly to see if any data has been returend yet. 2016-06-17T10:36:25 [3092] - Start-SensuChecks - INFO - No Data From Background Jobs ::: Details: No data has been returned from background jobs yet. Looping again quickly to see if any data has been returend yet.

And the check is never executed.

Any idea?

electricJP avatar Jun 17 '16 14:06 electricJP