I am trying to monitor the number of files in a directory, I am able to use the following command at the shell to get the results.

find /var/qmail/queue/mess/ -type f -print | wc -l

I would like to use PRTG to monitor this but when I put it into a script it comes back with the error message below, although it does show the correct number in there but does not work correctly. I read through the API document and that it needs to be formatted correctly but due to my lack of skills in the development line of work I am looking for some help.

Response not wellformed: "2 " (code: PE132)

Would anyone be able to help me out with a script I could use to monitor the output?


Article Comments

I'm like you, so as not resolve


Jun, 2014 - Permalink

Dear user

The return message must be in the format value:message. For example, return "2:OK" (without the quotation marks) to return value of 2 and 'OK' as status message.


Jun, 2014 - Permalink