AutomationFlowsSlack & Telegram › System Health Check

System Health Check

System Health Check. Uses httpRequest, postgres, slack. Scheduled trigger; 10 nodes.

Cron / scheduled trigger★★★★☆ complexity10 nodesHTTP RequestPostgresSlack
Slack & Telegram Trigger: Cron / scheduled Nodes: 10 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "System Health Check",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "*/5 * * * *"
            }
          ]
        }
      },
      "id": "cron-trigger",
      "name": "Every 5 Minutes",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://prometheus:9090/api/v1/query",
        "options": {
          "qs": {
            "query": "up"
          }
        }
      },
      "id": "check-prometheus",
      "name": "Check Prometheus",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        460,
        200
      ]
    },
    {
      "parameters": {
        "url": "http://redis:6379/ping"
      },
      "id": "check-redis",
      "name": "Check Redis",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://postgres:5432"
      },
      "id": "check-postgres",
      "name": "Check PostgreSQL",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        460,
        400
      ]
    },
    {
      "parameters": {
        "url": "http://mongodb:27017"
      },
      "id": "check-mongodb",
      "name": "Check MongoDB",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        460,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "// Aggregate health check results\nconst results = [];\n\n// Process each service check\nfor (const item of $input.all()) {\n  const service = item.json.service || 'unknown';\n  const status = item.json.status === 200 ? 'healthy' : 'unhealthy';\n  const responseTime = item.json.responseTime || 0;\n  \n  results.push({\n    service,\n    status,\n    responseTime,\n    timestamp: new Date().toISOString(),\n    healthy: status === 'healthy'\n  });\n}\n\n// Calculate overall health\nconst healthyServices = results.filter(r => r.healthy).length;\nconst totalServices = results.length;\nconst overallHealth = healthyServices / totalServices;\n\nreturn {\n  overallHealth,\n  healthyServices,\n  totalServices,\n  services: results,\n  timestamp: new Date().toISOString()\n};"
      },
      "id": "aggregate-results",
      "name": "Aggregate Results",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "operation": "insert",
        "table": "health_checks",
        "columns": "timestamp, service, status, response_time, healthy",
        "values": "={{ $json.timestamp }}, {{ $json.service }}, {{ $json.status }}, {{ $json.responseTime }}, {{ $json.healthy }}"
      },
      "id": "save-health-data",
      "name": "Save Health Data",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.4,
      "position": [
        900,
        300
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-1",
              "leftValue": "={{ $json.overallHealth }}",
              "rightValue": 1,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-overall-health",
      "name": "Check Overall Health",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1120,
        300
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "n8n",
          "mode": "name"
        },
        "text": "\u2705 All services are healthy ({{ $json.healthyServices }}/{{ $json.totalServices }})",
        "otherOptions": {
          "attachments": [
            {
              "color": "good",
              "fields": [
                {
                  "title": "Healthy Services",
                  "value": "{{ $json.healthyServices }}/{{ $json.totalServices }}",
                  "short": true
                },
                {
                  "title": "Overall Health",
                  "value": "{{ Math.round($json.overallHealth * 100) }}%",
                  "short": true
                }
              ]
            }
          ]
        }
      },
      "id": "success-notification",
      "name": "Success Notification",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.1,
      "position": [
        1340,
        200
      ],
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "n8n",
          "mode": "name"
        },
        "text": "\u26a0\ufe0f System health degraded ({{ $json.healthyServices }}/{{ $json.totalServices }} services healthy)",
        "otherOptions": {
          "attachments": [
            {
              "color": "warning",
              "fields": [
                {
                  "title": "Healthy Services",
                  "value": "{{ $json.healthyServices }}/{{ $json.totalServices }}",
                  "short": true
                },
                {
                  "title": "Overall Health",
                  "value": "{{ Math.round($json.overallHealth * 100) }}%",
                  "short": true
                }
              ]
            }
          ]
        }
      },
      "id": "warning-notification",
      "name": "Warning Notification",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.1,
      "position": [
        1340,
        400
      ],
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Every 5 Minutes": {
      "main": [
        [
          {
            "node": "Check Prometheus",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Redis",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check PostgreSQL",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check MongoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Prometheus": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Redis": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check PostgreSQL": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check MongoDB": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Results": {
      "main": [
        [
          {
            "node": "Save Health Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Health Data": {
      "main": [
        [
          {
            "node": "Check Overall Health",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Overall Health": {
      "main": [
        [
          {
            "node": "Success Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Warning Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    {
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z",
      "id": "monitoring",
      "name": "monitoring"
    }
  ],
  "triggerCount": 1,
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

System Health Check. Uses httpRequest, postgres, slack. Scheduled trigger; 10 nodes.

Source: https://github.com/kyletaylored/n8n-docker-demo/blob/84bda45802ceaf2a5ac14b7d45606f1d78cb750b/examples/n8n-demo/workflows/02-system-health-check.json — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

The template allows to make Dropcontact batch requests up to 250 requests every 10 minutes (1500/hour). Valuable if high volume email enrichment is expected.

Postgres, HTTP Request, Slack
Slack & Telegram

WF-7: Health Check. Uses httpRequest, slack, postgres. Scheduled trigger; 7 nodes.

HTTP Request, Slack, Postgres
Slack & Telegram

This workflow automates end-to-end research analysis by coordinating multiple AI models—including NVIDIA NIM (Llama), OpenAI GPT-4, and Claude to analyze uploaded documents, extract insights, and gene

HTTP Request, Postgres, Slack +1
Slack & Telegram

This workflow is an automated employee time tracking and reporting system that monitors weekly work hours via TMetric, then delivers personalized summaries directly to each team member on Slack. It co

HTTP Request, Item Lists, Data Table +1
Slack & Telegram

Import Productboard Notes Companies And Features Into Snowflake. Uses stickyNote, httpRequest, splitOut, snowflake. Scheduled trigger; 35 nodes.

HTTP Request, Snowflake, Slack