Send data from Loki Multiplexer to Axiom
Loki exposes an HTTP API for pushing, querying, and tailing Axiom log data.
Axiom Loki Proxy provides a gateway for you to connect a direct link interface to Axiom via Loki endpoint.
Using the Axiom Loki Proxy, you can ship logs to Axiom via the Loki HTTP API.
Prerequisites#
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to ingest data to the dataset you have created.
Installation#
Install and update using Homebrew#
brew tap axiomhq/tap
brew install axiom-loki-proxy
brew update
brew upgrade axiom-loki-proxyInstall using go get#
go get -u github.com/axiomhq/axiom-loki-proxy/cmd/axiom-loki-proxyInstall from source#
git clone https://github.com/axiomhq/axiom-loki-proxy.git
cd axiom-loki-proxy
make buildRun the Loki-Proxy Docker#
docker pull axiomhq/axiom-loki-proxy:latestConfiguration#
Specify the environmental variables for your Axiom deployment:
AXIOM_URL = AXIOM_DOMAIN
AXIOM_TOKEN = API_TOKENReplace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.
Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.
Run and test#
./axiom-loki-proxyUsing Docker#
docker run -p8080:8080/tcp \
-e=AXIOM_TOKEN=<API_TOKEN> \
axiomhq/axiom-loki-proxy
Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.
For more information on Axiom Loki Proxy and how you can propose bug fix, report issues and submit PRs, see the GitHub repository.