Advertisement
Guest User

Untitled

a guest
Aug 11th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.21 KB | None | 0 0
  1. #############################################################################
  2. # Default syslog-ng.conf file which collects all local logs into a
  3. # single file called /var/log/messages.
  4. #
  5.  
  6. @version: 3.7
  7. @include "scl.conf"
  8.  
  9. @module mod-java
  10.  
  11. destination d_elastic {
  12.   java(
  13.     class_path("/usr/local/lib/syslog-ng/java-modules/elastic.jar:/usr/share/elasticsearch/lib/*.jar:/usr/local/lib/syslog-ng/java-modules/*.jar")
  14.     class_name("org.syslog_ng.elasticsearch.ElasticSearchDestination")
  15.  
  16.     option("index", "syslog-ng_${YEAR}.${MONTH}.${DAY}")
  17.     option("type", "test")
  18.   );
  19. };
  20.  
  21. source s_tls {
  22.         syslog(
  23.                 port(7777)
  24.                 transport("tls")
  25.                 tls(
  26.                    key-file("/usr/local/etc/syslog-ng/key.d/server.key")
  27.                    cert-file("/usr/local/etc/syslog-ng/cert.d/server.crt")
  28.                    peer-verify(optional-untrusted)
  29.                    )
  30.                 );
  31. };
  32.  
  33.  
  34. source s_local {
  35.         system();
  36.         internal();
  37. };
  38.  
  39.  
  40. destination d_local {
  41.         file("/var/log/jacekmessages");
  42. };
  43.  
  44. log {
  45.         source(s_tls);
  46.         source(s_local);
  47.  
  48.         destination(d_local);
  49.         destination(d_elastic);
  50. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement