Launch a script on errors in freeswitch log file
Hi, How can i launch a script when there are error logs in freeswitch log file. Actually i am using mod_shout as MOH with mod_local_stream, when someone enters a url of stream that is not responding i see logs all these. 2015-01-09 19:38:39.338003 [ERR] mod_local_stream.c:214 Can't open shout:// 174.37.194.139:8316 2015-01-09 19:38:41.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [174.37.194.139:8316]! 2015-01-09 19:38:42.337988 [ERR] mod_local_stream.c:214 Can't open shout:// s9.voscast.com:7584 2015-01-09 19:38:42.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [s9.voscast.com:7584]! I want to run an external script to remove that file or urls when there are errors logs in freeswitch. But i don't know how to trigger that script on errors in freeswitch log. Any help would be much appreciated. Thanks.
You could just tail the log file and grab what you need... On Jan 9, 2015 3:56 PM, "Aqs Younas" <aqsyounas@gmail.com> wrote:
Hi,
How can i launch a script when there are error logs in freeswitch log file. Actually i am using mod_shout as MOH with mod_local_stream, when someone enters a url of stream that is not responding i see logs all these.
2015-01-09 19:38:39.338003 [ERR] mod_local_stream.c:214 Can't open shout:// 174.37.194.139:8316 2015-01-09 19:38:41.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [174.37.194.139:8316]! 2015-01-09 19:38:42.337988 [ERR] mod_local_stream.c:214 Can't open shout:// s9.voscast.com:7584 2015-01-09 19:38:42.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [s9.voscast.com:7584]!
I want to run an external script to remove that file or urls when there are errors logs in freeswitch.
But i don't know how to trigger that script on errors in freeswitch log.
Any help would be much appreciated.
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
For what purpose? Monitoring can be done with a number of tools such as logwatch. If you're wanting to remove the lines to save space look at using logrotate to archive/remove old logs. Steve On 9 January 2015 at 14:55, Aqs Younas <aqsyounas@gmail.com> wrote:
Hi,
How can i launch a script when there are error logs in freeswitch log file. Actually i am using mod_shout as MOH with mod_local_stream, when someone enters a url of stream that is not responding i see logs all these.
2015-01-09 19:38:39.338003 [ERR] mod_local_stream.c:214 Can't open shout:// 174.37.194.139:8316 2015-01-09 19:38:41.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [174.37.194.139:8316]! 2015-01-09 19:38:42.337988 [ERR] mod_local_stream.c:214 Can't open shout:// s9.voscast.com:7584 2015-01-09 19:38:42.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [s9.voscast.com:7584]!
I want to run an external script to remove that file or urls when there are errors logs in freeswitch.
But i don't know how to trigger that script on errors in freeswitch log.
Any help would be much appreciated.
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Looks like you don't have mod_shout loaded. On Fri, Jan 9, 2015 at 8:55 AM, Aqs Younas <aqsyounas@gmail.com> wrote:
Hi,
How can i launch a script when there are error logs in freeswitch log file. Actually i am using mod_shout as MOH with mod_local_stream, when someone enters a url of stream that is not responding i see logs all these.
2015-01-09 19:38:39.338003 [ERR] mod_local_stream.c:214 Can't open shout:// 174.37.194.139:8316 2015-01-09 19:38:41.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [174.37.194.139:8316]! 2015-01-09 19:38:42.337988 [ERR] mod_local_stream.c:214 Can't open shout:// s9.voscast.com:7584 2015-01-09 19:38:42.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [s9.voscast.com:7584]!
I want to run an external script to remove that file or urls when there are errors logs in freeswitch.
But i don't know how to trigger that script on errors in freeswitch log.
Any help would be much appreciated.
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
Yup i deliberately have not loaded it. Actually when we add url's which are not mp3(mod_shout supported format) they give us error. As i am using mod_local_stream with it to run it as local stream, any invalid entry in my playlist.loc file will flood my freeswitch with logs. I want to remove that entry by running an external script upon error. Streams url are added by client through some website. And sometime they add invalid stream this gives us error. I manually want to remove that entry. Thanks for your reply. On 10 January 2015 at 00:22, Brian West <brian@freeswitch.org> wrote:
Looks like you don't have mod_shout loaded.
On Fri, Jan 9, 2015 at 8:55 AM, Aqs Younas <aqsyounas@gmail.com> wrote:
Hi,
How can i launch a script when there are error logs in freeswitch log file. Actually i am using mod_shout as MOH with mod_local_stream, when someone enters a url of stream that is not responding i see logs all these.
2015-01-09 19:38:39.338003 [ERR] mod_local_stream.c:214 Can't open shout://174.37.194.139:8316 2015-01-09 19:38:41.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [174.37.194.139:8316]! 2015-01-09 19:38:42.337988 [ERR] mod_local_stream.c:214 Can't open shout://s9.voscast.com:7584 2015-01-09 19:38:42.337988 [ERR] switch_core_file.c:149 Invalid file format [shout] for [s9.voscast.com:7584]!
I want to run an external script to remove that file or urls when there are errors logs in freeswitch.
But i don't know how to trigger that script on errors in freeswitch log.
Any help would be much appreciated.
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Aqs Younas
-
Brian West
-
David Villasmil Govea
-
Steven Ayre