Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
Merged #2304 into master.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#event-3296066480___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
Thanks Daniel, documentation added to the wiki.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-622961098___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Daniel-Constantin Mierla
OK to merge it. Do not forget to add docs in the core cookbook wiki.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-622938364___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
Right, I realized after doing it. I've pushed the new suggest implementation.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-622852013___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
@grumvalski pushed 1 commit.

9948696fd84605919e6ce6a7106099f1cdd0de98  core: remove stats_name_separator 
from cfg_group_core


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2304/files/3203a6572b874d191c3be61519853005bd5ab056..9948696fd84605919e6ce6a7106099f1cdd0de98
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Daniel-Constantin Mierla
@grumvalski - I think it makes no sense to added to the `cfg_group_core / 
default_core_cfg` structure, because that is for parameters that can be changed 
at runtime. But, imo, this is not set once and actually use only during 
startup, when the stats names are exported.

It can simply be a global variable like `int ksr_tcp_accept_hep3=0;`. It can be 
added to src/core/counters.c and exposed with extern in src/core/globals.h.

The cfg_group_* structures work as a block and making them larger without a 
reason should be avoided.

In the future probably we should create some structures for global attributes 
grouped per purpose, so instead of many individual global variables, there will 
be a few global structure.

As a side node, I would recommend using the `ksr_` prefix for global variables 
in the core, recently I encounter some issues with global variables being cross 
visible between object files, so db_mode of permissions module was inherited by 
usrloc module. Apparently some compilers (or operating systems) build libraries 
with visibility for all symbols, without adding any prefix.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-622762317___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-01 Thread Federico Cabiddu
@grumvalski pushed 1 commit.

3203a6572b874d191c3be61519853005bd5ab056  core: new core parameter 
stats_name_separator


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2304/files/0595795c659f6af586e63837efe56b45808cd735..3203a6572b874d191c3be61519853005bd5ab056
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-30 Thread Daniel-Constantin Mierla
If you want to merge it now, I can add quickly what is needed to have the 
global parameter in the interpreter, as I am familiar with lex/yacc and then 
you can do further adjustments, if you need. Waiting that you do everything is 
more than fine for me, as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-621818736___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-30 Thread Federico Cabiddu
I can find some time in the next days to implement the global param. I'd also 
go for prometheus format by default.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-621800458___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-29 Thread sergey-safarov
my vote is use `Prometheus` format "_".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-621448415___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-29 Thread Daniel-Constantin Mierla
It can be merged. Then I will add the global parm to set this char. The 
question is what to make the default, the old dash/minus `-` (for backwards 
compatibility); or underscore `_`, the new proposal in this PR.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-621437973___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-28 Thread Federico Cabiddu
@grumvalski pushed 2 commits.

4357b5e6be2a71a401e9d53c43e787b9bfcc8ed0  core: define KSR_STATS_NAMESEP for 
stats name separator
0595795c659f6af586e63837efe56b45808cd735  ims_usrloc_pcscf, p_usrloc, usrloc: 
use KSR_STATS_NAMESEP for stats names


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2304/files/2fe0378c3d0596e30d8ec9ea4cb7d828321d2030..0595795c659f6af586e63837efe56b45808cd735
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-28 Thread Federico Cabiddu
@grumvalski pushed 1 commit.

2fe0378c3d0596e30d8ec9ea4cb7d828321d2030  p_usrloc, ims_usrloc_pcscf: change 
"-" for "_" in stats name to be prometheus compliant


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2304/files/ddd277139165f39406832ddd557c2b56b75a7100..2fe0378c3d0596e30d8ec9ea4cb7d828321d2030
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-28 Thread Federico Cabiddu
I've spot the same usage in p_usrloc and ims_usrloc_pcscf modules (they both 
derived from usrloc).
I didn't notice any other module building "derivate" stats (as those), so I'm 
not sure that implementing a global param is worth in this case.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-620522290___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-04-28 Thread Daniel-Constantin Mierla
Have anyone noticed use of `-` instead of `_` in other places/modules? If we do 
it, better doing it for all.

Then wondering if we should do this via some config option (maybe a global 
param) to set the separator char for these stats, so we have a way to let 
people use older name in case this change is going to break their exisiting 
monitoring apps.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2304#issuecomment-620468048___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev