Last active
November 25, 2021 17:38
-
-
Save BlackMaria/5532645 to your computer and use it in GitHub Desktop.
An example of using the jabber/xmpp output of Logstash. 1) Here I send messages that are trapped by grep and tagged "warn_me" to the the sorry sod that is on call. 2) If I get an alert from my monitoring system, I dump a list of all urls/systems that have gone from good to !good in the last 15 minutes. ( limit 20 and order by importance ). This …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output { | |
# <SNIP> other outputs <SNIP> | |
# | |
# Ping me if anything is about to explode, or if any important massage pass by | |
# | |
xmpp { | |
tags => 'warn_me' | |
host => "ejabberd.example.io" | |
message => "time='%{@timestamp}', host='%{@source_host}', tags='%{@tags}',path='%{@source_path}', type='%{@type}', field='%{@fields}' message='%{@message}'," | |
password => 'mypasswerd' | |
user => "[email protected]" | |
users =>"[email protected]" | |
} | |
# | |
# periodically send system updates to the ops chat room | |
# | |
xmpp { | |
tags => [ 'updates' ] | |
host => "ejabberd.example.io" | |
message => "'message='%{@message}' time='%{@timestamp}', host='%{@source_host}' , tags='%{@tags}',path='%{@source_path}', type='%{@type}', field='%{@fields}" | |
password => 'mypasswerd' | |
rooms => "[email protected]/logstash" | |
user => "[email protected]" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment