module Loki

Defined in:

client.cr
config.cr
consts.cr
loki-client.cr

Constant Summary

DEFAULT_AUTH_HEADER = "Authorization"
LABEL_VALUES_PATH = "/loki/api/v1/label/%s/values"
LABELS_PATH = "/loki/api/v1/labels"
LOKI_ADDR = ENV["LOKI_ADDR"]? || "http://loki:3100"
LOKI_AUTH_HEADER = ENV["LOKI_AUTH_HEADER"]? || DEFAULT_AUTH_HEADER
LOKI_BEARER_TOKEN = ENV["LOKI_BEARER_TOKEN"]?
LOKI_BEARER_TOKEN_FILE = ENV["LOKI_BEARER_TOKEN_FILE"]?
LOKI_CA_CERT_PATH = ENV["LOKI_CA_CERT_PATH"]?
LOKI_CLIENT_CERT_PATH = ENV["LOKI_CLIENT_CERT_PATH"]?
LOKI_CLIENT_KEY_PATH = ENV["LOKI_CLIENT_KEY_PATH"]?
LOKI_ORG_ID = ENV["LOKI_ORG_ID"]?
LOKI_PASSWORD = ENV["LOKI_PASSWORD"]?
LOKI_QUERY_TAGS = ENV["LOKI_QUERY_TAGS"]?
LOKI_TLS_SKIP_VERIFY = ENV["LOKI_TLS_SKIP_VERIFY"]?.try do |v| v.downcase == "true" end || false
LOKI_USERNAME = ENV["LOKI_USERNAME"]?
QUERY_PATH = "/loki/api/v1/query"
QUERY_RANGE_PATH = "/loki/api/v1/query_range"
SERIES_PATH = "/loki/api/v1/series"
STATS_PATH = "/loki/api/v1/index/stats"
TAIL_PATH = "/loki/api/v1/tail"
USER_AGENT = "crystal-loki-client/#{Loki::VERSION}"
VERSION = {{ (`shards version \"/srv/crystaldoc.info/github-spider-gazelle-crystal-loki-client-main/src\"`).chomp.stringify }}
VOLUME_PATH = "/loki/api/v1/index/volume"
VOLUME_RANGE_PATH = "/loki/api/v1/index/volume_range"