Monitor Types
NightPanel supports four types of monitors. Each type checks something different and has its own settings.
HTTP Monitor
What it does: Sends an HTTP request to a URL and checks if the response is what you expect.
When to use: To monitor websites, APIs, health check endpoints — anything that responds to HTTP requests.
Settings
| Field | Required | Description |
|---|---|---|
| URL | Yes | The address to check, e.g., https://mysite.com/health |
| Method | No | HTTP method: GET (default), POST, PUT, etc. |
| Expected Status | No | Expected HTTP status code. Default: 200 |
| Timeout | No | How long to wait before giving up (milliseconds). Default: 10000 (10 sec) |
| Warning Time | No | If response takes longer than this, status becomes yellow (ms). Default: 3000 |
| Headers | No | Custom headers to send with the request |
| Body | No | Request body (for POST/PUT requests) |
Example Configuration
When you create an HTTP monitor, the system generates a JSON configuration like this:
{
"url": "https://mysite.com/health",
"method": "GET",
"expectedStatus": 200,
"timeoutMs": 10000,
"warningTimeMs": 3000
}
How to read this:
url— the address being checkedmethod— the type of HTTP request (GET = just fetch the page)expectedStatus— the system expects HTTP status 200 (meaning "OK")timeoutMs— if no response in 10,000 milliseconds (10 seconds), the check failswarningTimeMs— if the response takes more than 3,000 ms (3 seconds), it's a warning (yellow)
How Status is Determined
| Condition | Status |
|---|---|
| Response received, correct status code, fast response | 🟢 Green |
| Response received, correct status code, but slow (> warningTimeMs) | 🟡 Yellow |
| Wrong status code, timeout, or connection error | 🔴 Red |
SSL Monitor
What it does: Checks the SSL/TLS certificate of a domain and reports how many days until it expires.
When to use: To get an early warning before your SSL certificate expires (which would break HTTPS on your site).
Settings
| Field | Required | Description |
|---|---|---|
| Host | Yes | Domain name, e.g., mysite.com (no https://) |
| Port | No | Port number. Default: 443 |
| Warning Days | No | Yellow status if certificate expires within this many days. Default: 30 |
| Critical Days | No | Red status if certificate expires within this many days. Default: 7 |
Example Configuration
{
"host": "mysite.com",
"port": 443,
"warningDays": 30,
"criticalDays": 7
}
How to read this:
host— the domain whose certificate is being checkedport— standard HTTPS port (443)warningDays— if the certificate expires in less than 30 days, status goes yellowcriticalDays— if it expires in less than 7 days, status goes red
How Status is Determined
| Condition | Status |
|---|---|
| Certificate valid for more than 30 days | 🟢 Green |
| Certificate expires in 8–30 days | 🟡 Yellow |
| Certificate expires in 7 days or less | 🔴 Red |
| Certificate already expired or unreachable | 🔴 Red |
Database Monitor
What it does: Connects to a PostgreSQL database, runs a SQL query, and checks if it completes successfully and how fast.
When to use: To make sure your database is alive and responding within acceptable time.
Settings
| Field | Required | Description |
|---|---|---|
| Connection String | Yes | PostgreSQL connection URL |
| Query | No | SQL query to run. Default: SELECT 1 |
| Warning Threshold | No | Yellow if query takes longer (ms). Default: 1000 |
| Critical Threshold | No | Red if query takes longer (ms). Default: 5000 |
Example Configuration
{
"connectionString": "postgresql://user:password@host:5432/mydb",
"query": "SELECT 1",
"warningThresholdMs": 1000,
"criticalThresholdMs": 5000
}
How to read this:
connectionString— the database address with credentialsquery— a simple query to test the connection (SELECT 1just checks if the database responds)warningThresholdMs— if the query takes more than 1 second, it's a warningcriticalThresholdMs— if it takes more than 5 seconds, it's critical
Security note: Your connection string contains a password. It's stored encrypted on our server and never exposed through the API.
How Status is Determined
| Condition | Status |
|---|---|
| Query succeeds in under 1 second | 🟢 Green |
| Query succeeds but takes 1–5 seconds | 🟡 Yellow |
| Query takes more than 5 seconds or fails | 🔴 Red |
Integration Monitor
What it does: Compares data between two systems (files in JSON or XLSX format) to verify they match.
When to use: When you need to verify that data in one system (e.g., an ERP) matches data in another system (e.g., a CRM). Commonly used for employee counts, order totals, inventory levels.
Example Configuration
{
"sourceFile": "employees.json",
"sourceFormat": "json",
"sourceRootKey": "employees",
"targetFile": "users.xlsx",
"targetFormat": "xlsx",
"rules": [
{
"name": "Active users count",
"type": "count_match",
"sourceFilter": { "employmentStatus": "active" },
"targetFilter": { "status": "active" }
}
]
}
How to read this:
sourceFile/targetFile— the two files being comparedsourceFormat/targetFormat— file formats (json or xlsx)sourceRootKey— which key in the JSON contains the data arrayrules— comparison rules:name— a label for this ruletype— what to compare (count_match= check if counts are equal)sourceFilter/targetFilter— filters to apply before comparing
Common Settings for All Monitors
These settings are available for every monitor type:
| Field | Description |
|---|---|
| Name | A friendly name to identify the monitor (e.g., "Production API") |
| Type | One of: http, ssl, database, integration |
| Interval | How often to run the check, in seconds (e.g., 300 = every 5 minutes) |
| Enabled | Whether the monitor is active (true/false) |
| Critical | If true, a red status on this monitor makes the overall icon red. If false, it only makes it yellow |
| Group | Optional group to organize monitors together |
About the "Critical" Flag
This is an important concept. Imagine you have 10 monitors. If one of them goes red:
- Critical = true → The overall icon in your browser turns red (immediate attention needed)
- Critical = false → The overall icon turns yellow (something is wrong, but it's not critical)
Use "Critical" for your most important services — production servers, payment systems, main databases. Leave it off for less important checks like staging environments or secondary services.