Grafana alerting Error: tsdb.HandleRequest() - time-series

I am using Grafana version: v6.7.3 (a04ef6cefc)
After creating a new alert in my widget dashboard, I am seeing the following error:
Error: tsdb.HandleRequest() error bad_response: readObjectStart: expect { or n, but found <, error found in #5 byte of ...|
The error looks to be triggering similar to an alert. Has anyone else encountered something similar to this?
the Error JSON output
{
"firing": true,
"state": "pending",
"conditionEvals": " = true",
"timeMs": "24.602ms",
"error": "tsdb.HandleRequest() error bad_response: readObjectStart: expect { or n, but found <, error found in #5 byte of ...| <!DOCTYPE h|..., bigger context ...| <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transi|...",
"logs": [
{
"message": "Condition[0]: Query",
"data": {
"from": 1637767915735,
"queries": [
{
"refId": "A",
"model": {
"expr": "sum by (code, app_kubernetes_io_instance)(rate(nginx_server_requests{app_kubernetes_io_instance=~\"vue-frontend\",code=~\"4..\"}[1m]))",
"format": "time_series",
"hide": false,
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{code}} on {{app_kubernetes_io_instance}}",
"refId": "A"
},
"datasource": {
"id": 14,
"name": "somesomain.com"
},
"maxDataPoints": 0,
"intervalMs": 0
}
],
"to": 1637768215735
}
}
]
}

Related

Google Document AI custom processor training failed for unknown reason

After annotating my data set and training a custom processor on Google Document AI, I get the following error message after 40 mins:
{
"name": "projects/500809854407/locations/eu/operations/10980743890623751388",
"done": true,
"result": "error",
"response": {},
"metadata": {
"#type": "type.googleapis.com/google.cloud.documentai.uiv1beta3.TrainProcessorVersionMetadata",
"commonMetadata": {
"state": "FAILED",
"createTime": "2023-01-13T15:11:36.505757Z",
"updateTime": "2023-01-13T15:50:10.343765Z",
"resource": "projects/500809854407/locations/eu/processors/b94da5023b6cb35d/processorVersions/98637063da2b64d4"
},
"trainingDatasetValidation": {},
"testDatasetValidation": {}
},
"error": {
"code": 13,
"message": "Internal error encountered.",
"details": []
}
}
Any idea what could be the problem?

Filter empty object in odata

There is an oData service i want to call. We have an model that has an field Parent. The service tells me that the parent is an object with an iv that is an string inside. So we get the following model from the oData service:
{
"total": 0,
"items": [
{
"id": "string",
"data": {
"Title": {
"en": "string",
"nl": "string"
},
"Parent": {
"iv": [
"string"
]
},
}
]
}
Now when we get data back it looks like this:
{
"total": 2,
"items": [
{
"id": "6204c07d-1aef-4bd2-9646-e3ca36c63784",
"data": {
"Title": {
"en": "Test 1",
"nl": "Test 1"
},
"Parent": {
"iv": []
},
},
},
{
"id": "bfd1b084-4166-4fec-9032-08047c8313d2",
"data": {
"Title": {
"en": "Test 2",
"nl": "Test 2"
},
"Parent": {
"iv": [
"6204c07d-1aef-4bd2-9646-e3ca36c63784"
]
},
},
},
}
Now i want to filter on all the items where parent is [] (so no parent selected). I've tried the following filters but all without success
data/Parent/iv eq [] | Returns 0 results
data/Parent/iv eq null | Returns 0 results
data/Parent eq null | Returns 0 results
length(data/Parent/iv) eq 0 | OData operation is not supported
not data/Parent/any() | Any/All may only be used following a collection.
not data/Parent/any() | Any/All may only be used following a collection.
data/Parent/iv/$count eq 0 | Server error
Found that for this case the following works:
empty(data/Parent/iv)

Post HTTP Requests cURL with EmailOctopus

As a marketer, I'm going through the EmailOctopus (email service provider) API docs (https://emailoctopus.com/api-documentation) and have trouble combining multiple requests in one.
Goal: Get all campaign reports for all campaigns exported to a CSV.
Step 1: Get all campaign IDs. This works.
curl GET https://emailoctopus.com/api/1.5/campaigns?api_key={APIKEY}
Step 2: Get the report for a single campaign. This works too.
curl GET https://emailoctopus.com/api/1.5/campaigns/{CAMPAIGNID}/reports/summary?api_key={APIKEY}
Step 3: Combine step 1 and 2 and export to a CSV. No idea how to proceed here.
Output step 1:
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"status": "SENT",
"name": "Foo",
"subject": "Bar",
"to": [
"00000000-0000-0000-0000-000000000001",
"00000000-0000-0000-0000-000000000002"
],
"from": {
"name": "John Doe",
"email_address": "john.doe#gmail.com"
},
"content": {
"html": "<html>Foo Bar<html>",
"plain_text": "Foo Bar"
},
"created_at": "2019-10-30T13:46:46+00:00",
"sent_at": "2019-10-31T13:46:46+00:00"
},
{
"id": "00000000-0000-0000-0000-000000000003",
"status": "SENT",
"name": "Bar",
"subject": "Foo",
"to": [
"00000000-0000-0000-0000-000000000004",
"00000000-0000-0000-0000-000000000005"
],
"from": {
"name": "Jane Doe",
"email_address": "jane.doe#gmail.com"
},
"content": {
"html": "<html>Bar Foo<html>",
"plain_text": "Bar Foo"
},
"created_at": "2019-11-01T13:46:46+00:00",
"sent_at": "2019-11-02T13:46:46+00:00"
}
],
"paging": {
"next": null,
"previous": null
}
}
Output step 2:
{
"id": "00000000-0000-0000-0000-000000000000",
"sent": 200,
"bounced": {
"soft": 10,
"hard": 5
},
"opened": {
"total": 110,
"unique": 85
},
"clicked": {
"total": 70,
"unique": 65
},
"complained": 50,
"unsubscribed": 25
}
How can I get all campaign reports in one go and exported to a CSV?
May be this URLs be helpful
Merging two json in PHP
How to export to csv file a PHP Array with a button?
https://www.kodingmadesimple.com/2016/12/convert-json-to-csv-php.html

found ' Failed: Implicit Wait timed out after 30000ms' this error after play the testcase

My problem is that my code found a timed out error. This is my code:
{
"id": "7cff5f0f-49a0-4099-a4b4-6e50d5f38a1c",
"comment": "",
"command": "click",
"target": "name=OrderSearch[order_id]",
"targets": [
["name=OrderSearch[order_id]", "name"],
["css=input[name=\"OrderSearch[order_id]\"]", "css"],
["css=td:nth-child(1) > .form-control", "css:finder"],
["xpath=//input[#name='OrderSearch[order_id]']", "xpath:attributes"],
["xpath=//tr[#id='w0-filters']/td/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": ""
}

"Overlaps are not supported within TimeSlots" error in Outlook Calendar REST API

From yesterday I started receiving an error in my service (production environment) when trying to call Outlook Calendar REST API endpoint:
POST https://outlook.office.com/api/v2.0/me/findMeetingTimes
with following request body:
{
"Attendees": [
{
"Type": "optional",
"EmailAddress": {
"Address": "...",
"Name": null
}
},
{
"Type": "required",
"EmailAddress": {
"Address": "...",
"Name": null
}
}
],
"LocationConstraint": {
"IsRequired": true,
"SuggestLocation": false,
"Locations": [
{
"DisplayName": "..."
}
]
},
"TimeConstraint": {
"Timeslots": [
{
"Start": {
"DateTime": "2017-05-05T00:00:00",
"TimeZone": "UTC"
},
"End": {
"DateTime": "2017-05-05T21:59:59",
"TimeZone": "UTC"
}
}
]
},
"MaxCandidates": 1000,
"MeetingDuration": "PT30M",
"IsOrganizerOptional": true }
Here is the response I get:
{
"error": {
"code": "ErrorInternalServerError",
"message": "Invalid value for arg:Overlaps are not supported within TimeSlots, value:
{\"start\":2017-05-04T22:00:00Z,
\"min\":1440}
\r\nParameter name: Overlaps are not supported within TimeSlots"
}
}
Everything was working fine with until yesterday. There were no changes in my service codebase. It seems to be related with some changes in O365 API itself but there are no recent updates in documentation...
Any idea what might be wrong?
UPDATE: Without any modification in the request the server response is now:
{
"error": {
"code": "ErrorInternalServerError",
"message": "Index was outside the bounds of the array."
}
}

Resources