SaltStack (Salt) is a high-speed infrastructure automation platform built around the Salt Master, which orchestrates minions via encrypted ZeroMQ or SSH channels. When the Salt Master goes down, minions become unreachable, scheduled states stop applying, and emergency remediations can't execute — leaving your infrastructure frozen in whatever state it was in when the master failed. Vigilmon gives you external visibility into Salt Master before your infrastructure team notices: the Salt API endpoint, TCP port reachability for minion connections, and SSL certificate expiry.
What You'll Build
- A monitor on the Salt API (
/or/login) to catch master process failures - HTTP monitors for Salt API liveness and authentication
- TCP port checks for the Salt Master's publish port (4505) and return port (4506)
- SSL certificate monitoring for your Salt API domain
- An alerting setup that distinguishes API failures from network-level issues
Prerequisites
- A running Salt Master with
salt-apiconfigured (cherrypy or tornado driver) - A domain or IP pointing to Salt API (e.g.,
https://salt.example.com) - A free account at vigilmon.online
Step 1: Verify Salt API Endpoints
The salt-api service provides an HTTP interface to the Salt Master. Verify it's responding before creating monitors:
# Test the Salt API root (returns metadata about the API)
curl -s https://salt.example.com/
# Expected: JSON with "return" key listing available clients
# Check HTTP status
curl -I https://salt.example.com/
# Expected: HTTP/2 200
# Test the login endpoint (does not log in — just confirms it exists)
curl -I https://salt.example.com/login
# Expected: HTTP/2 200 (GET returns form or instructions)
The root endpoint / returns JSON with information about the Salt API and its available clients when the service is healthy.
For the Salt Master's ZeroMQ ports, minions connect on:
- Port 4505 (publish port — master broadcasts commands to minions)
- Port 4506 (return port — minions send job results back)
# Verify ports are open from an external perspective
nc -zv salt.example.com 4505
nc -zv salt.example.com 4506
Firewall note: Ports 4505 and 4506 may be restricted to your internal network. If so, TCP monitors from an external check network won't reach them — use internal monitoring or skip TCP monitors and rely on the Salt API checks instead.
Step 2: Create a Vigilmon HTTP Monitor for Salt API Root
- Log in to Vigilmon → Add Monitor → HTTP.
- URL:
https://salt.example.com/. - Check interval: 60 seconds.
- Response timeout: 10 seconds.
- Expected status:
200. - Keyword:
return(present in Salt API root JSON response). - Label:
Salt API root. - Click Save.
This monitor catches:
salt-apiprocess crashes or failed restarts- Configuration errors that prevent the API from binding
- Salt Master daemon failures that cascade into
salt-apierrors - Database or PKI directory corruption that breaks the master
Alert sensitivity: Set alerts to trigger after 2 consecutive failures. A single failure during a Salt state run that temporarily saturates the API is possible; two consecutive failures indicate a real outage.
Step 3: Create a Vigilmon HTTP Monitor for the Login Endpoint
The /login endpoint exercises Salt API's authentication layer. Monitoring it confirms the auth module (PAM, LDAP, or file-based) is reachable:
- Add Monitor → HTTP.
- URL:
https://salt.example.com/login. - Check interval: 2 minutes.
- Response timeout: 15 seconds.
- Expected status:
200. - Label:
Salt API login. - Click Save.
Method note: A GET to
/loginreturns instructions or a redirect with HTTP 200 in most salt-api configurations. If your deployment returns a different code on GET, adjust the expected status accordingly — what matters is that the endpoint responds without a 5xx error.
Step 4: Create TCP Monitors for Salt Master Ports
Salt Master's ZeroMQ ports are the critical communication channels for all minion control. Monitoring them confirms that minions can reach the master at the network level:
Port 4505 (publish port):
- Add Monitor → TCP.
- Host:
salt.example.com(or the Salt Master IP). - Port:
4505. - Check interval: 2 minutes.
- Response timeout: 10 seconds.
- Label:
Salt Master publish port (4505). - Click Save.
Port 4506 (return port):
- Add Monitor → TCP.
- Host:
salt.example.com. - Port:
4506. - Check interval: 2 minutes.
- Response timeout: 10 seconds.
- Label:
Salt Master return port (4506). - Click Save.
When the TCP monitors fire but the Salt API HTTP monitors stay green:
- The ZeroMQ layer is blocked by a firewall
- The salt-master daemon crashed while salt-api kept running
- A port number was changed in
/etc/salt/master
When both TCP and HTTP monitors fire simultaneously, the entire Salt Master stack is down.
Step 5: Monitor SSL Certificates
Salt API is accessed by automation scripts, pipeline tools, and Reactor hooks — all performing strict TLS validation. An expired certificate causes:
- All salt-api calls from scripts and CI pipelines to fail with TLS errors
- Event-driven Reactor responses to fail silently
- Browser access to any salt-api web UI to throw security warnings
- Add Monitor → SSL Certificate.
- Domain:
salt.example.com. - Alert when expiry is within: 30 days.
- Alert again: 14 days, 7 days, 3 days, 1 day.
- Click Save.
Self-signed certificates: Salt uses its own PKI for minion-master communication, but
salt-apitypically uses a separate TLS certificate for its HTTPS interface. Monitor the certificate that browsers and API clients use — the one on port 443 — not the internal Salt PKI certificates.
Step 6: Monitor Salt API Authentication Flow
Test the authentication endpoint end-to-end with an intentionally invalid request that confirms the auth stack is working:
curl -s -o /dev/null -w "%{http_code}" -X POST \
https://salt.example.com/login \
-H "Content-Type: application/json" \
-d '{"username":"","password":"","eauth":"pam"}'
# Returns 401 (unauthorized) when auth stack is healthy
- Add Monitor → HTTP.
- URL:
https://salt.example.com/login. - Method:
POST. - Request body:
{"username":"","password":"","eauth":"pam"}. - Content-Type header:
application/json. - Expected status:
401. - Check interval: 5 minutes.
- Label:
Salt API auth stack. - Click Save.
A
401response confirms the Salt API received the request, invoked the eauth module, and rejected the invalid credentials — the entire auth path is healthy. A500or connection error means the auth module or Salt Master connectivity is broken.
Step 7: Configure Alerting
In Vigilmon under Settings → Notifications, configure your alert channels:
| Monitor | Trigger | Action |
|---|---|---|
| Salt API root | Non-200 or return missing | Check systemctl status salt-api; inspect /var/log/salt/api |
| Login endpoint | Non-200 | Check salt-api config in /etc/salt/api; verify eauth module |
| Port 4505 | Connection refused or timeout | Check systemctl status salt-master; verify firewall allows 4505 |
| Port 4506 | Connection refused or timeout | Check systemctl status salt-master; verify firewall allows 4506 |
| SSL certificate | < 30 days to expiry | Renew TLS cert for salt-api; check Certbot/ACME renewal cron |
| Auth stack | Non-401 | eauth module failure; check PAM/LDAP config and Salt Master connectivity |
Alert after: 2 consecutive failures for HTTP monitors. 1 failure for TCP monitors — loss of the publish or return port immediately disconnects all minions.
Common SaltStack Failure Modes and What Vigilmon Catches
| Scenario | Vigilmon monitor |
|---|---|
| salt-master daemon crash | TCP ports 4505/4506 unreachable; alert within 2 min |
| salt-api crash, master running | HTTP monitors fire; TCP port monitors stay green |
| Firewall blocks ZeroMQ ports | TCP monitors fire; HTTP monitors stay green |
| Salt PKI directory corruption | Master starts but minions reject auth; API monitor may still pass |
| SSL certificate expires | SSL monitor alerts at 30-day threshold; API script calls fail |
| eauth module misconfiguration | Auth stack monitor fires; root endpoint stays green |
| Disk full (job cache) | Salt state runs fail; master may still respond to API |
| DNS misconfiguration | All monitors fire simultaneously |
| High minion count saturates return port | Intermittent TCP timeouts on 4506; HTTP monitors slow |
Salt Master downtime is operationally silent at first: minions stop receiving commands, scheduled states don't apply, and emergency patches can't be pushed — but no error appears in your CI system or monitoring dashboard until someone tries to run a salt command. Vigilmon closes that gap with proactive checks on the API endpoint, ZeroMQ ports, and SSL certificate, alerting your team in seconds rather than waiting for an operator to notice that automation stopped.
Start monitoring SaltStack in under 5 minutes — register free at vigilmon.online.