mod_prometheus
mod_prometheus copied to clipboard
freeswitch_registrations_active always growing
It should be a gauge representing FreeSWITCH Active Registrations, but as it is bound to the sofia::register event it gets incremented at each registration renewal from the endpoints, consequently getting much bigger than the real number of registered endpoints.
Yeah. To be honest we probably should change the approach and use 5 some cond sampling of the registration count using the core sql API. I think I left some comments at the top about this.
On Tuesday, 20 September 2016, Humberto Diógenes [email protected] wrote:
It should be a gauge representing FreeSWITCH Active Registrations, but as it is bound to the sofia::register event it gets incremented at each registration renewal from the endpoints, consequently getting much bigger than the real number of registered endpoints.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/moises-silva/mod_prometheus/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AApi2dT_Zjg9WLqxHHpGkrliwJrNSSVCks5qr_eygaJpZM4KBv9p .
Moy
There's a note about counting active sessions, which seems to have a similar problem: mine now are negative (-70 active sessions).
yeah I'm back from vacations, I'll see if I can fix that over the weekend, hang in there
@hdiogenes curious thought, did you reload the module? the only case I can see for going negative is if the module was reloaded while calls were being placed
I reloaded a few times, but now it's linearly decreasing since yesterday, and seems to be doing this by itself. The top graph is freeswitch_sessions, the other one is freeswitch_sessions_active:
@hdiogenes Are you saying the system is idle (e.g no calls being placed) but just keeps going down? how are you placing calls? any chance you can attach to fs_cli and subscribe to CHANNEL_CREATE and CHANNEL_DESTROY and dump just those events?
@moises-silva Yes, that's what's happening. It does that for a few hours and then stops. I've enabled a log and will attach it here when it happens again.
@hdiogenes I made an important fix to the freeswitchrs library this module depends on. If you're still using mod_prometheus you should definitely rebuild it.
I'll be looking at the registrations issue this week as well.
I had a chance to analyze what is going on with the steadily increasing freeswitch_registrations_active
metric. So, I brought up fs_cli
. What I can see is that - for existing registrations - those are just renewed using another sofia::register
event - there is no preceding expiry, which causes a continuously increasing freeswitch_registrations_active
metric in mod_prometheus.
Yeah @ginkel you're absolutely right. I know how to fix it, but just have not had the time to do it :( In general, even for call count, I think the 'realtime' nature of using events does not justify the trouble of keeping it in sync and it'd be better to just poll every 5 sec with the proper core apis to get the current channel and registration counters whenever possible.