SIENTIAPDE-1445
Enhance PI Web API integration and update test configurations - Adjusted execution counts in tests.ipynb for better notebook state management. - Introduced a new pi_web_api_query structure in tests.ipynb for improved API configuration. - Updated API class to format timestamps using DATETIME_FORMAT_WITH_TZ. - Refactored PIWebAPIClient to ensure correct web ID retrieval and emit metrics accurately. - Streamlined workflow parameters in pi_web_api_scouter.py for clarity and flexibility.
This commit is contained in:
22
tests.ipynb
22
tests.ipynb
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 1,
|
||||
"id": "9d16b24a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -38,7 +38,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 14,
|
||||
"id": "5e344fb0",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -69,20 +69,26 @@
|
||||
" \"CI-W3W03S1\": {\n",
|
||||
" \"aggr_func\": \"avg\",\n",
|
||||
" \"data_range\": [\n",
|
||||
" -100,\n",
|
||||
" 100\n",
|
||||
" -100000,\n",
|
||||
" 100000\n",
|
||||
" ],\n",
|
||||
" \"webid\": \"F1DP-7fYgsRTtUOa7V9NIwSujATFUAAAUElIQVZDXENJLVczVzAzUzE\"\n",
|
||||
" },\n",
|
||||
" \"CI-W3A05F1\": {\n",
|
||||
" \"aggr_func\": \"lts\",\n",
|
||||
" \"data_range\": [\n",
|
||||
" -100,\n",
|
||||
" 100\n",
|
||||
" -100000,\n",
|
||||
" 100000\n",
|
||||
" ],\n",
|
||||
" \"webid\": \"F1DP-7fYgsRTtUOa7V9NIwSujAkVMAAAUElIQVZDXENJLVczQTA1RjE\"\n",
|
||||
" }\n",
|
||||
" },\n",
|
||||
" \"pi_web_api_query\": {\n",
|
||||
" \"endpoint\": \"/streamsets/recorded\",\n",
|
||||
" \"period\": \"*-1d\",\n",
|
||||
" \"max_count\": 1,\n",
|
||||
" \"api_timeout\": 5\n",
|
||||
" },\n",
|
||||
" \"offset\": \"0m\",\n",
|
||||
" \"retention_time\": 3600,\n",
|
||||
" \"schedule_name\": \"pi-web-api-scouter-test\",\n",
|
||||
@@ -97,7 +103,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 6,
|
||||
"id": "9350bff3",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -112,7 +118,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 18,
|
||||
"id": "45712d7a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
|
||||
Reference in New Issue
Block a user