Hi All,

I'm attempting to put together a custom HTTP content sensor with some screen scraped data from a website.

The background of the concept is we have a national power provider that publishes network load on a dashboard on their website. We are wanting to scrape the content using variables such as "mainContentPlaceHolder_lbTotalNetwork" into PRTG The variable above will return a numeric value which is in Megawatts.

Would this be able to be done with a custom written lookup ? I have a basic understanding on how the XML for the lookups works but unsure how to specify it to look for the value under "mainContentPlaceHolder_lbTotalNetwork"

We do also have powershell scripts which does the same job but get PE132 Response not wellformed error when attempting to run it.

Cheers!


Article Comments

You have a link to that page? You'll definitely have to use a custom script sensor, since they probably don't publish this information via JSON/XML or anything like that, do they?


Aug, 2015 - Permalink

Here is a copy to the page in question: https://online.oriongroup.co.nz/LoadManagement/default.aspx

We're able to get the data via a powershell script but get the error "Response not wellformed: "(562 )" (code: PE132)" 562 is the result we're wanting in this example, it is possible to change the expected behavior of the answer message ? That would likely bypass the issue of having to try and do custom lookups.


Aug, 2015 - Permalink

What does the current result look like? It has to be something like this:

<prtg>
  <result>
    <channel>First channel</channel>
    <value>10</value>
  </result>
  <result>
    <channel>Second channel</channel>
    <value>20</value>
  </result>
</prtg>

Aug, 2015 - Permalink