Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haroonkhan02 opened this issue Nov 12, 2021 · 4 comments
Open

Comments

@haroonkhan02
Copy link

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.

@tainguyenbp
Copy link
Owner

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

@haroonkhan02
Copy link
Author

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

Hello, thanks for replying..

I'm using the asterisk 18.5.1 version.

@yeya
Copy link

yeya commented Nov 22, 2021

I think you should better use the built in module

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

@anadion
Copy link

anadion commented Dec 3, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants