Hi.
I have simple SQL query:
USE BEDB SELECT TOP 1 * FROM dbo.JobHistorySummary WHERE JobName = 'dbc02 BPM-Incremental' and IsJobActive not IN ('1') ORDER BY EndTime DESC
I need to change the name of the work (JobName) for each sensor.
If I understand correctly I need to write such a request:
USE BEDB SELECT TOP 1 * FROM dbo.JobHistorySummary WHERE JobName = '@prtg' and IsJobActive not IN ('1') ORDER BY EndTime DESC
And when you create a sensor in the "Input Parameters" transfer "dbc02 BPM-Inkremental" to the job name is substituted into the query.
With these settings in the logs in the variable @prtg not contain the value "Input Parameters"
Log:
24.10.16 10:55:58: Running Command 'USE BEDB SELECT TOP 1 * FROM dbo.JobHistorySummary WHERE JobName = @prtg and IsJobActive not IN ('1') ORDER BY EndTime DESC'
Add comment