Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param($jsonurl)
- $response = (Invoke-Webrequest -Uri $jsonurl | ConvertFrom-Json)
- Write-Host
- @"
- <prtg>
- <result>
- <channel>Max. Memory</channel>
- <value>$($response.value.max)</value>
- <Unit>BytesMemory</Unit>
- <Float>1</Float>
- <DecimalMode>Auto</DecimalMode>
- </result>
- <result>
- <channel>Committed Memory</channel>
- <value>$($response.value.committed)</value>
- <Unit>BytesMemory</Unit>
- <DecimalMode>Auto</DecimalMode>
- </result>
- <result>
- <channel>Initial Memory</channel>
- <value>$($response.value.init)</value>
- <Unit>BytesMemory</Unit>
- <DecimalMode>Auto</DecimalMode>
- </result>
- <result>
- <channel>Used Memory</channel>
- <value>$($response.value.used)</value>
- <Unit>BytesMemory</Unit>
- <DecimalMode>Auto</DecimalMode>
- </result>
- </prtg>
- "@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement