infrastructure-monitoring-setup
Configures automated infrastructure monitoring with mobile alerts (ntfy.sh and Home Assistant) and implements auto-recovery for common failures. Use when setting up monitoring, configuring mobile notifications, enabling auto-recovery, or troubleshooting alert delivery. Triggers on "setup monitoring", "configure alerts", "mobile notifications", "enable auto-recovery", "monitoring not working", or "not getting alerts". Works with ntfy.sh push notifications, Docker container health checks, Bash monitoring scripts, and optional Home Assistant automation integration.
What this skill does
Works with infrastructure-monitor.sh script, systemd timer, ntfy.sh push notifications,
# Infrastructure Monitoring Setup Skill
Complete setup and configuration of automated infrastructure monitoring with mobile push notifications and auto-recovery capabilities.
## Quick Start
Quick setup for monitoring (5 minutes):
```bash
# 1. Create unique ntfy topic
TOPIC="infra-$(openssl rand -hex 8)"
echo "Your topic: $TOPIC"
# 2. Add to .env
echo "ALERT_ENABLED=true" >> /home/dawiddutoit/projects/network/.env
echo "NTFY_SERVER=https://ntfy.sh" >> /home/dawiddutoit/projects/network/.env
echo "NTFY_TOPIC=$TOPIC" >> /home/dawiddutoit/projects/network/.env
echo "AUTO_RECOVER=true" >> /home/dawiddutoit/projects/network/.env
# 3. Install systemd service
sudo cp /home/dawiddutoit/projects/network/systemd/infrastructure-monitor.* /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now infrastructure-monitor.timer
# 4. Test
/home/dawiddutoit/projects/network/scripts/infrastructure-monitor.sh
```
Then install ntfy app on phone and subscribe to your topic.
## Table of Contents
1. [When to Use This Skill](#1-when-to-use-this-skill)
2. [What This Skill Does](#2-what-this-skill-does)
3. [Instructions](#3-instructions)
- 3.1 Install ntfy Mobile App
- 3.2 Configure Monitoring in .env
- 3.3 Install Systemd Timer
- 3.4 Test Monitoring and Alerts
- 3.5 Configure Home Assistant Integration (Optional)
- 3.6 Verify Auto-Recovery
- 3.7 View Monitoring Logs
4. [Supporting Files](#4-supporting-files)
5. [Expected Outcomes](#5-expected-outcomes)
6. [Requirements](#6-requirements)
7. [Red Flags to Avoid](#7-red-flags-to-avoid)
## When to Use This Skill
**Explicit Triggers:**
- "Setup monitoring"
- "Configure mobile alerts"
- "Enable auto-recovery"
- "Setup ntfy notifications"
- "Configure Home Assistant alerts"
**Implicit Triggers:**
- Want to be notified of infrastructure failures
- Need automated recovery for common issues
- Infrastructure has been down without detection
- Want proactive monitoring
**Debugging Triggers:**
- "Why am I not getting alerts?"
- "Is monitoring working?"
- "How to test notifications?"
## What This Skill Does
1. **Mobile Alerts** - Configures ntfy.sh push notifications to phone
2. **Auto-Recovery** - Enables automatic fixes for common failures
3. **HA Integration** - Optional Home Assistant notification integration
4. **Systemd Service** - Installs timer to run monitoring every 5 minutes
5. **Tests Setup** - Verifies notifications and recovery work
6. **Logs Access** - Shows how to view monitoring logs
7. **Troubleshooting** - Diagnoses alert delivery issues
## Instructions
### 3.1 Install ntfy Mobile App
**Install app:**
- Android: https://play.google.com/store/apps/details?id=io.heckel.ntfy
- iOS: https://apps.apple.com/us/app/ntfy/id1625396347
**Subscribe to topic:**
1. Open ntfy app
2. Tap "+" to add subscription
3. Enter topic: `infra-YOUR-RANDOM-ID` (you'll generate this in step 3.2)
4. Server: `https://ntfy.sh`
5. Tap "Subscribe"
**Note:** You need the topic ID from step 3.2 before subscribing. Come back here after generating it.
### 3.2 Configure Monitoring in .env
**Generate unique topic ID:**
```bash
TOPIC="infra-$(openssl rand -hex 8)"
echo "Your unique topic: $TOPIC"
```
Save this topic ID - you'll use it in the ntfy app.
**Add monitoring configuration to .env:**
```bash
# Navigate to project directory
cd /home/dawiddutoit/projects/network
# Add monitoring variables
cat >> .env << EOF
# Monitoring & Alerts
ALERT_ENABLED=true
NTFY_SERVER=https://ntfy.sh
NTFY_TOPIC=$TOPIC
AUTO_RECOVER=true
EOF
```
**Verify configuration:**
```bash
grep -A4 "Monitoring & Alerts" /home/dawiddutoit/projects/network/.env
```
Expected:
```
# Monitoring & Alerts
ALERT_ENABLED=true
NTFY_SERVER=https://ntfy.sh
NTFY_TOPIC=infra-a3f7d92b4c8e1f56
AUTO_RECOVER=true
```
**Configuration options:**
| Variable | Purpose | Default |
|----------|---------|---------|
| `ALERT_ENABLED` | Enable mobile push notifications | `false` |
| `NTFY_SERVER` | ntfy.sh server URL | `https://ntfy.sh` |
| `NTFY_TOPIC` | Unique topic for your alerts | None (required) |
| `AUTO_RECOVER` | Enable automatic recovery | `true` |
**To disable auto-recovery but keep alerts:**
```bash
# Edit .env
nano /home/dawiddutoit/projects/network/.env
# Change: AUTO_RECOVER=false
```
### 3.3 Install Systemd Timer
Install systemd service and timer to run monitoring every 5 minutes:
```bash
# Copy service files
sudo cp /home/dawiddutoit/projects/network/systemd/infrastructure-monitor.service /etc/systemd/system/
sudo cp /home/dawiddutoit/projects/network/systemd/infrastructure-monitor.timer /etc/systemd/system/
# Reload systemd
sudo systemctl daemon-reload
# Enable and start timer
sudo systemctl enable infrastructure-monitor.timer
sudo systemctl start infrastructure-monitor.timer
```
**Verify timer is active:**
```bash
# Check timer status
systemctl list-timers infrastructure-monitor.timer
# Check service status
sudo systemctl status infrastructure-monitor.timer
```
Expected:
```
● infrastructure-monitor.timer - Run infrastructure monitoring every 5 minutes
Loaded: loaded (/etc/systemd/system/infrastructure-monitor.timer; enabled)
Active: active (waiting) since...
```
**Timer configuration:**
- Runs every 5 minutes
- Starts 1 minute after boot
- Persistent (survives reboots)
### 3.4 Test Monitoring and Alerts
**Test monitoring script:**
```bash
# Run monitoring manually
/home/dawiddutoit/projects/network/scripts/infrastructure-monitor.sh
```
Expected output shows:
- Docker containers checked
- Tunnel connectivity tested
- Service health verified
- Network interface status
- Alert sent to ntfy topic
**Test alert delivery:**
Within 30 seconds, you should receive push notification on phone with infrastructure status.
**If no notification received:**
Check ntfy topic subscription:
```bash
# Test sending to topic directly
curl -d "Test from infrastructure monitoring" https://ntfy.sh/$TOPIC
```
If direct curl works but monitoring doesn't:
- Check ALERT_ENABLED=true in .env
- Verify NTFY_TOPIC matches app subscription
- Check script has network access
### 3.5 Configure Home Assistant Integration (Optional)
**Why use Home Assistant integration:**
- Centralized home automation alerts
- Can trigger automations based on infrastructure status
- Redundancy with ntfy.sh
- Integration with existing HA notifications
**Prerequisites:**
- Home Assistant running and accessible
- HA mobile app installed (for notify.mobile_app_* service)
**Step 1: Create Long-Lived Access Token**
1. Go to Home Assistant: http://192.168.68.123:8123
2. Click your profile (bottom left)
3. Scroll to "Long-Lived Access Tokens"
4. Click "Create Token"
5. Name: "Infrastructure Monitoring"
6. Copy token (shown only once)
**Step 2: Find Notification Service Name**
1. In Home Assistant: Developer Tools → Services
2. Filter by "notify"
3. Find your mobile app service: `notify.mobile_app_your_phone`
**Step 3: Add to .env**
```bash
# Edit .env
nano /home/dawiddutoit/projects/network/.env
# Add HA configuration
HA_NOTIFICATIONS_ENABLED=true
HA_BASE_URL=http://192.168.68.123:8123
HA_ACCESS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
HA_NOTIFY_SERVICE=notify.mobile_app_your_phone
```
**Step 4: Test HA Notifications**
```bash
# Run monitoring (should send to both ntfy and HA)
/home/dawiddutoit/projects/network/scripts/infrastructure-monitor.sh
```
Check you receive notification in Home Assistant companion app.
**Troubleshooting HA notifications:**
```bash
# Test HA API access
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://192.168.68.123:8123/api/
# Test notification service
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "Test from infrastructure monitoring"}' \
http://192.168.68.123:8123/api/services/notify/mobile_app_your_phone
```
### 3.6 Verify Auto-Recovery
Monitor loRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.