The generation of an API Builder applications is a simple process with the help of the API Builder CLI tool.
Some of the users might want to run APP and using B.I tool, so it can exports Logs into 3rd party DS (data store).
This is a document specially created to show you how to run API Builder application and export Logs.
Here are the technical requirements for being able to scaffold and run API Builder Application and export Logs into B.I tool.
Tools to be installed in advance:
- Install the API Builder Command Line Interface (CLI) globally using
npm
. It is a node module published in npm public repository, please find additional information on official API Builder Getting Started Guide.
[sudo] npm install -g @axway/api-builder
- Docker - The installation of Docker depends on the specific operating system, please read the details on the following page Read the official guide for Docker installation. Research for the B.I tools and 3rd party data store i.e. Splunk, Elastic etc.
Once you have scaffold and run API Builder Service and build Service Docker Image, you are ready to start Service integration with Splunk. We will setup splunk with basic definitions on local environment.
docker pull splunk/splunk
Check the splunk image as follow:
docker images | grep splunk
docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" -p "8088:8088" splunk/splunk
Then please visit https://localhost:8000 and see that splunk server is up. Then go to Settings -> Data inputs -> HTTP Event Collector -> Add new. Type name and select Next button. At the final step you will find secessfully generated Token. Copy and save the Token.
Then navigate to Settings/Data inputs/HTTP Event Collector and you will reach your docker logs. Click to Global settings button and Enable button and will find HTTP Port Number. After that click to the docker logs edit button and leave everything with the default settings.
Once you have runed the splunk container, settup everything in the Splunk Web you are ready to run the application container via Splunk. Please use the below command:
docker run -d -p 8080:8080 --log-driver=splunk --log-opt splunk-url=http://10.134.9.42:8088 --log-opt splunk-token=4ef9ad35-37a5-4e7c-baab-90fa063e21a3 --log-opt splunk-insecureskipverify=true demo-img
If everything works correctly will receive automatically all aplication logs in the Splunk Web