config1.json 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. // The network section covers network configuration :)
  3. "network": {
  4. // A list of downstream servers listening for our messages.
  5. // logstash-forwarder will pick one at random and only switch if
  6. // the selected one appears to be dead or unresponsive
  7. "servers": [ "localhost:5043" ],
  8. // The path to your client ssl certificate (optional)
  9. "ssl certificate": "./logstash-forwarder.crt",
  10. // The path to your client ssl key (optional)
  11. "ssl key": "./logstash-forwarder.key",
  12. // The path to your trusted ssl CA file. This is used
  13. // to authenticate your downstream server.
  14. "ssl ca": "./logstash-forwarder.crt",
  15. // Network timeout in seconds. This is most important for
  16. // logstash-forwarder determining whether to stop waiting for an
  17. // acknowledgement from the downstream server. If an timeout is reached,
  18. // logstash-forwarder will assume the connection or server is bad and
  19. // will connect to a server chosen at random from the servers list.
  20. "timeout": 15
  21. },
  22. // The list of files configurations
  23. "files": [
  24. // An array of hashes. Each hash tells what paths to watch and
  25. // what fields to annotate on events from those paths.
  26. {
  27. "paths": [
  28. // single paths are fine
  29. "/var/log/messages",
  30. // globs are fine too, they will be periodically evaluated
  31. // to see if any new files match the wildcard.
  32. "/var/log/*.log"
  33. ],
  34. // A dictionary of fields to annotate on each event.
  35. "fields": { "type": "syslog" }
  36. }, {
  37. // A path of "-" means stdin.
  38. "paths": [ "-" ],
  39. "fields": { "type": "stdin" }
  40. }, {
  41. "paths": [
  42. "/var/log/apache/httpd-*.log"
  43. ],
  44. "fields": { "type": "apache" },
  45. "dead time": "12h"
  46. }, {
  47. "paths": [
  48. "/var/log/apache/error-*.log"
  49. ],
  50. "fields": { "type": "error" },
  51. "multiline": { "pattern": "^[0-9]{4}", "negate": "true" },
  52. "dead time": "8h32m50s"
  53. }
  54. ]
  55. }