Ad Widget

Collapse

Item preprocessing of XML when wanted value could be from different places

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Taomyn
    Junior Member
    • Feb 2021
    • 21

    #1

    Item preprocessing of XML when wanted value could be from different places

    I've created a template that executes a PowerShell script via the agent and retrieves the current CPU temperatures as XML data. This works fines from the script perspective but I'm having issues with getting the value back when the location in the XML can be different depending on the make of CPU - I've only seen two different ones so far.

    I thought I could achieve this by using two preprocessing entries and then enabling "Custom on fail" with "Discard value". When I test if the first one succeeds I see the correct result and for the second it shows a fail. However when it's the other way around, the first fails but the second doesn't get executed and I have no data.

    Click image for larger version

Name:	Screenshot 2021-02-15 135329.png
Views:	225
Size:	22.1 KB
ID:	418807
    Click image for larger version

Name:	Screenshot 2021-02-15 135426.png
Views:	239
Size:	20.9 KB
ID:	418809
    Click image for larger version

Name:	Screenshot 2021-02-15 135535.png
Views:	211
Size:	21.0 KB
ID:	418808
    Click image for larger version

Name:	Screenshot 2021-02-15 135603.png
Views:	224
Size:	18.0 KB
ID:	418810
Working...