Sunteți pe pagina 1din 28

Copyright

 ©  2013  Splunk  Inc.  

How  to  Use  Dynamic  Drilldown  


Lisa  Guinn  
Sr  Instructor,  Splunk  
#splunkconf  
Legal  NoGces  
During  the  course  of  this  presentaGon,  we  may  make  forward-­‐looking  statements  regarding  future  events  or  the  
expected  performance  of  the  company.  We  cauGon  you  that  such  statements  reflect  our  current  
expectaGons  and  esGmates  based  on  factors  currently  known  to  us  and  that  actual  events  or  results  could  differ  
materially.  For  important  factors  that  may  cause  actual  results  to  differ  from  those  contained  in  our  forward-­‐
looking  statements,  please  review  our  filings  with  the  SEC.    The  forward-­‐looking  statements  made  in  this  
presentaGon  are  being  made  as  of  the  Gme  and  date  of  its  live  presentaGon.    If  reviewed  aSer  its  live  
presentaGon,  this  presentaGon  may  not  contain  current  or  accurate  informaGon.      We  do  not  assume  any  
obligaGon  to  update  any  forward-­‐looking  statements  we  may  make.    In  addiGon,  any  informaGon  about  
our  roadmap  outlines  our  general  product  direcGon  and  is  subject  to  change  at  any  Gme  without  noGce.    It  is  for  
informaGonal  purposes  only  and  shall  not,  be  incorporated  into  any  contract  or  other  commitment.    Splunk  
undertakes  no  obligaGon  either  to  develop  the  features  or  funcGonality  described  or  to  include  any  such  feature  or  
funcGonality  in  a  future  release.  
 
Splunk,  Splunk>,  Splunk  Storm,  Listen  to  Your  Data,  SPL  and  The  Engine  for  Machine  Data  are  trademarks  and  registered  trademarks  of  
Splunk  Inc.  in  the  United  States  and  other  countries.  All  other  brand  names,  product  names,  or  trademarks  belong  to  their  respecCve  
owners.    
©2013  Splunk  Inc.  All  rights  reserved.  

2  
About  Me  
!  Splunk  Senior  Instructor  since  2009  
!  Frequent  contributor  to  Splunk  Answers  
!  Love  Splunk  search  language  puzzles  

3  
Agenda  
Goal:  Understand  and  walk-­‐through  all  the  drill-­‐down  
opGons  for  simple  XML  dashboards  
!   Default  Drilldown  OpGons  
–  Things  that  can  be  set  in  the  GUI  
!  Drilldown  CustomizaGon  for  Forms  
–  Chart  to  form  
–  Table  row  to  form  
–  Table  field  to  form  
!  Other  Drilldowns  
–  Drilldown  from  a  single-­‐value  dashboard  panel  
–  Linking  to  an  external  site  
 

4  
Default  Drilldown  OpGons  
What  Happens  When  You  Click  in  a  Report?  

*  
!  Clicking  an  object  redirects  
you  to  search  view  
!  Ctrl-­‐clicking  an  object  opens    
search  in  new  window  
6  
Dashboard  Charts  Have  OpGons  

!  Yes  means  the  chart  drilldown  in  the  dashboard  will  work  just  as  it  did  in  the  report  

7  
Dashboard  Tables  Have  More  OpGons  

!  Row  –  uses  the  first  column  value    


from  the  row  you  click  
status="400"  
!  Cell  –  uses  the  cell  value  
status="404"  host="www2"  

8  
Custom  Drilldowns:  
Drilldown  to  a  Form  
Drilldown  to  a  Form  
!  Three  types  
–  Chart  to  form  
–  Table  row  to  form  
–  Table  field  to  form  
!  To  set  this  up  
–  Create  a  dashboard  
–  Create  a  form  that  will  execute  the  custom  search  
–  Edit  the  simple  XML  in  the  dashboard  to  create  the  custom  drilldown  

  10  
Our  Dashboard  for  Custom  Drilldowns  

11  
Where  Should  the  Drilldown  Go?  
This  part  of  the  URL  will  be  used  
as  the  link  in  the  drilldown  

When  the  user  clicks  in  the  dashboard,  this  form  


should  open  &  run  with  the  fields  filled-­‐in  

12  
XML  for  Form  

Input  tokens  

A  drilldown  needs  
-­‐  The  link  to  the  form  
-­‐  The  names  of  the  input  tokens  
 
NoGce  that  defaults  are  set  for  all  inputs  

13  
Table  Row  to  Form  
!  Passes  field  value  from  a  row  click  to  a  token  in  a  form  view  
!  It  does  not  majer  where  the  user  clicks  in  the  row  
!  Here  is  the  dasboard  XML  

The  path  to  the  form   Token  name  in   The  field  from  the  
the  form   dashboard  panel  
$row.fieldname$  
14  
Table  Row  to  Form  

*  

15  
Table  Fields  to  Form  
!  Passes  field  value  from  a  field  click  to  a  token  in  a  form  view  
!  The  field  is  idenGfed  as  a  parameter  on  the  link  tag  
!  Here  is  the  dashboard  code  

The  links  could  go  to  


enGrely  different  forms  
MulGple  links  can  exist  

16  
Table  Fields  to  Form  

*  
Only  one  field  value  is  
passed  here  –  either  
status  or  host  

17  
Passing  MulGple  Values  to  the  Form  
!  You  can  fill  in  both  the  hjp  status  code  and  the  host  name!  

Combine  the  parameters  with  an  &  

Wrapping  the  link  with  CDATA  


prevents  the  XML  from  being  
confused  by  the  &  

18  
Chart  Drilldown  to  Form  
!  Passes  a  field  value  from  a  chart  click  to  a  form  view  

click.value  –  the  value  on  the  X-­‐axis  


click.value2  –  the  value  on  the  Y-­‐axis  
 
(Note:  X  and  Y  are  reversed  on  bar  charts)  

19  
Chart  Drilldown  to  Form  

*  

Clicking  on  any  segment  of  the  


column  will  fill  in  the  same  HTTP  
status  code  

20  
Other  Drilldowns  
Other  Drilldowns  
!  Drilldown  to  a  URL  
!  Drilldown  from  a  Single  Value  Panel  

22  
Drilldown  to  a  URL  
!  Instead  of  a  link  to  a  Splunk  form,  you  can  link  to  an  external  URL  

You  can  use  any  of  the  usual  variables:  


   click.value  
   row.fieldname  
   etc.  

23  
Single  Value  Panel  Drilldown  
There  is  no  default  drilldown  for  the  
Single  Value  panel  –  it  must  be  added  
*   to  the  simple  XML  

The  name  of  this  dashboard  is  hjp_details  

24  
XML  for  Single  Value  Panel  

!  All  three  opGons  are  required  (even  if  not  used)  


–  linkFields  –  which  part  of  the  single  value  panel  to  turn  into  a  hyperlink  
ê  Result,  beforeLabel,  aSerLabel  
–  linkSearch  
ê  A  valid  complete  search  query  
ê  Use  *  for  the  linkSearch  if  you  are  launching  a  dashboard    
–  linkView  
ê  Which  view  (dashboard  or  form)  to  use  to  run  the  search  
ê  Use  flash'meline  for  the  default  search  view  
 
25  
Conclusion  
!  There  are  many  ways  to  manage  drilldown  
–  We  didn't  even  cover  all  of  them!  
!  None  is  a  valid  opGon  for  drilldown,  too  
!  More  info  
–  Splunk  Data  VisualizaGons  Manual  
ê  Dynamic  Drilldown  in  Dashboards  and  Forms  
ê  Panel  Reference  for  Simplified  XML:  Single  value  panel  
–  Splunk  Dashboard  VisualizaGons  App    
ê  Download  free  from  Splunk  Apps  
 

 
26  
Next  Steps  
1   Download  the  .conf2013  Mobile  App  
If  not  iPhone,  iPad  or  Android,  use  the  Web  App  
 
 
2   Take  the  survey  &  WIN  A  PASS  FOR  .CONF2014…  Or  one  of  these  bags!  
 
Go  to  “End-­‐to-­‐End  System  Monitoring  from  
3   Scratch”  
Nolita  1,  Level  4  
Today,  3-­‐4pm  

27  
THANK  YOU  

S-ar putea să vă placă și