Ad Widget

Collapse

jabber message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amcorreia
    Member
    • Mar 2006
    • 73

    #1

    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
    Attached Files
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,
    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.
    Unofficial Zabbix Developer

    Comment

    • amcorreia
      Member
      • Mar 2006
      • 73

      #3
      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

      Comment

      • James Wells
        Senior Member
        • Jun 2005
        • 664

        #4
        Sweet. Thank you.

        Now to go add it to my server.
        Unofficial Zabbix Developer

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          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
          New York | Tokyo | Riga
          My Twitter

          Comment

          • James Wells
            Senior Member
            • Jun 2005
            • 664

            #6
            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.
            Unofficial Zabbix Developer

            Comment

            • Alexei
              Founder, CEO
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2004
              • 5654

              #7
              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
              New York | Tokyo | Riga
              My Twitter

              Comment

              • James Wells
                Senior Member
                • Jun 2005
                • 664

                #8
                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.
                Unofficial Zabbix Developer

                Comment

                • amcorreia
                  Member
                  • Mar 2006
                  • 73

                  #9
                  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

                  Comment

                  • Harris
                    Junior Member
                    • Jan 2007
                    • 24

                    #10
                    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

                    Comment

                    • James Wells
                      Senior Member
                      • Jun 2005
                      • 664

                      #11
                      Alexei, please tell me this feature is going into 1.4. We are not using Jabber yet, but it was just added to my list of things and this feature will be a requirement shortly after we migrate to Zabbix 1.4.
                      Unofficial Zabbix Developer

                      Comment

                      • Alexei
                        Founder, CEO
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Sep 2004
                        • 5654

                        #12
                        I do confirm that the feature is going into 1.4. Actually it is already developed though we are doing serious testing tomorrow
                        Alexei Vladishev
                        Creator of Zabbix, Product manager
                        New York | Tokyo | Riga
                        My Twitter

                        Comment

                        • Harris
                          Junior Member
                          • Jan 2007
                          • 24

                          #13
                          Originally posted by Alexei
                          I do confirm that the feature is going into 1.4. Actually it is already developed though we are doing serious testing tomorrow
                          This sounds so good

                          Comment

                          Working...