Hi Dariusz,
Thanks for the reply, as per your request, please see below for the requested JSON response.
[
{
"dag_id": "XXXXXXXX",
"dag_run_url": "/admin/airflow/graph?dag_id=XXXXXXX",
"execution_date": "2019-10-02T01:11:38.874792+00:00",
"id": 3884,
"run_id": "trig__2019-10-02T01:11:22.551921+00:00",
"start_date": "2019-10-02T01:11:38.920380+00:00",
"state": "failed"
},
{
"dag_id": "XXXXXXXX",
"dag_run_url": "/admin/airflow/graph?dag_id=XXXXXXX",
"execution_date": "2019-10-02T23:01:37.759540+00:00",
"id": 3928,
"run_id": "trig__2019-10-02T23:01:24.147478+00:00",
"start_date": "2019-10-02T23:01:37.791189+00:00",
"state": "success"
},
{
"dag_id": "XXXXXXXX",
"dag_run_url": "/admin/airflow/graph?dag_id=XXXXXXX",
"execution_date": "2019-10-04T01:01:30.553088+00:00",
"id": 3968,
"run_id": "trig__2019-10-04T01:01:16.519458+00:00",
"start_date": "2019-10-04T01:01:30.585654+00:00",
"state": "success"
},
{
"dag_id": "XXXXXXXX",
"dag_run_url": "/admin/airflow/graph?dag_id=XXXXXXX",
"execution_date": "2019-10-08T01:01:33.733049+00:00",
"id": 4106,
"run_id": "trig__2019-10-08T01:01:23.879060+00:00",
"start_date": "2019-10-08T01:01:33.764672+00:00",
"state": "success"
},
{
"dag_id": "XXXXXXXX",
"dag_run_url": "/admin/airflow/graph?dag_id=XXXXXXX",
"execution_date": "2019-10-08T01:01:35.518944+00:00",
"id": 4107,
"run_id": "trig__2019-10-08T01:01:23.733985+00:00",
"start_date": "2019-10-08T01:01:35.550179+00:00",
"state": "failed"
}
]
As you can see, I am interested in only the last array in the extract and I would like to convert the "state" attribute to an integer. Although my example only has defined 1 (Success) I intend to populate this with 2 more attributes in which I want to revert back to text using lookups within the PRTG Portal.
Hope this help you to help me! Any assistance is appreciated.
Thanks,
JT
Add comment