Who is this workflow for? This workflow automates the monitoring and incident reporting processes within a factory setting. It captures machine data from factory sensors, stores it in a CrateDB database, and generates incident reports in PagerDuty when specific conditions, such as temperature thresholds, are met. Additionally, it notifies the appropriate staff members to ensure timely responses to potential issues..
What does this workflow do?
Prerequisites
Before setting up the workflow, ensure you have the following:
PagerDuty Account: Sign up and obtain the necessary credentials.
AMQP Setup: An ActiveMQ connection with appropriate credentials.
CrateDB Instance: A running CrateDB instance either locally or on a server, along with the required credentials.
Nodes Overview
AMQP Trigger Node: Initiates the workflow by listening for incoming messages from factory sensors.
IF Node: Evaluates sensor data to determine if the temperature exceeds the 50°C threshold.
PagerDuty Node: Creates an incident in PagerDuty when high temperature conditions are detected.
Set Nodes: Configure necessary incident details and sensor data for processing.
CrateDB Nodes: Insert incident information and machine sensor data into the CrateDB database.
Function Node: Converts temperature readings from Celsius to Fahrenheit for comprehensive reporting.
Step-by-Step Workflow
AMQP Trigger:
Function: Begins the workflow by receiving real-time data from factory sensors via an AMQP message.
Configuration: Connect to your ActiveMQ instance using the provided credentials.
IF Node:
Function: Filters incoming sensor data to identify temperature readings above 50°C.
Configuration: Set the condition to check if the temperature value exceeds the threshold.
Set Nodes:
Incident Information Set:
Function: Defines the details required for the PagerDuty incident, such as the incident title, description, and severity.
Sensor Data Set:
Function: Prepares the sensor data, including temperature readings and machine identifiers, for logging in CrateDB.
PagerDuty Node:
Function: Creates a new incident in PagerDuty based on the information provided by the Set node.
Configuration: Use your PagerDuty credentials and map the incident details accordingly.
CrateDB Nodes:
Incident Data Ingestion:
Function: Stores the incident details in the CrateDB database for record-keeping and analysis.
Sensor Data Ingestion:
Function: Logs the raw sensor data, including temperature and machine status, into CrateDB.
Function Node:
Function: Converts temperature measurements from Celsius to Fahrenheit to provide a clearer understanding of the data.
Configuration: Implement a simple conversion formula within the function to adjust the temperature values.
Integrations
This workflow integrates several tools to ensure comprehensive monitoring and reporting:
Google Drive, HTTP Request, Merge, Slack, Cortex, TheHive, Google Sheets, Gmail, Webhook, Respond to Webhook: These integrations can be incorporated to extend the workflow’s capabilities, such as sending notifications via Slack or storing additional data in Google Sheets.
🤖 Why Use This Automation Workflow?
Real-Time Monitoring: Continuously track machine performance and environmental conditions to detect anomalies as they occur.
Automated Incident Reporting: Automatically create incidents in PagerDuty, ensuring that issues are promptly addressed without manual intervention.
Data Management: Efficiently log and manage sensor data in CrateDB for historical analysis and reporting.
Seamless Integration: Connects essential tools like PagerDuty and CrateDB through n8n, streamlining your incident management processes.
👨💻 Who is This Workflow For?
This workflow is ideal for:
Factory Operations Managers: Seeking to enhance monitoring and incident response within their facilities.
DevOps Teams: Looking to integrate incident management and data logging into their existing workflows.
IT Administrators: Managing industrial IoT devices and requiring automated incident reporting based on sensor data.
🎯 Use Cases
Temperature Threshold Alerts: Automatically notify staff when machine temperatures exceed safe operating limits to prevent overheating and equipment damage.
Machine Failure Detection: Generate incidents when sensors indicate a malfunction or unexpected behavior in machinery, enabling swift corrective actions.
Performance Monitoring: Log and analyze machine performance data over time to identify trends, optimize operations, and schedule maintenance proactively.
TL;DR
This n8n workflow provides a robust solution for automating incident reporting in factory environments. By leveraging PagerDuty for incident management and CrateDB for data storage, it ensures real-time monitoring, swift response to critical issues, and efficient data handling. Implementing this workflow enhances operational efficiency, minimizes downtime, and supports proactive maintenance strategies.