robusta icon indicating copy to clipboard operation
robusta copied to clipboard

Prometheus manual trigger

Open Avi-Robusta opened this issue 3 years ago • 0 comments

Added trigger to run prometheus queries via robusta.

This is an example dataset for ram usage of a pod Screen Shot 2022-09-18 at 11 03 29

for the manual trigger

curl -X POST http://localhost:5000/api/trigger -H 'Content-Type: application/json' -d '{"action_name": "prometheus_enricher", "action_params": {"promql_query": "sum(container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", pod=~"tetris-79c4c6958b-hwmlk", container!="", image!=""})", "end_time": "2022-09-17 09:40:59", "starts_at": "2022-09-14 09:40:59", "metadata_json_str": "{"units":"bytes","query_type":"resource-memory","object_queried":{"type":"Pod","name":"tetris-79c4c6958b-hwmlk"}}"}}'

Avi-Robusta avatar Sep 18 '22 08:09 Avi-Robusta