florentchauveau / kamailio_exporter

Prometheus exporter for Kamailio SIP server
MIT License
57 stars 19 forks source link

Problem with dispatcher.list #20

Closed suharik71 closed 3 years ago

suharik71 commented 4 years ago

Hi, I found such a problem. when disptacher.list is flat

{
    NRSETS: 1
    RECORDS: {
        SET: {
            ID: 10
            TARGETS: {
                DEST: {
                    URI: sip:192.168.63.110:5061
                    FLAGS: AP
                    PRIORITY: 0
                }
            }
        }
    }
}

all ok. but when it has a more advanced format, exporter cannot get data

{
    NRSETS: 1
    RECORDS: {
        SET: {
            ID: 10
            TARGETS: {
                DEST: {
                    URI: sip:192.168.63.110:5061
                    FLAGS: AP
                    PRIORITY: 0
                    LATENCY: {
                        AVG: 2.446000
                        STD: 1.561000
                        EST: 2.454000
                        MAX: 7
                        TIMEOUT: 0
                    }
                }
            }
        }
    }
}

func ReadPacket return null array

cookie dispatcher.list [13 29 104 216] records dispatcher.list [] [] 2020/06/02 18:18:11 [error] type error: type 2 not implemented

florentchauveau commented 4 years ago

Hello,

Which version of kamailio are you using?

suharik71 commented 4 years ago

kamcmd> core.version kamailio 5.2.7 (x86_64/linux) before was kamailio 5.2.6 (x86_64/linux)

scharrua commented 4 years ago

Same here! kamcmd> core.version kamailio 5.1.6

florentchauveau commented 4 years ago

Hello,

That's because of the binrpc lib that does not recognize the format being returned.

I'll work on a patch as soon as possible!

florentchauveau commented 3 years ago

Hi,

This is fixed in release https://github.com/florentchauveau/kamailio_exporter/releases/tag/v0.4.2

Type "double" was not implemented in the binrpc package.

Enjoy!