Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add splunk logging #725

Merged
merged 5 commits into from
Apr 21, 2020
Merged

Add splunk logging #725

merged 5 commits into from
Apr 21, 2020

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Apr 15, 2020

Co-Authored-By: Siegfried Puchbauer siegfried.puchbauer@gmail.com
Signed-off-by: Antoine Toulme antoine@lunar-ocean.com
This adds splunk logging to Besu.

Splunk logging is added as a runtime jar that is pulled from the Spring releases Maven repository.
This PR also removes the Maven repository for the ASF snapshots repository, as no dependencies use this repository at this time.

This change allows users to define Splunk as logger using system properties or environment variables.
This also allows users to change the log level using environment variables if they so choose.

To configure Splunk, you may set the following environment variables:

Name Description Required
LOGGER Must be set to Splunk to activate Splunk logging Yes
HOST Current host. If in a Docker environment, the default value is the docker container ID. Otherwise the default value is localhost. No
SPLUNK_URL URL to the Splunk instance, for example https://localhost:8088 Yes
SPLUNK_TOKEN Authentication token, usually of the form 11111111-1111-1111-1111-111111111111 Yes
SPLUNK_INDEX Index in which logs will be stored. Defaults to besu No
SPLUNK_SOURCE Source of the logs. This may be overridden by the Splunk HTTP Event Collector. Defaults to besu No
SPLUNK_SOURCETYPE Sourcetype of the logs. This may be overridden by the Splunk HTTP Event Collector. Defaults to besu No
SPLUNK_BATCH_SIZE_BYTES Size of a batch in bytes. Defaults to 65536 No
SPLUNK_BATCH_SIZE_COUNT Size of a batch in number of events. Defaults to 1000 No
SPLUNK_BATCH_INTERVAL Interval at which to send batches. Defaults to 500 No
SPLUNK_SKIPTLSVERIFY Whether to check the Splunk instance certificate when sending data. Defaults to false No

Screen Shot 2020-04-14 at 3 45 45 PM

atoulme and others added 3 commits April 15, 2020 10:17
Co-Authored-By: Siegfried Puchbauer <siegfried.puchbauer@gmail.com>
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Copy link
Contributor

@shemnon shemnon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is code in the splunk classes that references Logback. Even thought it is a Maven "provided" library because the symbols will show up in the splunk jar and we wind up shipping the splunk we need to be mindful of their (logback's) license. Good news and bad news. EPL 1.0 or LGPL 2.1. Having any sort of an LGPL dependency requires TSC approval. But, the good news. It is an or dependency, at the licensee's choosing. This needs to be enumerated in check-licenses.gradle that we are opting for the EPL1 license. We are already shipping EPL1 libraries (vertx) so that license will add no new restrictions. We already do this decleration for RocksDB as it is also a GPL or Apache situation. So this needs to be made explicit in check-licenses.gradle.

Once this addition is made I can approve it.

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
@atoulme atoulme requested a review from shemnon April 21, 2020 06:14
@atoulme
Copy link
Contributor Author

atoulme commented Apr 21, 2020

Interesting and noted. Changes have been applied.

@atoulme atoulme merged commit ef5a465 into hyperledger:master Apr 21, 2020
@NicolasMassart
Copy link
Contributor

Hi @atoulme could you contact me to help test and write documentation for this feature please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants