We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For the same check, the python library does not return the complete threshold object. See the responses captured below.
Steps to reproduce:
from influxdb_client import ChecksService ChecksService().get_checks_id(check_id="07d91e850309c000")
Expected behavior:
Response captured from the developer console
{ "checks":[ { "id":"07d91e850309c000", "name":"threshold check", "ownerID":"x", "orgID":"x", "query":{ "text":"from(bucket: \"things\")\n |\u003e range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |\u003e filter(fn: (r) =\u003e r[\"_measurement\"] == \"streams\")\n |\u003e filter(fn: (r) =\u003e r[\"_field\"] == \"v\")\n |\u003e filter(fn: (r) =\u003e r[\"identifier\"] == \"ain_p1\")\n |\u003e filter(fn: (r) =\u003e r[\"mac\"] == \"b827ebc5308a\")\n |\u003e aggregateWindow(every: 1m, fn: last, createEmpty: false)\n |\u003e yield(name: \"last\")", "editMode":"builder", "name":"", "builderConfig":{ "buckets":[ "things" ], "tags":[ { "key":"_measurement", "values":[ "streams" ], "aggregateFunctionType":"filter" }, { "key":"_field", "values":[ "v" ], "aggregateFunctionType":"filter" }, { "key":"identifier", "values":[ "ain_p1" ], "aggregateFunctionType":"filter" }, { "key":"mac", "values":[ "b827ebc5308a" ], "aggregateFunctionType":"filter" }, { "key":"product", "values":[ ], "aggregateFunctionType":"filter" } ], "functions":[ { "name":"last" } ], "aggregateWindow":{ "period":"1m", "fillValues":false } } }, "statusMessageTemplate":"Check: ${ r._check_name } is: ${ r._level }", "every":"1m", "offset":"0s", "tags":[ ], "createdAt":"2021-07-17T12:41:48.3001607Z", "updatedAt":"2021-07-17T12:41:48.3001607Z", "thresholds":[ { "allValues":false, "level":"CRIT", "value":8.223, "type":"greater" } ], "type":"threshold", "labels":[ ], "links":{ "self":"/api/v2/checks/07d91e850309c000", "labels":"/api/v2/checks/07d91e850309c000/labels", "members":"/api/v2/checks/07d91e850309c000/members", "owners":"/api/v2/checks/07d91e850309c000/owners", "query":"/api/v2/checks/07d91e850309c000/query" }, "status":"active", "latestCompleted":"2021-07-17T12:42:00Z", "latestScheduled":"2021-07-17T12:42:00Z", "lastRunStatus":"success" } ], "links":{ "self":"/api/v2/checks?descending=false\u0026limit=100\u0026offset=0\u0026orgID=c144bc298a525db6" } }
Actual behavior: Response captured via python library
{ "type":"threshold", "thresholds":[ { "level":"CRIT", "all_values":false } ], "every":"1m", "offset":"0s", "tags":[ ], "status_message_template":"Check: ${ r._check_name } is: ${ r._level }", "id":"07d91e850309c000", "name":"threshold check", "org_id":"x", "task_id":"None", "owner_id":"x", "created_at":datetime.datetime(2021, 7, 17, 12, 41, 48, 300160, "tzinfo=tzlocal())", "updated_at":datetime.datetime(2021, 7, 17, 12, 41, 48, 300160, "tzinfo=tzlocal())", "query":{ "text":"from(bucket: \"things\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"streams\")\n |> filter(fn: (r) => r[\"_field\"] == \"v\")\n |> filter(fn: (r) => r[\"identifier\"] == \"ain_p1\")\n |> filter(fn: (r) => r[\"mac\"] == \"b827ebc5308a\")\n |> aggregateWindow(every: 1m, fn: last, createEmpty: false)\n |> yield(name: \"last\")", "edit_mode":"builder", "name":"", "builder_config":{ "buckets":[ "things" ], "tags":[ { "key":"_measurement", "values":[ "streams" ], "aggregate_function_type":"filter" }, { "key":"_field", "values":[ "v" ], "aggregate_function_type":"filter" }, { "key":"identifier", "values":[ "ain_p1" ], "aggregate_function_type":"filter" }, { "key":"mac", "values":[ "b827ebc5308a" ], "aggregate_function_type":"filter" }, { "key":"product", "values":[ ], "aggregate_function_type":"filter" } ], "functions":[ { "name":"last" } ], "aggregate_window":{ "period":"1m", "fill_values":false } } }, "status":"active", "description":"None", "latest_completed":datetime.datetime(2021, 7, 17, 12, 47, "tzinfo=tzlocal())", "last_run_status":"success", "last_run_error":"None", "labels":[ ], "links":{ "_self":"/api/v2/checks/07d91e850309c000", "labels":"/api/v2/checks/07d91e850309c000/labels", "members":"/api/v2/checks/07d91e850309c000/members", "owners":"/api/v2/checks/07d91e850309c000/owners", "query":"/api/v2/checks/07d91e850309c000/query" } }
Specifications:
The text was updated successfully, but these errors were encountered:
@abhi1693 thanks for using our client, we will take a look
Sorry, something went wrong.
Threshold
DashboardService
Successfully merging a pull request may close this issue.
For the same check, the python library does not return the complete threshold object. See the responses captured below.
Steps to reproduce:
Expected behavior:
Response captured from the developer console
Actual behavior:
Response captured via python library
Specifications:
The text was updated successfully, but these errors were encountered: