Skip to main content

Analyze Zabbix infrastructure health with Gemini and PostgreSQL

Workflow preview

Workflow preview
100%
Analyze Zabbix infrastructure health with Gemini and PostgreSQL preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow exposes a Basic Auth webhook that routes infrastructure questions to a IA agent, which queries a Zabbix PostgreSQL database for host, alert, and performance metrics and...

Best for

  • DevOps automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.respondtowebhook, n8n-nodes-base.webhook, n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-base.postgrestool, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.memoryredischat, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Thiago Vazzoler Loureiro.

Original n8n.io source

1.1 Workflow description

Title
Analyze Zabbix infrastructure health with Gemini and PostgreSQL
Workflow name
Analyze Zabbix infrastructure health with Gemini and PostgreSQL

Quick overview

This workflow exposes a Basic Auth webhook that routes infrastructure questions to a IA agent, which queries a Zabbix PostgreSQL database for host, alert, and performance metrics and returns a Markdown response with inline SVG charts, using Redis for short-lived chat memory.

How it works

  1. Receives a POST request on a Basic Auth-protected webhook endpoint (for example from Open WebUI) containing a user message and optional conversation identifiers.
  2. Normalizes the incoming payload into a consistent structure (session ID, user, message) and injects a compact Zabbix PostgreSQL schema reference to guide tool calls.
  3. Uses a Google Gemini chat model with a LangChain agent and Redis chat memory to interpret the question and decide which Zabbix SQL queries to run.
  4. Queries the Zabbix PostgreSQL database to retrieve host status, active alerts, item baselines and deviations, environment anomalies, disk growth projections, switch bottlenecks, and group/host searches as needed.
  5. Generates a Markdown answer that can include chart placeholders for time-series insights and falls back to a static error message if the agent cannot complete.
  6. Converts any chart placeholders into inline base64-encoded SVG images and returns the final JSON response (including the session ID) to the original webhook caller.

Setup

  1. Configure HTTP Basic Auth credentials for the webhook and copy the production webhook URL into your chat client or source system that sends the POST requests.
  2. Add a PostgreSQL credential that can read your Zabbix database (hosts, items, history/trends, events/problems, and groups tables) and update it if your DB host/schema differs.
  3. Add a Google Gemini (PaLM) API credential for the Gemini chat model used by the agent.
  4. Add a Redis credential and ensure your Redis instance is reachable so the workflow can store chat memory per session ID.
  5. Verify your webhook payload includes a message field (for example ds_mensagem, content, text, or query) and optionally a conversation identifier (chat_id or conversation_id).

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Respond

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 2 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Fallback Response

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - get_host_status

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 6 - get_host_items

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 7 - get_item_history

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 8 - get_host_alerts

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 9 - get_environment_anomalies

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 10 - search_hosts

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 11 - get_group_hosts

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 12 - get_alert_ranking

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 13 - get_switch_bottlenecks

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 14 - get_group_summary

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 15 - get_disk_growth

Type / Role
n8n-nodes-base.postgresTool - postgresTool
Config choices
Version 2.6

Block 16 - Render SVG Charts

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Redis Chat Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryRedisChat - memoryRedisChat
Config choices
Version 1.4

Block 18 - Gemini 2.0 Flash

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 19 - Gemini · Infra Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 20 - Prepare Context

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Normalize Payload

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Analyze Zabbix infrastructure health with Gemini and PostgreSQL
Complexity advanced
Nodes 32
Categories DevOps, AI Chatbot
Author Thiago Vazzoler Loureiro
Published 09 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16222/16222.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze Zabbix infrastructure health with Gemini and PostgreSQL do?

Quick overview This workflow exposes a Basic Auth webhook that routes infrastructure questions to a IA agent, which queries a Zabbix PostgreSQL database for host, alert, and performance metrics and...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, AI Chatbot use case.