-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.env.example
More file actions
81 lines (73 loc) · 3.3 KB
/
.env.example
File metadata and controls
81 lines (73 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# =====================================================
# NetSapiens Load Generator Configuration
# =====================================================
#
# IMPORTANT: This tool supports two configuration modes:
#
# 1. LEGACY SINGLE-SERVER MODE (this .env file only):
# - Used when servers.json does NOT exist
# - Configure TARGET_SERVER and APIKEY below
# - Run with: node server.js
#
# 2. MULTI-SERVER MODE (servers.json + this .env):
# - Used when servers.json EXISTS
# - Create servers.json from servers.json.example
# - Each server has its own config (SEED, maxDomains, etc.)
# - Run with: node server.js --server <server-id>
# - See MIGRATION.md for full documentation
#
# This .env file is still required in multi-server mode for:
# - Global settings (NDP_SERVERNAME, RESELLER, etc.)
# - Backward compatibility with bash scripts
#
# =====================================================
# -------------------- Target Server (Legacy Mode) --------------------
# NOTE: In multi-server mode, these are overridden by servers.json
TARGET_SERVER="ns-api.com" # Target server for API and SIP requests (legacy mode only)
SAS_SERVER="ns-api.com" # SAS server if using SAS, otherwise same as TARGET_SERVER
APIKEY="nss_xxxxx" # API Key with super user scope (legacy mode only)
SEED=123456 # Random seed for reproducible data (legacy mode only, use servers.json for multi-server)
MAX_DOMAIN=10 # Number of domains to generate (legacy mode only)
PEAK_CPS=10 # Peak calls per second (legacy mode only). Supports decimals like 0.5 for low load
REGISTRATION_PCT=0.5 # Fraction of devices to register: 0.5 = 50%, range 0-1 (legacy mode only)
# -------------------- Global Settings --------------------
# These apply to both legacy and multi-server modes
RESELLER="NetSapiens" # Reseller name for API requests
RECORDING_DIVISER=4 # Recording frequency: 4 = 25% of users get recording (1/4)
NDP_SERVERNAME=core1 # NDP core server name for MAC addresses and UI config
API_DEBUG=0 # API debug logging: 0=off, 1=on
IP_USE_PUBLIC=1 # Use public IP in SDP: 0=private IP, 1=public IP
USE_OPUS=1 # Enable OPUS codec as first option on UAS tests: 0=disable, 1=enable
# -------------------- Prometheus Metrics Server --------------------
# Optional: Configure the metrics server for monitoring SIPp response times
METRICS_PORT=9090 # Port for Prometheus metrics endpoint (default: 9090)
STATS_DIR=./sipp/stats # Directory for SIPp statistics files (default: ./sipp/stats)
UPDATE_INTERVAL=5 # Metrics update interval in seconds (default: 5)
# To start metrics server:
# - Using npm: npm run metrics
# - Direct: node metrics-server.js
# - Script: ./scripts/start-metrics-server.sh start
# Access at: http://localhost:9090/metrics
# -------------------- Multi-Server Mode --------------------
# To enable multi-server mode:
# 1. Copy servers.json.example to servers.json
# 2. Edit servers.json with your server configurations
# 3. Install jq: sudo apt-get install jq (Ubuntu) or brew install jq (macOS)
# 4. Run: node server.js --server <server-id>
#
# Example servers.json structure:
# {
# "servers": [
# {
# "id": "prod1",
# "hostname": "sas1.example.com",
# "apikey": "nss_xxxxx",
# "maxDomains": 50,
# "peakCps": 10,
# "registrationPct": 80,
# "seed": 12345
# }
# ]
# }
#
# See MIGRATION.md for detailed documentation