DX Unified Infrastructure Management

  • 1.  Dashboard - Chart with parameters from Selector

    Posted Aug 09, 2017 12:45 PM

    Hello,

     

    I define new selector with 2 context, each one of them is an SQL query.

    The first one pull list of servers and the second pull from the server list of metrics.

     

    Now, i create new Chart which working with SQL query based on the 2 parameters from the Selector which does not works.

     

    When i replace one of the parameters by any string the query return valid result and i can see a new graph, but when there are 2 parameters Query test not return any result.

     

    Any idea how to resolve it ?



  • 2.  Re: Dashboard - Chart with parameters from Selector

    Posted Aug 09, 2017 12:54 PM

    Hello,

       Could you post your query?



  • 3.  Re: Dashboard - Chart with parameters from Selector

    Posted Aug 10, 2017 03:19 AM

    Hi,

     

    The 2 parameters are :

    '${host}'

    and

    '${platform}'

     

    if i will replace '${platform}' with and string the query will return result.

    ( both selector parameters are not empty ) 

     

    The query is : 

    select qosdata.samplevlaue, qosdata.samplevalue, ci.ci_name

    from S_QOS_DEFINITION def, S_QOS_DATA qos, CM_CONFIGURATION_ITEM_METRIC, metric, CM_CONFIGURATION_ITEM ci, RN_QOS_DATA_0003 qosdata

    where def.name like 'QOS_TEMP1' and def.qos_def_id = qos.qos_def_id

    and metric.ci_metric_id = qos.ci_metric_id and ci.ci_id = metric.ci_id

    and qosdata.table_id = qos.table_id and qos.source = '${host}'

    and ci.ci_name = '${platform}'

    and qosdata.sampletime > DATEADD(DAY,-1.GETDATE())

    and qosdata.table_id =  

             (select top 1 table_id from RN_QOS_DATA_0003 

                where sampletime = 

                               ( select max(sampletime) from RN_QOS_DATA_0003 where qos.table_id = table_id) 

                order by samplevalue desc )

    order by 1



  • 4.  Re: Dashboard - Chart with parameters from Selector

    Posted Aug 10, 2017 09:53 AM

    How do you provide data to your context selector? and have you already tested the query by replacing the parameter by a valid data on both where's ( qos.source = 'HOST_A' and ci.ci_name = 'Host_name' )?



  • 5.  Re: Dashboard - Chart with parameters from Selector

    Posted Aug 10, 2017 04:12 PM

    Can you post the 2 SQL queries you are using in your context selector? Does the value of the 1st Query feed into the 2nd Query so that you are only pulling metrics for that server? 

     

    Also I am a little curious about how you have your query structured. If you are pulling server metrics I would leverage s_qos_data and link table_id to a view.



  • 6.  Re: Dashboard - Chart with parameters from Selector
    Best Answer

    Posted Aug 13, 2017 05:27 AM

    Thanks,

    Problem resolved.

    I run each query ( One by One) and check the data that i pass, there was an error with one of the column that i choose which return incorrect data for the next query.