Forum Discussion

TMiller's avatar
8 years ago

Powershell results - working with son

Hi everyone,

I'm trying to get some results off a Simplivity system using power shell and json.  I have the powershelgl working as I would expect, but I can't get the results to show up in LogicMonitor. 

In collector debug, I see this when running the script.

returns 0
        "id":  "53466cdf-ee82-435e-8619-334b3a3e7583",
        "name":  "Fakename",
        "type":  "OMNISTACK",
        "members":  [
        "arbiter_connected":  true,
        "arbiter_address":  "",
        "stored_compressed_data":  731283120128,
        "compression_ratio":  "1.8 : 1",
        "deduplication_ratio":  "300.9 : 1",
        "free_space":  14779864866201,
        "capacity_savings":  387454100800512,
        "efficiency_ratio":  "530.8 : 1",
        "local_backup_capacity":  385825262157824,
        "used_logical_capacity":  388185382895616,
        "remote_backup_capacity":  0,
        "allocated_capacity":  15511146961305,
        "stored_virtual_machine_data":  2360120737792,
        "stored_uncompressed_data":  1290225192960,
        "used_capacity":  731282095104

I've attached example of what I've tried for output.  Nothing is showing up.


2 Replies

Replies have been turned off for this discussion
  • Because the fundamental JSON datastructure is an array, I believe you'll need to reference the root array element as $[0]. So:



  • I ended up working with support on this.  It turns out that the information coming back from Powershell is actually strings.  I had to use regex to access the data.