I've been trying to set up a PRTG sensor which will allow me to monitor SQL agent jobs I've got the SQL script fine and I'm running this using the Microsoft SQL V2 sensor which is giving me the expected output, unfortunately PRTG seems to not expect a string which, So I've adjusted the output to an integer which doesn't seem to of helped.

My question is how do I get PRTG to interpret the output into something measurable and allow me to, using the output, recognize it as an alert upon job failure?


Article Comments

Hi there,

Please execute the query manually and post the output. Please also navigate in the according probe or core server to "C:\Program Files (x86)\PRTG Network Monitor\Sensor System\" and execute the "SQLv2.exe". There you enter all details including the query and check the output that the sensor generates, this is usually the output PRTG sees.

Best regards.


Jun, 2017 - Permalink

Hi I am not in work to be able to do this until tomorrow, but PRTG is receiving the output from SQL, so I don't believe the problem is the SQL script and the out can be changed and seen in PRTG, the question is how do I configure the sensor to use the results from the script to give warnings / alerts? I can supply what you've asked for but I think the problem relates to to PRTG sensor or more my lack of knowledge on how to configure the sensor to produce an alert depending on result


Jun, 2017 - Permalink

Hi there,

You are right PRTG does not accept Strings as values as you can't process and graph Strings. :)
Therefore you have to convert your strings to numbers which then PRTG can process and monitor. You can then activate the "Process data table" option. There you can set the unit for the first channel which would be "Value Lookup". How you can define them is described on the following site:
https://www.paessler.com/manuals/prtg/define_lookups

You can also have a look at the following page which describes this pretty extensively:
https://helpdesk.paessler.com/en/support/solutions/articles/76000063105-how-can-i-monitor-strings-from-an-sql-database-and-show-a-sensor-status-depending-on-it


Best regards.


Jun, 2017 - Permalink

OK have found what the problem was and it was that it was passing 0 or 1 as a string which caused the issue (passing integers as strings) I've corrected this and all is working fine, thanks for your assistance even with my misdirection it helped me figure out what was happening.


Jun, 2017 - Permalink