Snapshot API VPS Hostinger

Experte

Dies ist ein DevOps-Bereich Automatisierungsworkflow mit 20 Nodes. Hauptsächlich werden Set, Wait, Filter, SplitOut, ManualTrigger und andere Nodes verwendet. Hostinger tägliche VPS-Snapshots und Server-Metriken

Voraussetzungen
  • Keine besonderen Voraussetzungen, sofort nach Import nutzbar

Kategorie

Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "veLZQlpr9v5pEgDx",
  "meta": {
    "instanceId": "4d636d76f504736fe1411740aa5378f35110bd722b6afb8e0cedb47992a97d30",
    "templateCredsSetupCompleted": true
  },
  "name": "Snapshot API VPS Hostinger",
  "tags": [
    {
      "id": "JCeTWzAG1RlEvpld",
      "name": "Hostinger",
      "createdAt": "2025-04-30T02:53:12.363Z",
      "updatedAt": "2025-04-30T02:53:12.363Z"
    }
  ],
  "nodes": [
    {
      "id": "66922063-7f2a-46a3-9618-abae57e1ee8c",
      "name": "Bei Klick auf 'Workflow testen'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -100,
        500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "da6b9112-0bb3-4ac3-94ee-e067545568dc",
      "name": "Aufteilen",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        500,
        360
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "response"
      },
      "typeVersion": 1
    },
    {
      "id": "827df7d7-19ba-40b8-9e74-9c0c09b7bf88",
      "name": "Notizzettel6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -480
      ],
      "parameters": {
        "color": 4,
        "width": 609,
        "height": 496,
        "content": "## Hostinger Snapshot with VPS Metrics\nAutomate the creation of snapshots of all your Hostinger VPS, receive success or failure alerts via WhatsApp, use in n8n self-hosting.\n\n### Prerequisites (Community Nodes):\nn8n-nodes-hostinger-api\nn8n-nodes-evolution-api (you can use another notification method, but copy first content message model)\n\n### Setup:\n1 - Install Community Nodes\n2 - Create Hostinger API Key: https://hpanel.hostinger.com/profile/api\n3 - Create credential in first node and set in next nodes;\n4 - Configure notifications Evolution API (WhatsApp) or other means;\n\nNote: Hostinger allows one snapshot per VPS and the previous one will always be replaced.\n\nWorkflow by [Leandro Melo]\nbuy me a coffe!☕😀\nPaypal/Pix: contato@sistemanaweb.com\n"
      },
      "typeVersion": 1
    },
    {
      "id": "308532f7-edb5-48cf-bc52-e4af021c31b5",
      "name": "Über Elemente iterieren",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1280,
        360
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "ab42fce7-ca08-41f8-be53-f1ae3ca085e9",
      "name": "2 Sekunden warten",
      "type": "n8n-nodes-base.wait",
      "position": [
        2340,
        360
      ],
      "webhookId": "51576f9f-ca59-499e-a510-23a568d7964d",
      "parameters": {
        "amount": 2
      },
      "typeVersion": 1.1
    },
    {
      "id": "fc54f299-b001-4171-9433-6cf4c5d36814",
      "name": "Täglich 4:00 Uhr",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -100,
        260
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 4
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6dbcc6a5-07a2-42d4-a41d-e5a81c2247a2",
      "name": "Hostinger API VPS auflisten",
      "type": "n8n-nodes-hostinger-api.hostingerApi",
      "position": [
        300,
        360
      ],
      "parameters": {
        "vpsAction": "listVms"
      },
      "credentials": {
        "hostingerApi": {
          "id": "jVddXbfl7TVKOktS",
          "name": "Hostinger account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6cf2b19c-079b-44e1-8491-42aaa0c207b0",
      "name": "Verfügbare VPS",
      "type": "n8n-nodes-base.filter",
      "position": [
        660,
        360
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "10bde94d-4ca9-479a-98d6-b39695fe7b78",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.state }}",
              "rightValue": "running"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "242a2705-1d27-450c-a935-082b5388ee1b",
      "name": "VPS-Metriken abrufen",
      "type": "n8n-nodes-hostinger-api.hostingerApi",
      "position": [
        860,
        360
      ],
      "parameters": {
        "date_to": "={{ $now.minus({ minute: 0 }).toISO() }}",
        "date_from": "={{ $now.minus({ minute: 30 }).toISO() }}",
        "vpsAction": "getVmMetrics",
        "virtualMachineId": "={{ $('Avaliables VPS').item.json.id }}"
      },
      "credentials": {
        "hostingerApi": {
          "id": "jVddXbfl7TVKOktS",
          "name": "Hostinger account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fb71f5bc-41ba-4293-8967-53f5380752d2",
      "name": "WhatsApp Nachricht (Erfolg)",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        1560,
        220
      ],
      "parameters": {
        "resource": "messages-api",
        "remoteJid": "55119999999",
        "messageText": "=💾 Info Snapshot Hostinger:\n\n🔹Status: {{ $('Create Snapshot').item.json.response.state === \"sent\" ? \"SUCCESS\" : $('Create Snapshot').item.json.response.state }}\n🔹Date: {{ $now.setZone(\"America/Sao_Paulo\").toFormat(\"dd/MM/yyyy HH:mm\") }}\n🔹Server: {{ $('Calculate metrics').item.json.plan }} / {{ $('Calculate metrics').item.json.hostname }}\n🔹IP: {{ $('Calculate metrics').item.json.IP }}\n\n⚙️ Métrics: \n🔹 {{ $('Calculate metrics').item.json.cpus }}vCPUs \n🔹 {{ $('Calculate metrics').item.json.ram_usage }} \n🔹 {{ $('Calculate metrics').item.json.disco }} \n🔹 {{ $('Calculate metrics').item.json.OS }}(SO) \n🔹 Uptime: {{ $('Calculate metrics').item.json.uptime }}",
        "instanceName": "alertasinstance",
        "options_message": {}
      },
      "credentials": {
        "evolutionApi": {
          "id": "aoptZJkDE26UU8y2",
          "name": "Evolution account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c9891a04-3b3b-48c6-b476-bf343940b8eb",
      "name": "Snapshot erstellen",
      "type": "n8n-nodes-hostinger-api.hostingerApi",
      "onError": "continueErrorOutput",
      "position": [
        1880,
        380
      ],
      "parameters": {
        "vpsAction": "createSnapshot",
        "subcategory": "snapshots",
        "virtualMachineId": "={{ $json.id }}"
      },
      "credentials": {
        "hostingerApi": {
          "id": "jVddXbfl7TVKOktS",
          "name": "Hostinger account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dfd2073c-c2c2-4b1c-b5a0-36f35eb5d269",
      "name": "Nächste VPS",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2160,
        360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c9cde1f1-38b0-4c9a-b018-9a0e794a908a",
      "name": "WhatsApp Nachricht (Fehler)",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        1560,
        600
      ],
      "parameters": {
        "resource": "messages-api",
        "remoteJid": "55119999999",
        "messageText": "=🚨⚠️ Error Snapshot Hostinger:\n\n🔹Status: {{ $('Create Snapshot').item.json.response.state }}\n🔹Date: {{ $now.setZone(\"America/Sao_Paulo\").toFormat(\"dd/MM/yyyy HH:mm\") }}\n🔹Server: {{ $('Calculate metrics').item.json.plan }} / {{ $('Calculate metrics').item.json.hostname }}\n🔹IP: {{ $('Calculate metrics').item.json.IP }}",
        "instanceName": "alertsinstance",
        "options_message": {}
      },
      "credentials": {
        "evolutionApi": {
          "id": "aoptZJkDE26UU8y2",
          "name": "Evolution account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ad294b56-763b-4c6e-9561-05f4dac14939",
      "name": "Notizzettel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -320
      ],
      "parameters": {
        "width": 340,
        "height": 340,
        "content": "### VPS Metrics avaliables (send in messages):\n\n\n🔹Status: snapshot status\n🔹Date: snapshot date time\n🔹Server: server name\n🔹IP: external server IP\n\n⚙️ Métrics: \n🔹 Number of vCPUs \n🔹 Ram usage / avaliable \n🔹 Hard Disk usage / avaliable\n🔹 Operational Sys and version\n🔹 Uptime time (days, hours)"
      },
      "typeVersion": 1
    },
    {
      "id": "37e8ea8c-731b-49a6-a82f-14c352134fbb",
      "name": "Notizzettel1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        100
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 680,
        "content": "### Set Hostinger API credential"
      },
      "typeVersion": 1
    },
    {
      "id": "1942c744-48b7-4774-8250-9bc4ff6d87c7",
      "name": "Notizzettel2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        100
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 680,
        "content": "### Set Hostinger API credential"
      },
      "typeVersion": 1
    },
    {
      "id": "a08c8234-15bc-4d75-b9a5-20b513a13d59",
      "name": "Notizzettel3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        100
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 680,
        "content": "### Set Hostinger API credential"
      },
      "typeVersion": 1
    },
    {
      "id": "2e8eece6-3f7e-4355-a52f-7ccdc088125b",
      "name": "Notizzettel4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        100
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 680,
        "content": "### Set destination alert message (use message model inside)"
      },
      "typeVersion": 1
    },
    {
      "id": "9a1ccbac-1c25-403d-a67c-826ad8491387",
      "name": "Metriken berechnen",
      "type": "n8n-nodes-base.set",
      "position": [
        1080,
        360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "08aea2dd-4226-46d5-ae08-3f1d764bd658",
              "name": "id",
              "type": "number",
              "value": "={{ $('Avaliables VPS').item.json.id }}"
            },
            {
              "id": "3115465b-24ed-4f9e-a9af-53e34d2db384",
              "name": "plan",
              "type": "string",
              "value": "={{ $('Avaliables VPS').item.json.plan }}"
            },
            {
              "id": "1611cd7b-cc97-4c12-822c-6e8da601c508",
              "name": "hostname",
              "type": "string",
              "value": "={{ $('Avaliables VPS').item.json.hostname }}"
            },
            {
              "id": "c1e1edd4-7c45-4f96-a7e0-2c67c6aa8968",
              "name": "cpus",
              "type": "number",
              "value": "={{ $('Avaliables VPS').item.json.cpus }}"
            },
            {
              "id": "78e6cf5e-979f-4e31-908c-f4c6b95cb316",
              "name": "disk",
              "type": "number",
              "value": "={{ $('Avaliables VPS').item.json.disk }}"
            },
            {
              "id": "58e18048-6200-40fc-8957-5022810c7474",
              "name": "IP",
              "type": "string",
              "value": "={{ $('Avaliables VPS').item.json.ipv4[0].address }}"
            },
            {
              "id": "e8f2e562-9a96-479f-b3ca-a0770296d343",
              "name": "OS",
              "type": "string",
              "value": "={{ $('Avaliables VPS').item.json.template.name }}"
            },
            {
              "id": "c18f9dc3-7190-4f38-b4b8-2068a1c89023",
              "name": "cpu_usage",
              "type": "string",
              "value": "={{ $('Get VPS Metrics').item.json.response.cpu_usage.usage.values().last() }}%"
            },
            {
              "id": "47607d2b-5980-4e27-9232-06e166c70193",
              "name": "ram_usage",
              "type": "string",
              "value": "={{\n  \"RAM: \" + \n  ($('Get VPS Metrics').item.json.response.ram_usage.usage.values().last() / 1073741824).toFixed(2) + \n  \" GB (\" + \n  (($('Get VPS Metrics').item.json.response.ram_usage.usage.values().last() / ($('Avaliables VPS').item.json.memory * 1048576)) * 100).toFixed(2) + \n  \"%) | Free: \" + \n  (($('Avaliables VPS').item.json.memory - ($('Get VPS Metrics').item.json.response.ram_usage.usage.values().last() / 1048576)) / 1024).toFixed(2) + \n  \" GB\"\n}}"
            },
            {
              "id": "b2fd1374-1199-4020-a2b4-00b9d9496c77",
              "name": "uptime",
              "type": "string",
              "value": "={{ \n  \"Days: \" + Math.floor($('Get VPS Metrics').item.json.response.uptime.usage.values().last() / 86400) + \n  \" | Hours: \" + Math.floor(($('Get VPS Metrics').item.json.response.uptime.usage.values().last() % 86400) / 3600)\n}}"
            },
            {
              "id": "a6b3ecbf-e734-48cd-b1d0-9094cf52c7ec",
              "name": "disco",
              "type": "string",
              "value": "={{ \"Used: \" + ($('Get VPS Metrics').item.json.response.disk_space.usage.values().last() / 1073741824).toFixed(2) + \" GB (\" + (($('Get VPS Metrics').item.json.response.disk_space.usage.values().last() / 1073741824) / ($('Avaliables VPS').item.json.disk / 1024) * 100).toFixed(2) + \"%) | Free: \" + ($('Avaliables VPS').item.json.disk / 1024 - $('Get VPS Metrics').item.json.response.disk_space.usage.values().last() / 1073741824).toFixed(2) + \" GB\" }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b7e68847-f530-4df7-b7d1-1b557b1718c1",
      "name": "Notizzettel5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        80
      ],
      "parameters": {
        "color": 3,
        "width": 2840,
        "height": 720,
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3791c97d-8433-438e-a8c2-b0fae6926186",
  "connections": {
    "dfd2073c-c2c2-4b1c-b5a0-36f35eb5d269": {
      "main": [
        [
          {
            "node": "ab42fce7-ca08-41f8-be53-f1ae3ca085e9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "da6b9112-0bb3-4ac3-94ee-e067545568dc": {
      "main": [
        [
          {
            "node": "6cf2b19c-079b-44e1-8491-42aaa0c207b0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ab42fce7-ca08-41f8-be53-f1ae3ca085e9": {
      "main": [
        [
          {
            "node": "308532f7-edb5-48cf-bc52-e4af021c31b5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6cf2b19c-079b-44e1-8491-42aaa0c207b0": {
      "main": [
        [
          {
            "node": "242a2705-1d27-450c-a935-082b5388ee1b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c9891a04-3b3b-48c6-b476-bf343940b8eb": {
      "main": [
        [
          {
            "node": "dfd2073c-c2c2-4b1c-b5a0-36f35eb5d269",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c9cde1f1-38b0-4c9a-b018-9a0e794a908a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "242a2705-1d27-450c-a935-082b5388ee1b": {
      "main": [
        [
          {
            "node": "9a1ccbac-1c25-403d-a67c-826ad8491387",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "308532f7-edb5-48cf-bc52-e4af021c31b5": {
      "main": [
        [
          {
            "node": "fb71f5bc-41ba-4293-8967-53f5380752d2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c9891a04-3b3b-48c6-b476-bf343940b8eb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fc54f299-b001-4171-9433-6cf4c5d36814": {
      "main": [
        [
          {
            "node": "6dbcc6a5-07a2-42d4-a41d-e5a81c2247a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9a1ccbac-1c25-403d-a67c-826ad8491387": {
      "main": [
        [
          {
            "node": "308532f7-edb5-48cf-bc52-e4af021c31b5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6dbcc6a5-07a2-42d4-a41d-e5a81c2247a2": {
      "main": [
        [
          {
            "node": "da6b9112-0bb3-4ac3-94ee-e067545568dc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fb71f5bc-41ba-4293-8967-53f5380752d2": {
      "main": [
        []
      ]
    },
    "66922063-7f2a-46a3-9618-abae57e1ee8c": {
      "main": [
        [
          {
            "node": "6dbcc6a5-07a2-42d4-a41d-e5a81c2247a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Experte - DevOps

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Experte
Anzahl der Nodes20
Kategorie1
Node-Typen11
Schwierigkeitsbeschreibung

Für fortgeschrittene Benutzer, komplexe Workflows mit 16+ Nodes

Autor
Leandro Melo

Leandro Melo

@lsmelo

Specialist in data integration, artificial intelligence, SQL databases, accounting, financial services, IoT.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34