Monitor
The Monitor is a distributed monitoring probe that executes checks, collects performance data, and reports results. Deploy multiple instances across your infrastructure for distributed monitoring.
Overview
| Property | Value |
|---|---|
| Service name | MugnsoftMonitor |
| Default port | 8051 |
| Configuration file | monitor.json |
| Version | v4.0.0 |
| Storage | embedded key-value store (one database per monitor type) |
Service Management
CLI Commands
# Install as service and register with the Webserver
monitor install <webserver_ip>:<port>
# Re-register with the Webserver (e.g., after IP change)
monitor register <webserver_ip>:<port>
# Migrate to a new Webserver (regenerates the certificate, re-registers)
monitor migrate <webserver_ip>:<port> <jwt_token>
# Start / Stop / Restart the service
monitor start
monitor stop
monitor restart
# Run in foreground (Docker or debugging)
monitor run
# Remove the service
monitor uninstall
# Display help
monitor help
During install, the Monitor:
- Creates the directory structure
- Generates RSA key pair and TLS certificates
- Sends a self-registration request to the Webserver
- Uploads its TLS certificate for mTLS verification
Configuration
The monitor.json file is located in the same directory as the executable:
{
"name": "probe1",
"port": "8051",
"webserver": "192.168.1.100:8050",
"integratorEndPoint": "",
"location": "Paris",
"description": "Production monitoring probe",
"logLevel": "info",
"concurrencyLimit": "100",
"dataRetention": "336",
"backupInterval": "24",
"nbDaysBackup": "336",
"autoThreshold": "true"
}
Core Settings
| Field | Description | Default |
|---|---|---|
name |
Unique probe identifier | required |
port |
API listening port | "8051" |
webserver |
Webserver IP:port for registration | required |
integratorEndPoint |
Optional Integrator IP:port for data forwarding | (empty) |
location |
Geographic location label | (empty) |
description |
Probe description | (empty) |
logLevel |
Log level: debug, info, warn, error |
"info" |
concurrencyLimit |
Max concurrent monitor executions | "100" |
dataRetention |
Hours to retain monitoring data | "336" (14 days) |
purgeStatusChangeDataNb |
Max status-change records to keep per monitor | "250" |
backupInterval |
Hours between automatic KV store backups | "24" |
nbDaysBackup |
Hours to keep backup files | "336" |
Browser Configuration (for Web UI / EUM Monitors)
| Field | Description |
|---|---|
chromeBinPath |
Path to Chrome executable |
firefoxBinPath |
Path to Firefox executable |
edgeBinPath |
Path to Edge executable |
chromeVersion |
Chrome version (auto-detected if empty) |
firefoxVersion |
Firefox version (auto-detected if empty) |
edgeVersion |
Edge version (auto-detected if empty) |
Auto-Thresholding
The Monitor can automatically calculate performance thresholds based on historical data using statistical analysis (standard deviation multipliers):
| Field | Description | Default |
|---|---|---|
autoThreshold |
Enable auto-thresholding | "true" |
autoThresholdRange |
Hours of historical data: 24/168/336/672/1344 (1d–56d) |
"24" |
autoThreshCri |
Standard deviation multiplier for Critical | "8" |
autoThreshMaj |
Standard deviation multiplier for Major | "6" |
autoThreshMin |
Standard deviation multiplier for Minor | "4" |
autoThreshTimeout |
Standard deviation multiplier for the execution timeout (timeout = mean + mult * stddev) |
"10" |
autoTransThreshold |
Auto-threshold for individual transaction steps | "false" |
A nightly job (02:00) recomputes thresholds as mean + (multiplier * stddev) over successful executions of enabled monitors only. Ping monitors also get jitter thresholds (jitterThreshCri/Maj/Min). See Monitor Configuration → Auto-Thresholding for the full formula and tuning guidance.
Vault Integration
| Field | Description |
|---|---|
vaultType |
Vault provider: hashicorp, azure, or cyberark |
hashiCorpVaultUrl |
HashiCorp Vault URL |
hashiCorpVaultToken |
HashiCorp Vault access token |
azureKVUrl |
Azure Key Vault URL |
cyberarkConjurUrl |
CyberArk Conjur URL |
Log Rotation
| Field | Description | Default |
|---|---|---|
maxBackups |
Number of rotated log files to keep | "5" |
maxSize |
Maximum log file size in MB | "10" |
maxAge |
Maximum log file age in days | "28" |
logCompress |
Compress rotated logs | "true" |
Directory Structure
<install_dir>/
├── monitor(.exe) # Executable
├── monitor.json # Service configuration
├── config/
│ ├── sec/ # RSA keys for JWT
│ └── ssl/ # TLS certificates for mTLS
├── data/ # Monitor definition files (JSON)
├── dbs/ # embedded key-value databases (one per type)
│ ├── exec.db # Web UI / EUM monitors
│ ├── url.db # HTTP/HTTPS URL monitors
│ ├── api.db # REST API monitors
│ ├── tcp.db # TCP port monitors
│ ├── ping.db # ICMP ping monitors
│ ├── nslookup.db # DNS lookup monitors
│ ├── db.db # Database query monitors
│ ├── sys.db # System metrics monitors
│ ├── snmp.db # SNMP monitors
│ ├── chart.db # Chart/performance data
│ ├── monitor.db # General monitor data
│ ├── metrics.db # Probe self metrics (CPU, memory)
│ ├── host.db # Host inventory data
│ ├── device.db # Device inventory data
│ └── backup/ # Automated backups
├── log/ # Rotated log files
├── scripts/ # Custom scripts for monitors
├── actions/ # Action scripts (notifications, remediation)
├── exec/ # Platform-specific executables (webdrivers)
└── export/ # Data exports
Monitor Types
1. Web UI / EUM (End User Monitoring)
Database: exec.db
Executes multi-step user journeys using Selenium WebDriver. Supports Chrome, Firefox, and Edge browsers.
Capabilities:
- Multi-step transaction recording (via MNS IDE or Selenium IDE)
- Screenshot capture on each step
- Video recording of the entire execution
- HAR (HTTP Archive) file capture
- Individual transaction timing with thresholds
- TOTP (Time-based One-Time Password) support for 2FA (RFC 6238 — 6 digits / 30 s / SHA-1)
- Proxy configuration
- Visual similarity checking
See the dedicated EUM Monitor page for the full specification (TOTP/Okta compatibility, key-vault integration, script functions).
MNS IDE Script Functions:
mnsStartTransaction("Login Page", 30, 5000, 3000); // name, timeout, critical_ms, major_ms
driver.findElement(By.id("username")).sendKeys("user");
driver.findElement(By.id("password")).sendKeys("pass");
driver.findElement(By.id("submit")).click();
2. HTTP/HTTPS URL
Database: url.db
Simple HTTP GET checks with detailed timing metrics.
Metrics collected:
- DNS lookup time
- TCP connection time
- TLS handshake time (with TLS version detection)
- Server processing time
- Content transfer time
- Total response time
- HTTP status code
- Content length
- SSL certificate expiry date
Additional features:
- Response body pattern matching
- Status code validation
- Certificate expiry checking and alerting
3. REST API
Database: api.db
Full API endpoint monitoring with custom HTTP methods, headers, and body.
Supported methods: GET, POST, PUT, DELETE
Features:
- Custom request headers
- Request body configuration
- Response body pattern matching
- Response time measurement
- Status code validation
4. TCP Port
Database: tcp.db
TCP port connectivity checks.
Metrics:
- Connection success/failure
- Connection time
- Destination IP resolution
5. ICMP Ping
Database: ping.db
ICMP Echo Request/Reply for network reachability testing.
Metrics:
- Minimum / Maximum / Average latency
- Jitter (standard deviation)
- Packets sent / received / lost
- Packet loss rate
CAP_NET_RAW capability or root privileges.
6. DNS Lookup (Nslookup)
Database: nslookup.db
DNS resolution monitoring.
Metrics:
- DNS lookup time
- Response validation
7. SNMP
Database: snmp.db
SNMP polling for network device monitoring.
Features:
- SNMP v1/v2c/v3 support
- OID queries with MIB expressions
- Delta calculations between polls
- Expression evaluation on collected values
8. Database Query
Database: db.db
Database connectivity and query execution monitoring.
Supported databases:
- MySQL
- Microsoft SQL Server (MSSQL)
Metrics:
- Query execution time
- Result validation
- Connection time
9. System Metrics
Database: sys.db
Self-monitoring of the probe host.
Metrics:
- CPU usage percentage
- Memory usage
- Disk usage
Scheduling
Each monitor type has its own independent cron scheduler (using robfig/cron/v3). This isolation ensures that a slow monitor type cannot block other types.
Predefined Schedules
| Label | Cron Expression | Description |
|---|---|---|
1MIN |
* * * * * |
Every minute |
5MIN |
*/5 * * * * |
Every 5 minutes |
10MIN |
*/10 * * * * |
Every 10 minutes |
20MIN |
*/20 * * * * |
Every 20 minutes |
30MIN |
*/30 * * * * |
Every 30 minutes |
60MIN |
0 * * * * |
Every hour |
| Custom | Any valid cron | Custom schedule |
Concurrency Control
A global semaphore limits the number of concurrent monitor executions (configurable via concurrencyLimit, default: 100). Each execution acquires a slot before starting and releases it when complete, preventing resource exhaustion on the probe host.
Alerting
The Monitor can send alerts directly without needing an Integrator.
Notification Channels
| Channel | Configuration Fields |
|---|---|
| Email (SMTP) | smtpServerName, smtpPort, smtpUsername, smtpPwd, smtpTLS |
| Slack | slackToken, slackChannel |
| Microsoft Teams | teamsWebhook |
| PagerDuty | pagerDutyAPIKey |
| Custom Script | scriptAction, scriptActionT (script type) |
Alert Triggers
| Setting | Description |
|---|---|
notifyStatus |
Minimum severity to trigger alert (MINOR, MAJOR, CRITICAL) |
notifyAfter |
Number of consecutive failures before first alert |
notifyFor |
Duration to keep alerting after initial trigger |
Custom Actions
Action scripts can be placed in the actions/ directory and configured per monitor. They execute automatically on failure or status change with a configurable timeout.
REST API Endpoints
Authentication
| Method | Path | Description |
|---|---|---|
| POST | /login |
JWT login (user) |
| POST | /loginComponent |
Component login (60-day token) |
| GET | /refresh_token |
Refresh JWT token |
Monitor Management
| Method | Path | Description |
|---|---|---|
| GET | /monitors |
List all monitors |
| POST | /monitor/create |
Create a new EUM monitor |
| POST | /monitor/update/:oldbucket/:oldkey |
Update a monitor |
| GET | /monitor/run/:title/:show |
Execute a monitor on-demand |
| POST | /monitor/kill/:title |
Kill a running monitor |
Data Retrieval
| Method | Path | Description |
|---|---|---|
| GET | /v1/db/:dbname/bucket/:bucket/key/:key |
Get a specific result |
| POST | /monitor/timelineGraph/:key/:startTime/:endTime |
Historical timeline data |
| GET | /monitor/monitorsStatus |
All monitor statuses |
Type-Specific Creation
| Method | Path | Monitor Type |
|---|---|---|
| POST | /url/create |
URL monitor |
| POST | /api/create |
API monitor |
| POST | /tcp/create |
TCP monitor |
| POST | /ping/create |
Ping monitor |
| POST | /nslookup/create |
DNS monitor |
| POST | /db/create |
Database monitor |
| POST | /snmp/create |
SNMP monitor |
| POST | /sys/create |
System monitor |
Configuration
| Method | Path | Description |
|---|---|---|
| GET | /setting |
Get current settings |
| POST | /updateSetting |
Update settings |
| GET | /reloadCertificates |
Reload TLS certificates |
| POST | /checkConnectIntegrators |
Test Integrator connectivity |
Data Storage
Each monitor type stores results in its own embedded key-value database with multiple buckets per monitor:
| Bucket | Content |
|---|---|
STATUS |
Current status (OK/MINOR/MAJOR/CRITICAL/ERROR/DOWN) |
STATUS_CRON |
Last execution timestamp |
STATUS_PERF |
Performance metrics |
STATUS_TRANS |
Transaction timing data |
STATUS_CHANGE |
Status change history |
STATUS_ERROR |
Error messages |
STATUS_HISTALL |
Full historical data |
STATUS_PATTERN |
Pattern matching results |
STATUS_TRANSPATH |
Transaction execution paths |
All timestamps are stored as Unix milliseconds (epoch in ms).
Data is automatically purged based on the dataRetention setting (default: 336 hours / 14 days).
See also
- Monitor Configuration — complete settings reference
- Monitor HTTP API — full API documentation
- Monitor Operations — UI guide for managing monitors
- Platform Overview — how the Monitor fits into the architecture
- Exception Running a Monitor — troubleshooting monitor errors