Krayin gives your sales team a fully self-hosted CRM — leads, pipelines, contacts, email integration, and reporting — without surrendering data to Salesforce or HubSpot. But self-hosting means you own the uptime. A database connection failure takes down the login page while your team is in the field. A broken email integration silently stops syncing correspondence. An expired SSL certificate blocks access during working hours with no browser bypass option. Vigilmon watches your Krayin instance across all these failure modes so your sales team is never silently locked out.
What You'll Set Up
- Krayin web application availability monitor
- Login page readiness check (database connectivity signal)
- API health monitor (authenticated or unauthenticated)
- SSL certificate expiry alerts
- Heartbeat monitor for the lead pipeline and email integration
Prerequisites
- Krayin CRM installed and running on port 80/443
- A free Vigilmon account
Step 1: Monitor the Krayin Web Application
The application root redirects to the login page when a user is not authenticated. A 200 or 302 response confirms that nginx/Apache and the Laravel application server are running.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Krayin URL:
https://crm.yourcompany.com. - Set Check interval to
1 minute. - Set Expected HTTP status to
200(or302if your server issues a redirect before following to the login page — use200if Vigilmon follows redirects). - Click Save.
Step 2: Monitor the Krayin Login Page (Database Signal)
The Krayin login page at /user/session is the most valuable health endpoint in the application. Laravel renders it by loading a CSRF token from the database session store — if MySQL or the Redis session backend is down, this page returns a 500 error instead of the login form. A 200 response with the Krayin login page content confirms both the web server and database are healthy.
- Click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter:
https://crm.yourcompany.com/user/session. - Set Expected HTTP status to
200. - Under Keyword check, enter
KrayinorCRM. - Click Save.
This is your primary database health signal. A storefront check at the root URL confirms nginx is running; the login page check confirms the full Laravel + MySQL stack is operational.
Step 3: Monitor the Krayin API
The Krayin REST API is used by integrations, mobile apps, and automation workflows. You can monitor it with or without authentication:
Without authentication (confirms API routes are registered):
- Click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter:
https://crm.yourcompany.com/api/v1. - Set Expected HTTP status to
401— an unauthenticated request to the API returns 401, which confirms the API routes are registered and the application is running. - Click Save.
With authentication (confirms API + database reads):
If you have a Krayin API token (generated under Settings → API Tokens), monitor an authenticated endpoint instead:
- Create the monitor as above but for
https://crm.yourcompany.com/api/v1/settings. - Set Expected HTTP status to
200. - Under Request headers, add:
Authorization: Bearer YOUR_API_TOKEN.
A 500 response on either variant indicates an application error — typically a database failure, a failed queue worker, or a misconfigured .env.
Step 4: SSL Certificate Alerts
Krayin handles sensitive sales data: customer contact details, deal values, negotiation notes, and email correspondence. HTTPS is mandatory in any production deployment. An expired SSL certificate doesn't just show a browser warning — it hard-blocks your sales team from accessing the CRM during their working hours, with no way to bypass the error on modern browsers.
- Open the web application monitor created in Step 1.
- Scroll to the SSL certificate section.
- Enable Monitor SSL certificate.
- Set Alert when certificate expires in less than
21 days. - Click Save.
For sales teams working across time zones, a 21-day alert window ensures you have time to renew even if the initial alert arrives on a Friday before a long weekend.
Step 5: Heartbeat Monitoring for Pipeline and Email Integration
Krayin's core workflows — lead creation, pipeline movement, email sync — can fail silently without affecting the login page. A queue worker crash stops email notifications. An IMAP misconfiguration after a password rotation silently breaks email threading. A database write failure during lead creation may surface as a vague error to the user, not an HTTP 500.
Use a heartbeat monitor to run an hourly automated pipeline health check:
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set Expected ping interval to
60 minutes. - Copy the heartbeat URL:
https://vigilmon.online/heartbeat/YOUR_TOKEN.
Write a test script that creates and deletes a test lead via the API:
#!/bin/bash
set -e
CRM_URL="https://crm.yourcompany.com"
API_TOKEN="YOUR_API_TOKEN"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_TOKEN"
# Create a test lead
CREATE_RESPONSE=$(curl -sf -X POST \
"$CRM_URL/api/v1/leads" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Heartbeat Test Lead",
"lead_value": 0,
"status": 1,
"tags": ["heartbeat-test"]
}')
LEAD_ID=$(echo "$CREATE_RESPONSE" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data']['id'])")
# Delete the test lead
curl -sf -X DELETE \
"$CRM_URL/api/v1/leads/$LEAD_ID" \
-H "Authorization: Bearer $API_TOKEN"
# Signal success
curl -sf "$HEARTBEAT_URL"
Schedule with cron:
0 * * * * /path/to/krayin-pipeline-test.sh >> /var/log/krayin-heartbeat.log 2>&1
Email integration heartbeat (optional but recommended):
If Krayin email integration is configured with IMAP/SMTP, add a second heartbeat monitor for email health:
#!/bin/bash
# Test that Krayin can queue an outbound email via the API
curl -sf -X POST \
"$CRM_URL/api/v1/mails/outbox" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"to": "heartbeat@yourcompany.com", "subject": "Krayin heartbeat test", "body": "ok"}'
curl -sf "$HEARTBEAT_URL_EMAIL"
Step 6: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add Slack, email, or a PagerDuty webhook.
- Set Consecutive failures before alert to
2for the web application monitor — brief Laravel restarts during deployment won't trigger a false alarm. - Set Consecutive failures before alert to
1for the SSL certificate monitor — any detection of near-expiry is immediately actionable.
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web application | https://crm.yourcompany.com | Laravel/nginx crash |
| Login page | /user/session | Database/Redis session failure |
| API health | /api/v1 (401 expected) | API routing failure, application error |
| SSL certificate | CRM domain | Let's Encrypt renewal failure |
| Pipeline heartbeat | Hourly cron → Vigilmon | Lead DB writes broken, queue worker down |
| Email heartbeat | Hourly cron → Vigilmon | IMAP/SMTP integration failure |
Krayin's self-hosted model keeps your sales data on your own infrastructure — and Vigilmon ensures your sales team can always reach it. With login page health checks catching database failures and hourly pipeline tests confirming CRM workflows are intact, you have the observability coverage a sales-critical application demands.