Re: [OpenSIPS-Users] Monitoring Mediaproxy
Just counting how many is probably a good solution and very very simple. Thanks =) On Mon, Mar 20, 2017 at 7:00 AM, Carlos Oliva wrote: > Hi Daniel! > > I made a little php script for Nagios some years ago that may help you. > > It is intented to use on opensips machine (where media dispatcher is > running) > > You pass as argument the number of mediaproxy relay machines you expected > to have and it returnks Ok and the list of your relays or error if the > number of relays is not what you expect. > > It's very simple but works well, we've been using it for years. This is > the script: > > > #!/usr/bin/php > $errno=""; > $errstr=""; > $fp=fsockopen('127.0.0.1','25061',$errno,$errstr,'2'); > fputs($fp, "summary\r\n"); > $line = fgets($fp); > fclose($fp); > $decoded=json_decode($line); > $num_relays=0; > $str_salida=""; > foreach($decoded as $relay) > { > if($relay->status=="active") > { > $num_relays++; > $str_salida.=" ".$relay->ip; > } > } > if($num_relays==$argv[1]) > { > echo "OK IPs de Relays RTP: ".$str_salida."\n"; > exit(0); > } > else > { > echo "ERROR faltan Relays. IPs de Relays RTP: ".$str_salida."\n"; > exit(2); > } > > ?> > > Best regards, > > Carlos Oliva > > > > > > > > > > 2017-03-17 18:57 GMT+01:00 Daniel Zanutti : > >> Understood. >> >> Thanks for explanation. >> >> Regards >> >> On Fri, Mar 17, 2017 at 2:47 PM, Dan Pascu wrote: >> >>> >>> On 16 Mar 2017, at 15:58, Daniel Zanutti wrote: >>> >>> > Hi Dan >>> > >>> > This is exactly how I'm monitoring but looking to the dispatcher it's >>> kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, >>> but the status will be on dispatcher machine D. But ok, if it's the only >>> way. >>> >>> The relay doesn't listen for network connections, you cannot connect >>> directly to a relay. A relay will only connect to all configured >>> dispatchers. The dispatcher on the other hand has a control port where you >>> can connect and give commands, including fetching statistics from relays >>> over the connections the relay already established with the dispatcher. >>> >>> -- >>> Dan >>> >>> >>> >>> >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Hi Daniel! I made a little php script for Nagios some years ago that may help you. It is intented to use on opensips machine (where media dispatcher is running) You pass as argument the number of mediaproxy relay machines you expected to have and it returnks Ok and the list of your relays or error if the number of relays is not what you expect. It's very simple but works well, we've been using it for years. This is the script: #!/usr/bin/php status=="active") { $num_relays++; $str_salida.=" ".$relay->ip; } } if($num_relays==$argv[1]) { echo "OK IPs de Relays RTP: ".$str_salida."\n"; exit(0); } else { echo "ERROR faltan Relays. IPs de Relays RTP: ".$str_salida."\n"; exit(2); } ?> Best regards, Carlos Oliva 2017-03-17 18:57 GMT+01:00 Daniel Zanutti : > Understood. > > Thanks for explanation. > > Regards > > On Fri, Mar 17, 2017 at 2:47 PM, Dan Pascu wrote: > >> >> On 16 Mar 2017, at 15:58, Daniel Zanutti wrote: >> >> > Hi Dan >> > >> > This is exactly how I'm monitoring but looking to the dispatcher it's >> kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, >> but the status will be on dispatcher machine D. But ok, if it's the only >> way. >> >> The relay doesn't listen for network connections, you cannot connect >> directly to a relay. A relay will only connect to all configured >> dispatchers. The dispatcher on the other hand has a control port where you >> can connect and give commands, including fetching statistics from relays >> over the connections the relay already established with the dispatcher. >> >> -- >> Dan >> >> >> >> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Understood. Thanks for explanation. Regards On Fri, Mar 17, 2017 at 2:47 PM, Dan Pascu wrote: > > On 16 Mar 2017, at 15:58, Daniel Zanutti wrote: > > > Hi Dan > > > > This is exactly how I'm monitoring but looking to the dispatcher it's > kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, > but the status will be on dispatcher machine D. But ok, if it's the only > way. > > The relay doesn't listen for network connections, you cannot connect > directly to a relay. A relay will only connect to all configured > dispatchers. The dispatcher on the other hand has a control port where you > can connect and give commands, including fetching statistics from relays > over the connections the relay already established with the dispatcher. > > -- > Dan > > > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
On 16 Mar 2017, at 15:58, Daniel Zanutti wrote: > Hi Dan > > This is exactly how I'm monitoring but looking to the dispatcher it's kind > hard on a Nagios like system, because I'm monitoring Relay A, B and C, but > the status will be on dispatcher machine D. But ok, if it's the only way. The relay doesn't listen for network connections, you cannot connect directly to a relay. A relay will only connect to all configured dispatchers. The dispatcher on the other hand has a control port where you can connect and give commands, including fetching statistics from relays over the connections the relay already established with the dispatcher. -- Dan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Use sip option messages On 16 Mar 2017 12:25 AM, "Daniel Zanutti" wrote: > How can this be done? > > Or do you mean SIP options? > > On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq wrote: > >> Send options. >> >> On 15 Mar 2017 11:48 PM, "Daniel Zanutti" >> wrote: >> >>> Hi >>> >>> What's the best way to check if a mediaproxy is running fine? Monit is >>> monitoring PID but how can I check the process has is not frozen? >>> >>> Thanks >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Hi Robert Acording to mediaproxy website: MediaProxy is a media relay for RTP/RTCP and UDP streams that works in tandem with OpenSIPS to provide NAT traversal capability for media streams from SIP user agents located behind NAT. MediaProxy supports ICE negotiation by behaving like a TURN relay candidate and the policy can be controlled from OpenSIPS configuration. Take a look at its website: http://mediaproxy.ag-projects.com/ Regards On Thu, Mar 16, 2017 at 11:22 AM, Mundkowsky, Robert wrote: > Sorry, I don't know much about telephony. > > Curious what I had wrong? > > Is it that only media is sent to Mediaproxy without SIP? > > Robert > > > -Original Message- > From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Dan > Pascu > Sent: Thursday, March 16, 2017 9:41 AM > To: OpenSIPS users mailling list > Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy > > Lol, what?!? > > On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote: > > > SIP Options is used as a “SIP ping”. You likely can have an time event > trigger route that can send one and then based on that disable/enable > accordingly. Hopefully mediaproxy will not respond to the “SIP ping” if > frozen. > > > > Robert > > > > From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of > Daniel Zanutti > > Sent: Wednesday, March 15, 2017 4:55 PM > > To: OpenSIPS users mailling list > > Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy > > > > How can this be done? > > > > Or do you mean SIP options? > > > > On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq > wrote: > > Send options. > > > > On 15 Mar 2017 11:48 PM, "Daniel Zanutti" > wrote: > > Hi > > > > What's the best way to check if a mediaproxy is running fine? Monit is > monitoring PID but how can I check the process has is not frozen? > > > > Thanks > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > > This e-mail and any files transmitted with it may contain privileged or > confidential information. It is solely for use by the individual for whom > it is intended, even if addressed incorrectly. If you received this e-mail > in error, please notify the sender; do not disclose, copy, distribute, or > take any action in reliance on the contents of this information; and delete > it from your system. Any other use of this e-mail is prohibited. > > > > > > Thank you for your compliance. > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -- > Dan > > > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > This e-mail and any files transmitted with it may contain privileged or > confidential information. It is solely for use by the individual for whom > it is intended, even if addressed incorrectly. If you received this e-mail > in error, please notify the sender; do not disclose, copy, distribute, or > take any action in reliance on the contents of this information; and delete > it from your system. Any other use of this e-mail is prohibited. > > > Thank you for your compliance. > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Sorry, I don't know much about telephony. Curious what I had wrong? Is it that only media is sent to Mediaproxy without SIP? Robert -Original Message- From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Dan Pascu Sent: Thursday, March 16, 2017 9:41 AM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy Lol, what?!? On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote: > SIP Options is used as a “SIP ping”. You likely can have an time event > trigger route that can send one and then based on that disable/enable > accordingly. Hopefully mediaproxy will not respond to the “SIP ping” if > frozen. > > Robert > > From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel > Zanutti > Sent: Wednesday, March 15, 2017 4:55 PM > To: OpenSIPS users mailling list > Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy > > How can this be done? > > Or do you mean SIP options? > > On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq wrote: > Send options. > > On 15 Mar 2017 11:48 PM, "Daniel Zanutti" wrote: > Hi > > What's the best way to check if a mediaproxy is running fine? Monit is > monitoring PID but how can I check the process has is not frozen? > > Thanks > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > This e-mail and any files transmitted with it may contain privileged or > confidential information. It is solely for use by the individual for whom it > is intended, even if addressed incorrectly. If you received this e-mail in > error, please notify the sender; do not disclose, copy, distribute, or take > any action in reliance on the contents of this information; and delete it > from your system. Any other use of this e-mail is prohibited. > > > Thank you for your compliance. > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Dan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited. Thank you for your compliance. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Hi Dan This is exactly how I'm monitoring but looking to the dispatcher it's kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, but the status will be on dispatcher machine D. But ok, if it's the only way. Thanks --- "Lol, what?!?" I preferred to drop this =) On Thu, Mar 16, 2017 at 10:41 AM, Dan Pascu wrote: > Lol, what?!? > > On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote: > > > SIP Options is used as a “SIP ping”. You likely can have an time event > trigger route that can send one and then based on that disable/enable > accordingly. Hopefully mediaproxy will not respond to the “SIP ping” if > frozen. > > > > Robert > > > > From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of > Daniel Zanutti > > Sent: Wednesday, March 15, 2017 4:55 PM > > To: OpenSIPS users mailling list > > Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy > > > > How can this be done? > > > > Or do you mean SIP options? > > > > On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq > wrote: > > Send options. > > > > On 15 Mar 2017 11:48 PM, "Daniel Zanutti" > wrote: > > Hi > > > > What's the best way to check if a mediaproxy is running fine? Monit is > monitoring PID but how can I check the process has is not frozen? > > > > Thanks > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > > This e-mail and any files transmitted with it may contain privileged or > confidential information. It is solely for use by the individual for whom > it is intended, even if addressed incorrectly. If you received this e-mail > in error, please notify the sender; do not disclose, copy, distribute, or > take any action in reliance on the contents of this information; and delete > it from your system. Any other use of this e-mail is prohibited. > > > > > > Thank you for your compliance. > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -- > Dan > > > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
If MediaProxy is a SIP endpoint, that would be news to me. -- Alex -- Principal, Evariste Systems LLC (www.evaristesys.com) Sent from my Google Nexus. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Lol, what?!? On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote: > SIP Options is used as a “SIP ping”. You likely can have an time event > trigger route that can send one and then based on that disable/enable > accordingly. Hopefully mediaproxy will not respond to the “SIP ping” if > frozen. > > Robert > > From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel > Zanutti > Sent: Wednesday, March 15, 2017 4:55 PM > To: OpenSIPS users mailling list > Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy > > How can this be done? > > Or do you mean SIP options? > > On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq wrote: > Send options. > > On 15 Mar 2017 11:48 PM, "Daniel Zanutti" wrote: > Hi > > What's the best way to check if a mediaproxy is running fine? Monit is > monitoring PID but how can I check the process has is not frozen? > > Thanks > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > This e-mail and any files transmitted with it may contain privileged or > confidential information. It is solely for use by the individual for whom it > is intended, even if addressed incorrectly. If you received this e-mail in > error, please notify the sender; do not disclose, copy, distribute, or take > any action in reliance on the contents of this information; and delete it > from your system. Any other use of this e-mail is prohibited. > > > Thank you for your compliance. > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Dan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
On 15 Mar 2017, at 22:18, Daniel Zanutti wrote: > Hi > > What's the best way to check if a mediaproxy is running fine? Monit is > monitoring PID but how can I check the process has is not frozen? You can connect to the dispatcher on the control port and issue a statistics command that will fetch statistics from all the connected relays. The sample media sessions web application included with mediaproxy does that to show the active sessions. You can use that or use it as an example of how to do it from a monitoring script. -- Dan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
SIP Options is used as a “SIP ping”. You likely can have an time event trigger route that can send one and then based on that disable/enable accordingly. Hopefully mediaproxy will not respond to the “SIP ping” if frozen. Robert From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel Zanutti Sent: Wednesday, March 15, 2017 4:55 PM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy How can this be done? Or do you mean SIP options? On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq mailto:jo...@democon.be>> wrote: Send options. On 15 Mar 2017 11:48 PM, "Daniel Zanutti" mailto:daniel.zanu...@gmail.com>> wrote: Hi What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen? Thanks ___ Users mailing list Users@lists.opensips.org<mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org<mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited. Thank you for your compliance. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
How can this be done? Or do you mean SIP options? On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq wrote: > Send options. > > On 15 Mar 2017 11:48 PM, "Daniel Zanutti" > wrote: > >> Hi >> >> What's the best way to check if a mediaproxy is running fine? Monit is >> monitoring PID but how can I check the process has is not frozen? >> >> Thanks >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monitoring Mediaproxy
Send options. On 15 Mar 2017 11:48 PM, "Daniel Zanutti" wrote: > Hi > > What's the best way to check if a mediaproxy is running fine? Monit is > monitoring PID but how can I check the process has is not frozen? > > Thanks > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Monitoring Mediaproxy
Hi What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen? Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users