[JDEV] Loging component

Philippe Raxhon raxhonp at easynet.be
Sun Dec 15 08:38:33 CST 2002


Katz, Dov (Lists/Junk Mail) wrote:

> On that issue, what would be the behavior of <archive> in the event 
> that the accept-style logging component (discussed below) goes down?  
> Would the server spool packets to it, or would it just bounce them and 
> ignore them, etc?

The packets are simply dropped ... and lost.

> Also, does the logging component send all messages destined for the 
> local server only, or even messages originating from users of the 
> local server, but destined for remote servers. I Distinctly recall 
> that it only logs the former, but please refresh my memory.

AFAIK, since it's CC'ing all the messages going through the JSM, it 
should also do the job for messages to/from remote servers

>
> I could probably look this up somewhere but I'm too lazy this morning. 
> Pardon my ignorance.

The link to the mailing-list archive can be found below any jdev mail. 
Lazy on a Sunday morning! You really don't have any excuses ;-)

>
> Thanks
> -Dov
>
> Philippe Raxhon wrote:
>
>> Yes, you can write a component that will log all messages (and more). 
>> It has been discussed on this list before, for more details search 
>> the archive.
>>
>> Here's some information taken from one of this thread.
>>
>>> Philippe Raxhon wrote:
>>>
>>> I now remember another solution. In the jsm section of jabber.xml, 
>>> one can add:
>>> <archive>
>>>  <service>myservice.myhost</service>
>>> <archive>
>>>
>>> given you have defined such a service in the service section of 
>>> jabber.xml, for instance:
>>> <service id ="myservice">
>>>  <host>myservice.myhost>
>>>  <accept>
>>>     <ip>localhost</ip>
>>>     <port>5999</port>
>>>     <secret>secret</secret>
>>>  </accept>
>>> </service>
>>>
>>> The accept component (it can be writen in any language and doesn't 
>>> have to run on the same host) will receive a copy of every message 
>>> sent by the users. The interesting part is that I think it's easy to 
>>> hack the mod_log module to "archive" not only the messages, but also 
>>> the presence or iq.
>>>
>>> Please, correct me if I'm wrong.
>>>
>>> Jean-Louis Seguineau /EXC/TEC wrote:
>>>
>>> Hey,
>>>
>>> That's easy ! And it has nothing to do with whatever language you 
>>> use. It
>>> does it requires to write a JSM module as long as your component is 
>>> only
>>> meant to process the received packets and not interfere with the JSM
>>> processing. This can be applied to build a kind of packet "sniffer" and
>>> allow you to count, record, monitor, etc...
>>>
>>> You just need to declare a service in your jabber.xml so to receive 
>>> a copy
>>> of all packets going through the server.
>>>
>>> <service id="sniffer.myserver">
>>>    <host>myserver</host>
>>>    <host>myjpolld.myserver</host>
>>>    <host>sniffer.myserver</host>
>>> ....
>>>  plus any aother internal JID that you want to monitor
>>>
>>>
>>>    <accept>
>>>        <ip/>
>>>        <port>myport</port>
>>>        <secret>secret</secret>
>>>    </accept>
>>> </service>
>>>
>>> Then the sniffer component will receive a copy of all traffic for the
>>> <host>s. The component can sit on another server as any component can.
>>>
>>> There is no way that I jnow of to separate the packets types before 
>>> they are
>>> sent to the component. But you can either make one component per 
>>> packet type
>>> and filter the input, or make a filter component that in turn direct 
>>> the
>>> right packet type to a specific processor component.
>>>
>>> Hope it helps
>>>
>>> Jean-Louis
>>
>>
>>
>> BTW: in which langage do you want to implement the component part?
>>
>> Cheers
>>
>> Philippe
>>
>> Jonas Zaveckas wrote:
>>
>>> Hello,
>>> I would like to make some facility to log all message traffic 
>>> comming through jabberd server. How can I do this? Can I make some 
>>> server component to do this?
>>>
>>> Thanks,
>>> Jonas Zaveckas
>>>
>>> _______________________________________________
>>> jdev mailing list
>>> jdev at jabber.org
>>> http://mailman.jabber.org/listinfo/jdev
>>>
>>
>>
>>
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> http://mailman.jabber.org/listinfo/jdev
>>
>>
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>






More information about the JDev mailing list