scheduled concurrent call reporting

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

scheduled concurrent call reporting

Khalil Khamlichi
Hi,

I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.

After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 

CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block

Any alternative solutions ?

Thanks in advance.

kkh

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Khalil Khamlichi
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email]> wrote:
Hi,

I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.

After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 

CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block

Any alternative solutions ?

Thanks in advance.

kkh


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Răzvan Crainea-2
Hello, Khalil!

You could check the $stat(active_dialogs) pvar, which will return the
number of ongoing dialogs.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 01/24/2017 01:05 AM, Khalil Khamlichi wrote:

> the idea is that I don't need to get the number of calls 30 times per
> second which would happens if I save to redis on each invite. scheduling
> the saving to redis every 10 seconds serves  well my purpose but the
> timer_route doesn't seem to accept get_profile_size()
>
> any hints would be appreciated.
>
> On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I am trying to get call load information out of opensips at regular
>     intervals to get some sort of realtime view of the load on the server.
>
>     After applying profiles on the the INVITEs, I have tried to call
>     get_profile_size from a timer_route.
>     I am getting error :
>
>     CRITICAL:core:yyerror: parse error in config file
>     /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39:
>     Command cannot be used in the block
>
>     Any alternative solutions ?
>
>     Thanks in advance.
>
>     kkh
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Khalil Khamlichi
Hi Răzvan, would $stat(active_dialogs) give detailed stats ? I mean for each label I put on the calls ? example if I am labeling by IP would I get from $stat(active_dialogs) stats by label ?

On Tue, Jan 24, 2017 at 8:38 AM, Răzvan Crainea <[hidden email]> wrote:
Hello, Khalil!

You could check the $stat(active_dialogs) pvar, which will return the number of ongoing dialogs.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 01/24/2017 01:05 AM, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per
second which would happens if I save to redis on each invite. scheduling
the saving to redis every 10 seconds serves  well my purpose but the
timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi
<[hidden email] <mailto:[hidden email]>> wrote:

    Hi,

    I am trying to get call load information out of opensips at regular
    intervals to get some sort of realtime view of the load on the server.

    After applying profiles on the the INVITEs, I have tried to call
    get_profile_size from a timer_route.
    I am getting error :

    CRITICAL:core:yyerror: parse error in config file
    /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39:
    Command cannot be used in the block

    Any alternative solutions ?

    Thanks in advance.

    kkh




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Khalil Khamlichi
I looked up at the docs, $stat(active_dialogs)  is for the whole system,
If there is no way to call get_profile_size() automatically from whithin opensips I will need to fall back to MI fifo from an external script.

On Tue, Jan 24, 2017 at 8:49 AM, Khalil Khamlichi <[hidden email]> wrote:
Hi Răzvan, would $stat(active_dialogs) give detailed stats ? I mean for each label I put on the calls ? example if I am labeling by IP would I get from $stat(active_dialogs) stats by label ?

On Tue, Jan 24, 2017 at 8:38 AM, Răzvan Crainea <[hidden email]> wrote:
Hello, Khalil!

You could check the $stat(active_dialogs) pvar, which will return the number of ongoing dialogs.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 01/24/2017 01:05 AM, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per
second which would happens if I save to redis on each invite. scheduling
the saving to redis every 10 seconds serves  well my purpose but the
timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi
<[hidden email] <mailto:[hidden email]>> wrote:

    Hi,

    I am trying to get call load information out of opensips at regular
    intervals to get some sort of realtime view of the load on the server.

    After applying profiles on the the INVITEs, I have tried to call
    get_profile_size from a timer_route.
    I am getting error :

    CRITICAL:core:yyerror: parse error in config file
    /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39:
    Command cannot be used in the block

    Any alternative solutions ?

    Thanks in advance.

    kkh




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Liviu Chircu
In reply to this post by Khalil Khamlichi

I do not see any problems with calling "get_profile_size()" from timer routes, event routes, etc. As such, you can safely bypass the block restriction using the following example:

route [get_prof_sz_inboundCalls] {
    get_profile_size("inboundCalls",,"$var(size)");
}

route [get_prof_sz_outboundCalls] {
    get_profile_size("outboundCalls",,"$
var(size)");
}

timer_route [mytimer, 1]
{
    route(get_prof_sz_inboundCalls);
    xlog("inboundCalls: $
var(size)\n");

    route(get_prof_sz_outboundCalls);
    xlog("outboundCalls: $
var(size)\n");
}

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 24.01.2017 01:05, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email]> wrote:
Hi,

I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.

After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 

CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block

Any alternative solutions ?

Thanks in advance.

kkh



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Khalil Khamlichi
Liviu, you just saved my day. my plan is to push information to redis every 10s maybe 5s if need there is, when dashboard is complete I might consider saving the stream of data for plotting and further analysis.


On Wed, Jan 25, 2017 at 11:45 AM, Liviu Chircu <[hidden email]> wrote:

I do not see any problems with calling "get_profile_size()" from timer routes, event routes, etc. As such, you can safely bypass the block restriction using the following example:

route [get_prof_sz_inboundCalls] {
    get_profile_size("inboundCalls",,"$var(size)");
}

route [get_prof_sz_outboundCalls] {
    get_profile_size("outboundCalls",,"$
var(size)");
}

timer_route [mytimer, 1]
{
    route(get_prof_sz_inboundCalls);
    xlog("inboundCalls: $
var(size)\n");

    route(get_prof_sz_outboundCalls);
    xlog("outboundCalls: $
var(size)\n");
}

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 24.01.2017 01:05, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email][hidden email]> wrote:
Hi,

I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.

After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 

CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block

Any alternative solutions ?

Thanks in advance.

kkh



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

basitengr
Khalil, 

Why don't you consider snmpstat module for stats collection from opensips? 


On 25 Jan 2017 17:12, "Khalil Khamlichi" <[hidden email]> wrote:
Liviu, you just saved my day. my plan is to push information to redis every 10s maybe 5s if need there is, when dashboard is complete I might consider saving the stream of data for plotting and further analysis.


On Wed, Jan 25, 2017 at 11:45 AM, Liviu Chircu <[hidden email]> wrote:

I do not see any problems with calling "get_profile_size()" from timer routes, event routes, etc. As such, you can safely bypass the block restriction using the following example:

route [get_prof_sz_inboundCalls] {
    get_profile_size("inboundCalls",,"$var(size)");
}

route [get_prof_sz_outboundCalls] {
    get_profile_size("outboundCalls",,"$
var(size)");
}

timer_route [mytimer, 1]
{
    route(get_prof_sz_inboundCalls);
    xlog("inboundCalls: $
var(size)\n");

    route(get_prof_sz_outboundCalls);
    xlog("outboundCalls: $
var(size)\n");
}

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 24.01.2017 01:05, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email][hidden email]> wrote:
Hi,

I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.

After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 

CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block

Any alternative solutions ?

Thanks in advance.

kkh



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Khalil Khamlichi
snmpstat data seems a little cryptic and difficult to parse, it might be just me, so please tell me about your experience using snmpstat and how easy was it for you to make it useful for your business case ? 

On Wed, Jan 25, 2017 at 9:08 PM, Abdul Basit <[hidden email]> wrote:
Khalil, 

Why don't you consider snmpstat module for stats collection from opensips? 


On 25 Jan 2017 17:12, "Khalil Khamlichi" <[hidden email]> wrote:
Liviu, you just saved my day. my plan is to push information to redis every 10s maybe 5s if need there is, when dashboard is complete I might consider saving the stream of data for plotting and further analysis.


On Wed, Jan 25, 2017 at 11:45 AM, Liviu Chircu <[hidden email]> wrote:

I do not see any problems with calling "get_profile_size()" from timer routes, event routes, etc. As such, you can safely bypass the block restriction using the following example:

route [get_prof_sz_inboundCalls] {
    get_profile_size("inboundCalls",,"$var(size)");
}

route [get_prof_sz_outboundCalls] {
    get_profile_size("outboundCalls",,"$
var(size)");
}

timer_route [mytimer, 1]
{
    route(get_prof_sz_inboundCalls);
    xlog("inboundCalls: $
var(size)\n");

    route(get_prof_sz_outboundCalls);
    xlog("outboundCalls: $
var(size)\n");
}

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 24.01.2017 01:05, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()

any hints would be appreciated.

On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email][hidden email]> wrote:
Hi,

I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.

After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 

CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block

Any alternative solutions ?

Thanks in advance.

kkh



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Bogdan-Andrei Iancu-2
Hi,

You can do get_profile_size via MI interface, see:
    http://www.opensips.org/html/docs/modules/2.2.x/dialog.html#id297085

And you can use xmlrpc, jsonrpc, fifo and more for the MI backend.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 01/26/2017 04:06 PM, Khalil Khamlichi wrote:
snmpstat data seems a little cryptic and difficult to parse, it might be just me, so please tell me about your experience using snmpstat and how easy was it for you to make it useful for your business case ? 

On Wed, Jan 25, 2017 at 9:08 PM, Abdul Basit <[hidden email]> wrote:
Khalil, 

Why don't you consider snmpstat module for stats collection from opensips? 


On 25 Jan 2017 17:12, "Khalil Khamlichi" <[hidden email]> wrote:
Liviu, you just saved my day. my plan is to push information to redis every 10s maybe 5s if need there is, when dashboard is complete I might consider saving the stream of data for plotting and further analysis.


On Wed, Jan 25, 2017 at 11:45 AM, Liviu Chircu <[hidden email]> wrote:

I do not see any problems with calling "get_profile_size()" from timer routes, event routes, etc. As such, you can safely bypass the block restriction using the following example:

route [get_prof_sz_inboundCalls] {
    get_profile_size("inboundCalls",,"$var(size)");
}

route [get_prof_sz_outboundCalls] {
    get_profile_size("outboundCalls",,"$
var(size)");
}

timer_route [mytimer, 1]
{
    route(get_prof_sz_inboundCalls);
    xlog("inboundCalls: $
var(size)\n");

    route(get_prof_sz_outboundCalls);
    xlog("outboundCalls: $
var(size)\n");
}

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 24.01.2017 01:05, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()
any hints would be appreciated.
On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email]> wrote:
Hi,
I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.
After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 
CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block
Any alternative solutions ?
Thanks in advance.
kkh
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: scheduled concurrent call reporting

Khalil Khamlichi
I used Liviu technique, works beautifully, we are getting very clean reliable data right from the core of opensips into redis and from there the world is the limit :) 

On Thu, Jan 26, 2017 at 2:11 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi,

You can do get_profile_size via MI interface, see:
    http://www.opensips.org/html/docs/modules/2.2.x/dialog.html#id297085

And you can use xmlrpc, jsonrpc, fifo and more for the MI backend.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 01/26/2017 04:06 PM, Khalil Khamlichi wrote:
snmpstat data seems a little cryptic and difficult to parse, it might be just me, so please tell me about your experience using snmpstat and how easy was it for you to make it useful for your business case ? 

On Wed, Jan 25, 2017 at 9:08 PM, Abdul Basit <[hidden email]> wrote:
Khalil, 

Why don't you consider snmpstat module for stats collection from opensips? 


On 25 Jan 2017 17:12, "Khalil Khamlichi" <[hidden email]> wrote:
Liviu, you just saved my day. my plan is to push information to redis every 10s maybe 5s if need there is, when dashboard is complete I might consider saving the stream of data for plotting and further analysis.


On Wed, Jan 25, 2017 at 11:45 AM, Liviu Chircu <[hidden email][hidden email]> wrote:

I do not see any problems with calling "get_profile_size()" from timer routes, event routes, etc. As such, you can safely bypass the block restriction using the following example:

route [get_prof_sz_inboundCalls] {
    get_profile_size("inboundCalls",,"$var(size)");
}

route [get_prof_sz_outboundCalls] {
    get_profile_size("outboundCalls",,"$
var(size)");
}

timer_route [mytimer, 1]
{
    route(get_prof_sz_inboundCalls);
    xlog("inboundCalls: $
var(size)\n");

    route(get_prof_sz_outboundCalls);
    xlog("outboundCalls: $
var(size)\n");
}

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 24.01.2017 01:05, Khalil Khamlichi wrote:
the idea is that I don't need to get the number of calls 30 times per second which would happens if I save to redis on each invite. scheduling the saving to redis every 10 seconds serves  well my purpose but the timer_route doesn't seem to accept get_profile_size()
any hints would be appreciated.
On Mon, Jan 23, 2017 at 10:39 PM, Khalil Khamlichi <[hidden email]> wrote:
Hi,
I am trying to get call load information out of opensips at regular intervals to get some sort of realtime view of the load on the server.
After applying profiles on the the INVITEs, I have tried to call get_profile_size from a timer_route.
I am getting error : 
CRITICAL:core:yyerror: parse error in config file /usr/local//etc/opensips/opensips.cfg, line 483, column 38-39: Command cannot be used in the block
Any alternative solutions ?
Thanks in advance.
kkh
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users