Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bugfender/bugfender-integration-elasticsearch
sample project to copy all Bugfender logs to Elasticsearch
https://github.com/bugfender/bugfender-integration-elasticsearch
Last synced: 2 days ago
JSON representation
sample project to copy all Bugfender logs to Elasticsearch
- Host: GitHub
- URL: https://github.com/bugfender/bugfender-integration-elasticsearch
- Owner: bugfender
- License: bsd-3-clause
- Created: 2021-02-25T10:36:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-17T14:29:13.000Z (over 2 years ago)
- Last Synced: 2024-06-20T08:14:45.456Z (5 months ago)
- Language: Go
- Size: 37.1 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bugfender Integration with Elasticsearch
This sample project shows how to copy in real time all Bugfender logs to an Elasticsearch cluster.
## Usage
```
Usage of ./bugfender-integration-elasticsearch:
-api-url="https://dashboard.bugfender.com": Bugfender API URL (only necessary for on-premises)
-app-id=0: Bugfender app ID (mandatory)
-client-id="": OAuth client ID to connect to Bugfender (mandatory)
-client-secret="": OAuth client secret to connect to Bugfender (mandatory)
-config="": path to config file
-console-output=false: Print logs to console instead of Elasticsearch (for debugging)
-es-index="": Elasticsearch index to write to (default: logs)
-es-nodes="": List of Elasticsearch nodes (multiple nodes can be specified, separated by spaces)
-es-password="": Password to connect to Elasticsearch
-es-username="": Username to connect to Elasticsearch
-insecure-skip-tls-verify=false: Skip TLS certificate verification (insecure)
-retries=10: Number of times to retry on errors before exiting. 0 = never give up.
-state-file="": File to restore and save state, to resume sync (recommended)
-verbose=false: Verbose messages
```A typical example on how to run this tool would be:
```shell
./bugfender-integration-elasticsearch -app-id=1234 -client-id=your_client_id -client-secret=your_client_secret -state-file state.json -es-index logs -es-nodes http://127.0.0.1:9200
```An example Elasticsearch instance can be run with the provided `docker-compose.yml` file.
If you would like to test this tool without an Elasticsearch, you can dump the logs to console:
```shell
./bugfender-integration-elasticsearch -app-id=1234 -client-id=your_client_id -client-secret=your_client_secret -state-file state.json -console-output
```## Building from source
```shell
go get github.com/bugfender/bugfender-integration-elasticsearch
```## Writing integrations with other databases
Integrations with different databases can be written if desired, by implementing the `integration.LogWriter` interface.
An example of such integration is the `pkg/dummy` package, which dumps the received logs to the console.
## Contributing
Contributions to this project are welcome, please feel free to open a pull request.
For bugs, you can open an issue in Github or submit a pull request.
For security vulnerabilities, [contact our security staff](https://support.bugfender.com/en/articles/580923-security-contact).