feat: metrics agent for FreeSWITCH and Asterisk nodes
- pulse-lets-go-agent: collects metrics from PBX nodes via ESL (FreeSWITCH) or AMI (Asterisk) - AMI client (raw TCP) for Asterisk Manager Interface - Collector interface: collect, connect, subscribe hangup events, close - FreeSWITCH collector: show channels, max_sessions, idle_cpu - Asterisk collector: CoreShowChannels, CoreSettings - System collector: /proc/loadavg, /proc/stat (CPU idle) - Failure tracker: sliding window for call_failure_rate - NATS publisher: pulse.metrics.<node_id> every 5 seconds - Graceful shutdown, retry logic (5 failures → status=down) - Template configs for UC nodes (Asterisk) and ses-sip (FreeSWITCH)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"node_id": "ses-sip",
|
||||
"type": "freeswitch",
|
||||
"nats_url": "nats://balancer.lan:4222",
|
||||
"interval_sec": 5,
|
||||
"max_calls": 250,
|
||||
"sip_gateway": "sip:ses-pbx.lan:5060",
|
||||
"sip_gateway_auto": false,
|
||||
"failure_window": 1000,
|
||||
"esl": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 8021,
|
||||
"password": "ClueCon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"node_id": "uc06",
|
||||
"type": "asterisk",
|
||||
"nats_url": "nats://balancer.lan:4222",
|
||||
"interval_sec": 5,
|
||||
"max_calls": 150,
|
||||
"sip_gateway": "sip:uc-pbx.lan:5060",
|
||||
"sip_gateway_auto": false,
|
||||
"failure_window": 1000,
|
||||
"ami": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 6154,
|
||||
"username": "admin",
|
||||
"password": "changeme"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user