I am trying to plot SQL Agent job run time (duration) and additional metrics in grafana.
Thinking to create 2 variables which should 1st accept - JObName as 1st input and based on the selection step name should be selected in 2nd variable created.
I created first variable as
select name from msdb.dbo.sysjob which gives the list of jobs.
Now how should i create second variable as step name comes from diff dmv as below
select step_name from msdb.dbo.sysjobsteps
In actual they are joined via key on column job_id but i am not sure how to create the dependent variable here.