diff options
author | 2019-05-30 01:28:55 +0000 | |
---|---|---|
committer | 2019-05-30 01:28:55 +0000 | |
commit | f3c04d861a585c9ae9138ea1e93aae24deeb46bf (patch) | |
tree | 21004ad707b73e4f0040cb7b41f4cf8862be47c2 /vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py | |
parent | 02331f878f0bdf256f5b41f2f3433f2ff1db6bc4 (diff) |
PromQL api for query
Initial commit for promQL query api and sample app for using the api
Change-Id: Id9c5d95f621edbb14b2eba7493c968c138d2d02a
Issue-ID: ONAPARC-452
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Diffstat (limited to 'vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py')
-rw-r--r-- | vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py b/vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py new file mode 100644 index 00000000..ef360809 --- /dev/null +++ b/vnfs/DAaaS/applications/m3db_promql/sample_promql_query.py @@ -0,0 +1,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()
\ No newline at end of file |