오픈소스/Kibana

time series 그래프 생성

세모데 2017. 9. 13. 10:26

1. 예제

    

    1) 그래프에 1가지 항목만 표시

    .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct')

    index : 사용할 인덱스명, timefield : time 설정,  metric : 보고 싶은 항목 정의


    2) 그래프에 2가지 항목 표시

    .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct'), .es(offset=-1h,index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct')


   3) 그래프 항목에 라벨을 같이 표시

    .es(offset=-1h,index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('last hour'), .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current hour')