asterisk_exporter icon indicating copy to clipboard operation
asterisk_exporter copied to clipboard

active calls don't return the value instead returns SIP/SBCTrunk

Open haroonkhan02 opened this issue 3 years ago • 4 comments

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.

haroonkhan02 avatar Nov 12 '21 07:11 haroonkhan02

Hello @haroonkhan02 , What version of asterisk did you use?

tainguyenbp avatar Nov 20 '21 13:11 tainguyenbp

Hello @haroonkhan02 , What version of asterisk did you use?

Hello, thanks for replying..

I'm using the asterisk 18.5.1 version.

haroonkhan02 avatar Nov 22 '21 11:11 haroonkhan02

I think you should better use the built in module

https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Configuration_res_prometheus

yeya avatar Nov 22 '21 13:11 yeya

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)

anadion avatar Dec 03 '21 11:12 anadion