It looks like the Ruby is not parsing the returned data array correctly. I found out how to access MI datagrams directly from the command line and this is showing the correct information.

R



On 18/01/2017 13:28, Richard Robson wrote:
Hi,


I'm using ruby to pull profile counts from opensips datagrams to push into influxdb (adapted from Rik Broers presentation at the sumit)

If I run the fifo command at the command line I get different data than running the ruby script via the datagram interface

influxdb = InfluxDB::Client.new udp: {host: '192.168.36.152', port: 8125}

cprofiles = opensips.profile_get_values ('customer')

FIFO

value:: 0069 count=2
value:: 0079 count=41
value:: 0018 count=25
value:: 0016 count=8
value:: 0026 count=13
value:: 0066 count=8
value:: 0076 count=1
value:: 0017 count=4
value:: <null> count=13
value:: 0064 count=6
value:: 0065 count=9
value:: 0012 count=63
value:: 0072 count=1
value:: 0063 count=2
value:: 0060 count=15
value:: 0021 count=3
value:: 0061 count=38
value:: 0080 count=1
value:: 2099 count=10
value:: 4199 count=1


MI


"value:: 0069 count=2",
"value:: 0079 count=36",
"value:: 0018 count=32",
"value:: 0016 count=9",
"value:: 0026 count=15",
"value:: 0066 count=8",
"value:: 0076 count=1",
"value:: 0017 count=4",
"value:: <null> count=14",
"value:: 0064 count=6",
"value:: 0065 count=9",
"value:: 0012 count=69",
"value:: 0063 count=2",
"value:: 0060 count=20",
"value:: 0021 count=3",
"value:: 0061 count=37",
"value:: 0080 count=1",
"value:: 2099 count=11"

apparet from the counts being different, which you would expect on live data the MI is missing the 4199 ( a call was in progress for this profile) and the 0072 value.

Now this is either a bug in the MI or in the Ruby gem. I just don't know which. Would there be a simple script I can run to test the MI interface against the fifo interface?
If this is OK then I'll bug report the ruby gem.

Regards,



--
Richard Robson
Greenlight Support
01382 843843
[email protected]


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

Reply via email to