Open ovidiusas opened 3 years ago
Hi, Ovidiu!
Just pushed the code to support these requirements. Any chance you could run a quick test and get some feedback about the output?
Best regards, Răzvan
Everything looks good!
Two small improvement for load.
It seems that for the main proc, we provide a set of separate metrics:
# TYPE opensips_load_load gauge
opensips_load_load 0
# TYPE opensips_load_load1m gauge
opensips_load_load1m 0
# TYPE opensips_load_load10m gauge
opensips_load_load10m 0
It would make sense to integrate them into the other per proc metrics and set the id="0"
, pid set to the real pid and descritption "main proc" or something like that.
This would look like this:
opensips_load_proc_load{id="0",pid="23723",desc="main proc"} 0
opensips_load_proc_load1m{id="0",pid="23723",desc="main proc"} 0
opensips_load_proc_load10m{id="0",pid="23723",desc="main proc"} 0
Next, we have three types of loads: instant, 1m and 10m. One option would be to provide a single metric and add an interval label like duration set to 0, 60 and 600 (that would be the interval in seconds for computed load).
This would translate from:
opensips_load_proc_load{id="1",pid="23724",desc="MI FIFO"} 0
opensips_load_proc_load1m{id="1",pid="23724",desc="MI FIFO"} 0
opensips_load_proc_load10m{id="1",pid="23724",desc="MI FIFO"} 0
into
opensips_load_proc_load{id="1",pid="23724",desc="MI FIFO",interval="0"} 0
opensips_load_proc_load{id="1",pid="23724",desc="MI FIFO",interval="60"} 0
opensips_load_proc_load{id="1",pid="23724",desc="MI FIFO",interval="600"} 0
All of this are small improvements and can be implemented into the next release.
Using prometheus module in the following config:
will generate the following metrics:
It would help a lot to have this metrics generated in the following format:
The
pid
andtype
can be retrieved from the output of the ps mi command.Similar output should be used for the
load:
statistics.