aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py
blob: ef360809830495d44109521ea66c365b57a900e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from promql_api.prom_ql_api import query_m3db
import pprint

LABELS = ['irate(collectd_cpufreq{exported_instance="otconap7",cpufreq="1"}[2m])']

def main():
    list_of_result_sets = query_m3db(LABELS)
    for each_result in list_of_result_sets:
        pprint.pprint(each_result)

if __name__ == "__main__":
     main()