M14: add n8n execution health telemetry
This commit is contained in:
@@ -54,6 +54,33 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "http://192.168.10.150:1236/api/v1/integrations/n8n/heartbeat",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"sendBody": true,
|
||||
"contentType": "json",
|
||||
"specifyBody": "keypair",
|
||||
"bodyParameters": { "parameters": [
|
||||
{ "name": "workflow_id", "value": "={{ $workflow.id }}" },
|
||||
{ "name": "workflow_name", "value": "={{ $workflow.name }}" },
|
||||
{ "name": "execution_id", "value": "={{ $execution.id }}" },
|
||||
{ "name": "status", "value": "succeeded" }
|
||||
]},
|
||||
"options": { "timeout": 15000 }
|
||||
},
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.4,
|
||||
"position": [1056, -144],
|
||||
"id": "workflow-heartbeat-node",
|
||||
"name": "Report workflow heartbeat",
|
||||
"credentials": { "httpHeaderAuth": { "name": "Fleet Ops Service Token" } },
|
||||
"retryOnFail": true,
|
||||
"maxTries": 3,
|
||||
"waitBetweenTries": 1000
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "const documents = $input.first().json.documents;\nconst results = [];\nfor (const doc of documents) {\n const binary = await this.helpers.prepareBinaryData(Buffer.from(doc.content, 'utf-8'), doc.document_id + '.md', 'text/markdown');\n results.push({json: {id: doc.id, language: doc.language, document_id: doc.document_id, title: doc.title, version: doc.version, content_hash: doc.content_hash}, binary: {file: binary}});\n}\nreturn results;"
|
||||
@@ -229,6 +256,9 @@
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Report sync result to Fleet Ops": {
|
||||
"main": [[{ "node": "Report workflow heartbeat", "type": "main", "index": 0 }]]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
|
||||
Reference in New Issue
Block a user