[Standards] Event Logging over XMPP

Steffen Larsen zooldk at gmail.com
Sun Nov 10 10:18:31 UTC 2013


Hi Bear et al,

Yes I was thinking of the same thing. I’ve done it in a different way now, but using log stash just means to embedded the JSON into the stanza. 
Because I am using logstash/kibana (elastic search, http://www.elasticsearch.org/overview/kibana/) for my customers so that would be straight forward. Maybe a message stanza like this?:

<message to=“logger at mydomain.tld”>
<body>
<json xmlns=“urn:xmpp:json:0>
{
  "@source":"stdin://jvstratusmbp.local/",
 "@type":"stdin",
 "@tags":[],
 "@fields":{},
 "@timestamp":"2012-07-02T05:20:16.092000Z",
 "@source_host":"jvstratusmbp.local",
 "@source_path":"/",
 "@message":"test"
}
</json>
</body>
</message>

or if you do not want to embed it into the body but in a separate container instead:

<message to=“logger at mydomain.tld”>
<body/>
<log>
<json xmlns=“urn:xmpp:json:0>
{
  "@source":"stdin://jvstratusmbp.local/",
 "@type":"stdin",
 "@tags":[],
 "@fields":{},
 "@timestamp":"2012-07-02T05:20:16.092000Z",
 "@source_host":"jvstratusmbp.local",
 "@source_path":"/",
 "@message":"test"
}
</json>
</log>
</message>

In the receiving part (logger at mydomain.tld) it could either be a component or a simple bot, that either appended the embedded json into a file and logstashd would take it, or a component that would queue it directly to rabbitmq which in my example would feed it to logstash/kibana.


I am already using logstash and graphite for my XMPP servers, its nice to have a visual overview and graphs when handling large scale XMPP… Hmmmm maybe I could use that as a topic for FOSDEM?

-Cheers!
/Steffen


On 09 Nov 2013, at 21:20, Mike Taylor <bear at bear.im> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 11/09/2013 03:13 PM, Robert Kosten wrote:
>> Hi, a Lurker here ;-)
>> 
>> I've had the same thought about two years ago as well so I
>> implemented a small Monolog (PHP Logging Library) Handler that sent
>> log messages as both formatted message (for standard chat clients)
>> and a custom stanza for our status board. At the time I thought
>> that pub/sub might actually be better though, because I didn't
>> really want the logger to know who would receive the message...
>> 
>> Sadly that code belongs to a former company and I'm not certain I
>> can remember everything about it (It was a quick'n'dirty
>> solution), otherwise I'd attach it :-P
>> 
>> Regards, Robert Kosten
>> 
>> On 11/09/2013 09:08 PM, Steffen Larsen wrote:
>>> No haven’t seen such a XEP, but I’ve implemented something like
>>> it to be able to remote debug set-top boxes etc. I’ve just did a
>>> dumb implementation based on message stanzas, where the client
>>> can send the log to diff. implementations like console, remote
>>> (xmpp), file etc. with different levels.
>>> 
>>> So I am interested as well. :-)
> 
> 
> I could see this happening by wrapping the "protocol" that Logstash uses.
> 
>>> 
>>> /Steffen
>>> 
>>> On 09 Nov 2013, at 19:30, Matthew Wild <mwild1 at gmail.com> wrote:
>>> 
>>>> On 9 November 2013 18:24, Peter Waher
>>>> <Peter.Waher at clayster.com> wrote:
>>>>> Hello
>>>>> 
>>>>> Is anybody aware of event logging extensions for XMPP? XEP
>>>>> 0163, 207 and 316 all relate to publish/subscript (personal)
>>>>> events as I can see. What I’m looking for is system and
>>>>> network events for system administrators, like Syslog, for
>>>>> instance, but over XMPP.
>>>> 
>>>> No, but I have wished for such a XEP before now. I'd love to
>>>> see a simple one that primarily defines a way to transport log
>>>> messages over XMPP (perhaps re-using syslog semantics).
>>>> 
>>>> Regards, Matthew
>>> 
> 
> 
> - -- 
> 
> bear
> xmpp agitator; ops curmudgeon; generalist
> http://bear.im/about
> http://bear.im/pubkey.txt
> 0A93 9BA7 8203 FCBC 58A9 E8B5 9D1E 0661 8EE5 B4D8
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQIcBAEBAgAGBQJSfpkBAAoJEJ0eBmGO5bTY2n0P/jA+ty1Gusx0utAolJtdEeKh
> 9sr7uOcO/TKr9ZZPPj4XeZOFNF981XPHaaGEF0rmPZa/Y3zn1gIhMHM3hxWAUw6b
> agev8fN3SZ+R3XtE6hlbgE7mMlI94vfaGj7E3yieTx0My2ePNeXrGgFifJa+MKlm
> mJDrfKnshlPaXz71JbpRJTFeqadq65FGKWuAZZHRYtHWJnUO8eWFpjxO/YEE1QaE
> YSwNMjVAVjIMM8S2c4dpmNdPXu2lqv7EU6cd9n2/J9EDomjRokss6nDY5MUwyp0k
> bhJES91KVLzFgSf0HlAIsur0mcfwYGsorccNDG9rr3Q/aat695VdzQWdSuRrmz00
> iiklx8zWA0d8DZvldVmguy+lSJfxgNZGGCdbbNHhyLzQH2tRp8w0QtHhVifLDWYa
> 9mvLCojpLB3fygwn5vsbC/aVi1VVVl+J5bwpRIx/vyd4dA08T7K2M2qHnD1U4w+g
> Vjc2QRjBNTwg4kTZCYV5DvLLK9E8ylcVRWCskd/ppSKGTWk/tUNslUCHYH+cDFMQ
> xpnLfto6bLEC7QMFP309HN+6g8VlCmnpLhRchAlpt4cd5tMm04I/MvfIhvtGJYtS
> +pHNbcVBgp5n8Hj7KNQWZV1Zbtr2Mp/8RWPeeYnLNtblOzR8Ot4iy4KL09l0JTIV
> kmlT9C19uTgl7tVT9PtM
> =FHXf
> -----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20131110/9c2ff318/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4130 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20131110/9c2ff318/attachment.bin>


More information about the Standards mailing list