API-Driven Docker & InfluxDB Management Workflow
detail.loadingPreview
Effortlessly manage your Docker containers, specifically those running InfluxDB, through a powerful API endpoint. This n8n workflow enables remote starting, stopping, and disk management of containers via secure SSH, ensuring reliable and automated operations.
About This Workflow
Take command of your Dockerized InfluxDB deployments with this robust n8n workflow. Designed for DevOps and system administrators, it provides an API-first approach to remote container management. Triggered by a secure webhook, the workflow validates incoming requests, executes shell commands via SSH on your target server, and processes the results into a clear, standardized JSON response. Automate tasks like starting, stopping, and mounting/unmounting disks for your InfluxDB containers, streamlining your infrastructure operations and reducing manual effort. Perfect for integrating container lifecycle management into your existing CI/CD pipelines or monitoring systems.
Key Features
- API-Triggered Operations: Initiate Docker container actions remotely via a secure
POSTwebhook with basic authentication. - Remote SSH Execution: Securely run shell commands directly on your server to manage Docker containers, ensuring flexibility and control.
- Container Lifecycle Management: Directly supports starting, stopping, and disk management (mount/unmount) for specified containers.
- Request Validation & Error Handling: Includes server domain validation and robust parsing of SSH command outputs for clear success/error feedback.
- Standardized JSON Responses: Receive consistent and easy-to-parse JSON payloads detailing the outcome of each operation.
How To Use
- Configure the Webhook Trigger ("API" node): Set your desired API path (e.g.,
docker-influxdb) and ensure basic authentication credentials are set up. This is your workflow's entry point. - Adjust Parameters ("Parametrs" node): Customize
server_domain,clients_dir, andmount_dirto match your server's environment. Theserver_domainhere is used for initial request validation. - Set up SSH Credentials ("SSH" node): Provide the necessary SSH credentials (e.g., password or private key) for your target server to enable remote command execution.
- Extend "Container Actions" (Switch node): Based on the
commandsent in the webhook body, you can add more branches to handle additional Docker operations (e.g.,container_restart,container_logs,container_update). Each branch would generate a specific shell script to be executed via SSH. - Test the Workflow: Send
POSTrequests to your n8n webhook URL (e.g.,https://your-n8n-instance/webhook/docker-influxdb) with a JSON body containingserver_domainandcommand(e.g.,{"server_domain": "d01-test.uuq.pl", "command": "container_start"}).
Apps Used
Workflow JSON
{
"id": "ff92c81c-792c-4d33-83f5-e9ec309ad4ac",
"name": "API-Driven Docker & InfluxDB Management Workflow",
"nodes": 10,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: ff92c81c-792c...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Effortless Bug Reporting: Slack Slash Command to Linear Issue
Streamline your bug reporting process by instantly creating Linear issues directly from Slack using a simple slash command. This workflow enhances team collaboration by providing immediate feedback and a structured approach to logging defects, saving valuable time for development and QA teams.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.