ZABBIX Forums  
  #1  
Old 04-10-2006, 14:33
amcorreia amcorreia is offline
Member
 
Join Date: Mar 2006
Location: Caxias do Sul - RS
Posts: 65
Talking jabber message

Hi,

I write a simple client to send jabber message.
this can be used with zabbix, with a simple shell script or a little patch for zabbix (I write, but...)

need lib iksemel
http://iksemel.jabberstudio.org
Attached Files
File Type: c amc_jabber-0.0.4.c (7.0 KB, 438 views)
Reply With Quote
  #2  
Old 04-10-2006, 19:16
James Wells James Wells is offline
Senior Member
 
Join Date: Jun 2005
Location: Everett, Wa. USA
Posts: 637
Default

Greetings,
Quote:
Originally Posted by amcorreia
I write a simple client to send jabber message.
this can be used with zabbix, with a simple shell script or a little patch for zabbix (I write, but...)
Alessandro, do you mind if I try to make a Zabbix Server patch to add this as a media type? I can't promise I will make it work any time soon, but looking at your code, I should be able to make it work.
Reply With Quote
  #3  
Old 04-10-2006, 19:37
amcorreia amcorreia is offline
Member
 
Join Date: Mar 2006
Location: Caxias do Sul - RS
Posts: 65
Default

Hi,

no, (excuse me, my english is very poor)

I have wrote a patch for this.
I guess with a little shell code this can work fine.
I sending my patch (this patch is for version 1.1.1)
Attached Files
File Type: patch zabbix-1.1.1-jabber.0.0.4-patch.patch (5.8 KB, 371 views)
Reply With Quote
  #4  
Old 04-10-2006, 19:43
James Wells James Wells is offline
Senior Member
 
Join Date: Jun 2005
Location: Everett, Wa. USA
Posts: 637
Default

Sweet. Thank you.

Now to go add it to my server.
Reply With Quote
  #5  
Old 05-10-2006, 07:32
Alexei Alexei is offline
Zabbix developer, product manager
 
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,424
Lightbulb

Wouldn't it be better to fully integrate it into ZABBIX code? I do not think it is a good idea to fork new processes for each Jabber message being sent.
__________________
Alexei Vladishev
Creator of Zabbix, Product manager
Riga, Latvia
My Twitter
Reply With Quote
  #6  
Old 05-10-2006, 16:17
James Wells James Wells is offline
Senior Member
 
Join Date: Jun 2005
Location: Everett, Wa. USA
Posts: 637
Default

Okay, so I had a chance to play with this on my server and as Alexei says, it forks a new process each time the server attempts to send a notification. Not sure about others, but I would prefer to keep a single process / thread connected at all times.

I am going to spend some time this weekend and try to get it fully integrated into the Zabbix Server. The way I would like to use it is that when the Zabbix Server starts up, it spawns an extra thread, which connects to Jabber server / Google Talk server, and sits quietly until it needs to send a notification. This will help cut down on the latency, and eventually allow for more capabilities in the future, such as getting latest data, via Jabber / Google Talk.
Reply With Quote
  #7  
Old 05-10-2006, 16:21
Alexei Alexei is offline
Zabbix developer, product manager
 
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,424
Default

I would implement it in exaclty the same way as email/SMS notifications are. Is there something special about sending jabber messages? If not, then a single function (not a thread or an extra process) might take care of this provided it will time out after some time (5 seconds normally).
__________________
Alexei Vladishev
Creator of Zabbix, Product manager
Riga, Latvia
My Twitter
Reply With Quote
  #8  
Old 05-10-2006, 16:31
James Wells James Wells is offline
Senior Member
 
Join Date: Jun 2005
Location: Everett, Wa. USA
Posts: 637
Default

Quote:
Originally Posted by Alexei
I would implement it in exaclty the same way as email/SMS notifications are. Is there something special about sending jabber messages? If not, then a single function (not a thread or an extra process) might take care of this provided it will time out after some time (5 seconds normally).
Yes and no. To send a Jabber / Google Talk message, you must first log into the IM system, craft an XML which contains the message and destination, and then submit it to the server. The problem though is the log in process can take anywhere from .2ms to 15s, depending on the login auth mechanisms. For example, to log into Google Talk (Which uses the Jabber protocol), you must first connect in clear text to initiate a TLS connection. Once the TLS is initialized, you send an XML message to the server requesting login, the server then sends back another XML message telling you what authentication mechanisms are supported. You then craft a new XML with userid / password along with the service you wish to connect to. Once that completes, you are finally able to send an IM, Google Email (If using Google Talk), voice message, etc.

It's a very powerful system, but almost painfully slow to initiate a connection. Of course, if you are using your own internal Jabber server, the connection time can be reduced, but many people I talk to tend to lock their Jabber down even more than Google Talk does.
Reply With Quote
  #9  
Old 06-10-2006, 18:19
amcorreia amcorreia is offline
Member
 
Join Date: Mar 2006
Location: Caxias do Sul - RS
Posts: 65
Default

I have make any change in source code o zabbix and have full integrated jabber with zabbix.


This don't make fork (improved alexei?), this is a 'persistent' conection, but the roster don't is online, (well, he just send message
Reply With Quote
  #10  
Old 02-02-2007, 01:06
Harris Harris is offline
Junior Member
 
Join Date: Jan 2007
Location: Brazil - Porto Alegre
Posts: 24
Smile

I didnt tested this patch yet, i prefer wait till it becomes an "official" patch or plugin.

But Zabbix sending alerts using jabber is a great idea. nice job amcorreia
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:04.