Powershell Component with Multiple Statistics

I've written several of these in the past but I'm at a loss for why this one isn't working. Does anyone see what's wrong with this script output? When I try to map the values with the Get Script Output button, I get the 'Not defined' error.

This is the output from the debug logs.

Output:      ====================================================
Statistic.pkt4received: 34204890
Message.pkt4received: Packets Received
Statistic.pkt4ackreceived: 0
Message.pkt4ackreceived: ACKs Received
Statistic.pkt4acksent: 25828997
Message.pkt4acksent: ACKs Sent
Statistic.pkt4discoverreceived: 7224257
Message.pkt4discoverreceived: Discover Packets Received
Statistic.pkt4offersent: 3343291
Message.pkt4offersent: Offers Sent
Statistic.pkt4nakreceived: 0
Message.pkt4nakreceived: NAKs Received
Statistic.pkt4requestreceived: 26094337
Message.pkt4requestreceived: Requests Received

Errors:      ====================================================

Result:      ====================================================

Component Evidence Type: DynamicEvidence
Component Type: WindowsPowerShell
Actual Outcome: Undefined

Registered Errors:


Dynamic Monitor Result Info:

Outcome based on statistic thresholds: Undefined
End PowerShell Execute Result ===================================

Thanks for looking!

Parents
  • Just grasping at straws here.  Make sure the powershell exits with return code 0.  Basically to test it, wrap the entire thing in a giant try/catch and in the catch part maybe write out "statistic.error: 1"

  • I found some time to test this theory.  It seems partially plausible, but incomplete.  In my test I did the output and caused an exception.  Output section showed my output.  The "Dynamic Monitor Result Info:" section was blank, and the "Outcome based on statistic thresholds:" is Undefined.  So that matches... BUT... the exception shows up in the "Errors: " section, where yours didn't show anything.

    I don't suppose you actually have the "exit" command in the script anywhere do you?

Reply
  • I found some time to test this theory.  It seems partially plausible, but incomplete.  In my test I did the output and caused an exception.  Output section showed my output.  The "Dynamic Monitor Result Info:" section was blank, and the "Outcome based on statistic thresholds:" is Undefined.  So that matches... BUT... the exception shows up in the "Errors: " section, where yours didn't show anything.

    I don't suppose you actually have the "exit" command in the script anywhere do you?

Children