Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudfoundry/blackbox
Forward logs from files on windows and linux.
https://github.com/cloudfoundry/blackbox
file-forwarding logging syslog
Last synced: 3 months ago
JSON representation
Forward logs from files on windows and linux.
- Host: GitHub
- URL: https://github.com/cloudfoundry/blackbox
- Owner: cloudfoundry
- License: apache-2.0
- Created: 2018-03-27T15:23:31.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T12:57:06.000Z (10 months ago)
- Last Synced: 2024-04-22T14:02:45.849Z (10 months ago)
- Topics: file-forwarding, logging, syslog
- Language: Go
- Homepage:
- Size: 6.23 MB
- Stars: 5
- Watchers: 19
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# blackbox
If you have any questions, or want to get attention for a PR or issue please reach out on the [#logging-and-metrics channel in the cloudfoundry slack](https://cloudfoundry.slack.com/archives/CUW93AF3M)## About
Blackbox will tail all files in sub-directories of a specified `source_dir`, and forward any new lines to a syslog server.This is currently used in [syslog-release][syslog] and [windows-syslog-release][windows-syslog].
## Usage```
blackbox -config config.yml
```The configuration file schema is as follows:
``` yaml
hostname: this-hostsyslog:
destination:
transport: udp
address: logs.example.com:1234source_dir: /path/to/log-dir
log_filename: false
```Consider the case where `log-dir` has the following structure:
```
/path/to/log-dir
|-- app1
| |-- stdout.log
| `-- stderr.log
`-- app2
|-- foo.log
`-- bar.log
```Any new lines written to `app1/stdout.log` and `app1/stderr.log` get sent to syslog tagged as `app1`, while new lines written to `app2/foo.log` and `app2/bar.log` get sent to syslog tagged as `app2`.
If `log_filename` is set to `true` then the filename is included in the tag. For example, new lines written to `app1/stdout.log` get sent to syslog tagged as `app1/stdout.log`.
Currently the priority and facility are hardcoded to `INFO` and `user`.
## Installation
```
go get -u code.cloudfoundry.org/blackbox/cmd/blackbox
```[windows-syslog]: https://github.com/cloudfoundry/windows-syslog-release
[syslog]: https://github.com/cloudfoundry/syslog-release