This is a simple example showing how to run ethlogger in docker-compose alongside a Splunk Enterprise container.
Ethlogger configuration is provided in the form of environment variables in docker-compose.yaml.
- Start docker-compose
$ cd examples/docker-compose-basic
$ docker-compose up -d
-
Wait for all containers to start (typically just a few minutes). You can rely on the output of
docker ps
to see the state of services. To see the logs usedocker logs ethlogger
anddocker logs splunk
. -
Login to Splunk and check out the Splunk App for Ethereum to explore the data ingested by ethlogger. Login using user
admin
and passwordchangeme
and start exploring! The Splunk App for Ethereum has a number of dashboards to help get you started quickly.
Note: if you change the index name please update theethereum_index
macro so the dashboards will populate. -
Create a new index named
metrics
that is ametric
type of index. This will be used to gather monitoring metrics for ethlogger itself. You can create the index by choosing Settings and then Indexes from the menu in Splunk. Once created, check out the Node Health - SC4Ethereum dashboard under theNode Monitoring
menu.
This example is not meant to be used in a production setup. Using the logging driver to log to a container in the same docker-compose stack shouldn't be used in production. Splunk and ethlogger persist data using local volumes and a checkpoints file. If blocks are no longer being ingested, or if you want to change the blockchain you are using, you should clear this state. To start clean, run the following.
$ docker-compose down
$ rm checkpoints.json
$ docker volume prune