DX Unified Infrastructure Management

 View Only
  • 1.  LUA script to send SMS through a URL-based service

    Posted Mar 18, 2015 10:26 AM

    hello, I have sms gateway on my network and I need a simple LUA script to send SMS through a URL-based service to call with autoperator profile on nas. Can you please help me writing it? or there are already some example? thank you



  • 2.  Re: LUA script to send SMS through a URL-based service

    Posted Mar 19, 2015 10:34 AM

    I once looked into this and ended up doing it outside NAS / with another script instead. If you want to handle http from LUA, the best bet is to use an external library like socket.http. Also I'd hate to keep NAS threads busy with websites that could be slow to response.

     

    -jon



  • 3.  Re: LUA script to send SMS through a URL-based service

    Posted Mar 19, 2015 01:51 PM

    Same here - not trying to bog down my already busy core.

    We don't have an SMS gateway and rely on third party services for delivery.

    I just wrote a probe/script to kick off when it saw high queues or certain alarms.

     

    You could use an external library or use the os.execute() function to make a cURL statement



  • 4.  Re: LUA script to send SMS through a URL-based service

    Posted Mar 20, 2015 06:12 AM

    Thanks for the reply,

    but I am using the auto-operator profiles on nas and I need to send sms on critical alarm arrival, the only way is through script isnt'it?