asterisk_exporter
asterisk_exporter copied to clipboard
active calls don't return the value instead returns SIP/SBCTrunk
Hello Nguyễn, It's a great code and its working fine but when I try to get the active calls count it just returns the below line for 'asterisk_total_active_calls_metric' .
" asterisk_total_active_calls_metric{host="MS1",type="active calls"} SIP/SBCTrunk-0050763 "
It returns two values for this metric and we need one. so maybe that's the issue.
PS: I'm very naive in the topic so any help would be appreciated!
Thanks.
Hello @haroonkhan02 , What version of asterisk did you use?
Hello @haroonkhan02 , What version of asterisk did you use?
Hello, thanks for replying..
I'm using the asterisk 18.5.1 version.
I think you should better use the built in module
https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Configuration_res_prometheus
It's looks like a mistake at asterisk_exporter.py at lines 109-110 Replace: active_channels > system_uptime active_calls > last_reload
- asterisk_system_uptime_seconds_metric.set({'type': "system uptime seconds", }, active_channels)
- asterisk_last_reload_seconds_metric.set({'type': "last reload seconds", }, active_calls)
+ asterisk_system_uptime_seconds_metric.set({'type': "system_uptime_seconds", }, system_uptime)
+ asterisk_last_reload_seconds_metric.set({'type': "last_reload_seconds", }, last_reload)