153 lines
3.0 KiB
JSON
153 lines
3.0 KiB
JSON
{
|
|
"name": "MQL Settings Monitor - SSH Localhost",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"rule": {
|
|
"interval": [
|
|
{
|
|
"field": "hours",
|
|
"hoursInterval": 6
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "Schedule - Every 6 Hours",
|
|
"type": "n8n-nodes-base.scheduleTrigger",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
250,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"authentication": "password",
|
|
"host": "127.0.0.1",
|
|
"port": 2222,
|
|
"username": "garfield",
|
|
"password": "=onelove01",
|
|
"command": "/home/garfield/mql-trading-bots/scripts/validate-settings.sh"
|
|
},
|
|
"name": "SSH - Run Validation",
|
|
"type": "n8n-nodes-base.ssh",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
450,
|
|
300
|
|
],
|
|
"credentials": {
|
|
"sshPassword": {
|
|
"id": "local-ssh-creds",
|
|
"name": "Local SSH Creds"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"conditions": {
|
|
"number": [
|
|
{
|
|
"value1": "={{ $json.code }}",
|
|
"operation": "notEqual",
|
|
"value2": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "Has Issues?",
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
650,
|
|
300
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"chatId": "={{ $env.TELEGRAM_CHAT_ID }}",
|
|
"text": "=🚨 <b>MQL Settings Issues Detected</b>\n\n<pre>{{ $json.stdout }}</pre>\n\n⏰ {{ new Date().toLocaleString() }}"
|
|
},
|
|
"name": "Telegram Alert",
|
|
"type": "n8n-nodes-base.telegram",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
850,
|
|
200
|
|
],
|
|
"credentials": {
|
|
"telegramApi": {
|
|
"id": "telegram-bot-api",
|
|
"name": "Telegram Bot API"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {},
|
|
"name": "Success - No Alert",
|
|
"type": "n8n-nodes-base.noOp",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
850,
|
|
400
|
|
]
|
|
}
|
|
],
|
|
"connections": {
|
|
"Schedule - Every 6 Hours": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "SSH - Run Validation",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"SSH - Run Validation": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Has Issues?",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Has Issues?": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Telegram Alert",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"node": "Success - No Alert",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"settings": {
|
|
"executionOrder": "v1"
|
|
},
|
|
"staticData": null,
|
|
"tags": [
|
|
{
|
|
"name": "trading",
|
|
"id": "trading-tag"
|
|
},
|
|
{
|
|
"name": "mql5",
|
|
"id": "mql5-tag"
|
|
}
|
|
]
|
|
}
|