Hi,
I recently use a HTTP content sensor to check file copy time.
The script is :
$time=Measure-Command -Expression {Copy-Item sourcepath destpath -Recurse -Force -Confirm:$False}
write-host "<html>"
write-host "<body>"
"["+ $time.Totalminutes +"]"
write-host "</body>"
write-host "</html>"
and this command is been output into an empty html with right format like [2.1313131] that said by PRTG document like bellowing, For example, consider a URL http://www.example.com/status.html that returns a PHP script with the current system status in a simple HTML page as follows:
<html> <body> Description: Script gives back current status of disk free (%) and CPU usage (%). [85.5][12.0] </body> </html>
However, it reported as the unexpected format when I using the http content sensor with 1 channel and float setting.
Does someone could help me on this?
Article Comments
Hi Stephan,
I found the root cause due to I have to redirect the output as ASCII rather than UNICODE. This issue already been fixed .
Thanks
Appreciated
Sep, 2015 - Permalink
So the script runs independently and just writes the content to the status.html file, correct? When I put the finished HTML code into a site and point the HTTP Content sensor to it, it'll work just fine.
Could you possibly be a bit more detailed about the structure of the script/html thingy? :)
Sep, 2015 - Permalink