I have a custom XML exe/script sensor set up, the .exe is perl.exe and I pass the script name as the parameter.
If I run the script from the cmd prompt, it works great, but as soon as I run it from within PRTG as a custom sensor, it simply reports "no data". If I replace the pipe with static data it works fine, so I suspect there's some subtle point I'm missing about opening this pipe when PRTG runs the script vs when I run it at the cmd line. What that difference is however I'm at a loss...
Here's the line in question:
open (READ_PIPE, "ssh -q -l Administrator -i \"C:\\Documents and Settings\\Administrator\\.ssh\\id_rsa\" tstevens-fp4b \"show interface e1/1 | xml | no-more\" |") or die $!;
This opens an ssh to the device using a preshared key, executes a command, and that's piped to a filehandle I read to gather some stats.
As mentioned, this works flawlessly from the cmd prompt but when I point to the same script in PRTG I get nothing!! It's driving me crazy I've tried about 1000 variations of the above trying to get this working with no luck.
Any clues appreciated, thanks, Tim