litaio / lita

ChatOps for Ruby.
https://www.lita.io
MIT License
1.68k stars 179 forks source link

lita say #15

Closed toothfairy closed 11 years ago

toothfairy commented 11 years ago

is there way to run some kind of "ilta say blah" to use lita from a shell. i'd like to use it to send some notifications from example from monit. If not, i can try to implement that feature, if it's needed

webdestroya commented 11 years ago

You should use an HTTP route. Make an HTTP route that you can send commands to. From that you can have it post messages anywhere.

Take a look at:

They both provide http routes that are used to post messages to channels

toothfairy commented 11 years ago

@webdestroya nice solution, but may be some internal call would be better

jimmycuadra commented 11 years ago

@toothfairy Are you asking for a way to send data to a running Lita process from another process on the same system? If so, I'd like to hear more about what you're trying to do and how you imagine it might work. If the notification is coming from another system over the network, HTTP is your best bet.

toothfairy commented 11 years ago

@jimmycuadra yep i'm talking about interaction inside of the same system. Solution i think about some built-in DRb server or multiple handlers support. dunno tho may be http solution would be much easier

jimmycuadra commented 11 years ago

Monit has some documentation about using HTTP to send notifications to external services: http://mmonit.com/wiki/MMonit/Notification

Unless there is something you find you cannot achieve with HTTP, I think adding another inbound communication mechanism is probably overkill for the moment.