FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
296 views 3 comments
by anonymous

We want to send messages from our own scripts when certain events occur. For managing the recipients, the error reporting page of the WebUI would be very convenient.

Therefore my questions:

  • Is there a way to trigger an event from a script (shell or lua)?
  • Is it possible to add a custom event type?
Regards
Friedbert

1 Answer

0 votes
by anonymous
On my RUT955, running official openwrt, I do such things by using "logread -f | shellscript" (could be LUA as well, of course), which does the filtering of the interesting log messages. To be started in /etc/rc.local (detached process, of course).

Similar should be possible in RutOS as well.
by anonymous

Hello Augustus,
thank you for your answer. Unfortunately, your suggestion does not fit my requirements.
I am not interested in reacting to any system events. Also sending mails is not my problem.
My goal is to trigger custom events in my scripts. On such an event, messages (email or SMS) should be sent to a group of recipients. But this group is unknown yet and can change relatively often. Therefore, there should be a convenient, simple interface to manage the group of recipients. And this is where the WebUI of the new RutOS comes into the game. There you can manage these recipient groups.
A custom event would be nice - but is not necessary for my case. Since my installations are stationary mounted, the GPS events are not relevant for me. So I could misuse one of the GPS events for my application.
So the only thing missing is the possibility to trigger one of these events from my scripts.

Regards
Friedbert

by anonymous

Just just I saw, that Error Reporting was already available with the legacy WebUI.

Friedbert

by anonymous

Hello,

Apologize for a late answer.
As you mentioned, in RutOS 7, there are function called "Event Reporting".
With it in the webUI user easily could configure in what condition it must receive SMS or email.
Custom event in this could be added, by editing /etc/config/event_reporting file.
Hope it helps.

Best regards,

Sigitas K.