Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:darix:apps
loki
proper-data-directories.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File proper-data-directories.patch of Package loki
Index: loki/cmd/loki/loki-local-config.yaml =================================================================== --- loki.orig/cmd/loki/loki-local-config.yaml +++ loki/cmd/loki/loki-local-config.yaml @@ -8,11 +8,11 @@ server: common: instance_addr: 127.0.0.1 - path_prefix: /tmp/loki + path_prefix: /var/lib/loki storage: filesystem: - chunks_directory: /tmp/loki/chunks - rules_directory: /tmp/loki/rules + chunks_directory: /var/lib/loki/chunks + rules_directory: /var/lib/loki/rules replication_factor: 1 ring: kvstore: Index: loki/docs/sources/operations/storage/filesystem.md =================================================================== --- loki.orig/docs/sources/operations/storage/filesystem.md +++ loki/docs/sources/operations/storage/filesystem.md @@ -13,7 +13,7 @@ Very simply it stores all the objects (c ```yaml storage_config: filesystem: - directory: /tmp/loki/ + directory: /var/lib/loki/ ``` A folder is created for every tenant all the chunks for one tenant are stored in that directory. Index: loki/clients/cmd/promtail/promtail-cloudflare.yaml =================================================================== --- loki.orig/clients/cmd/promtail/promtail-cloudflare.yaml +++ loki/clients/cmd/promtail/promtail-cloudflare.yaml @@ -3,7 +3,7 @@ server: grpc_listen_port: 0 positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml clients: - url: http://localhost:3100/loki/api/v1/push Index: loki/clients/cmd/promtail/promtail-docker-config.yaml =================================================================== --- loki.orig/clients/cmd/promtail/promtail-docker-config.yaml +++ loki/clients/cmd/promtail/promtail-docker-config.yaml @@ -3,7 +3,7 @@ server: grpc_listen_port: 0 positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml clients: - url: http://loki:3100/loki/api/v1/push Index: loki/clients/cmd/promtail/promtail-local-config.yaml =================================================================== --- loki.orig/clients/cmd/promtail/promtail-local-config.yaml +++ loki/clients/cmd/promtail/promtail-local-config.yaml @@ -3,7 +3,7 @@ server: grpc_listen_port: 0 positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml clients: - url: http://localhost:3100/loki/api/v1/push Index: loki/clients/cmd/promtail/promtail-local-limit-config.yaml =================================================================== --- loki.orig/clients/cmd/promtail/promtail-local-limit-config.yaml +++ loki/clients/cmd/promtail/promtail-local-limit-config.yaml @@ -3,7 +3,7 @@ server: grpc_listen_port: 0 positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml clients: - url: http://localhost:3100/loki/api/v1/push Index: loki/clients/cmd/promtail/promtail-local-pubsub-config.yaml =================================================================== --- loki.orig/clients/cmd/promtail/promtail-local-pubsub-config.yaml +++ loki/clients/cmd/promtail/promtail-local-pubsub-config.yaml @@ -3,7 +3,7 @@ server: grpc_listen_port: 0 positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml clients: - url: http://localhost:3100/loki/api/v1/push Index: loki/operator/internal/manifests/internal/config/build_test.go =================================================================== --- loki.orig/operator/internal/manifests/internal/config/build_test.go +++ loki/operator/internal/manifests/internal/config/build_test.go @@ -40,7 +40,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -164,8 +164,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -297,7 +297,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -421,8 +421,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -723,7 +723,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -875,15 +875,15 @@ ruler: min_backoff: 30ms max_backoff: 100ms wal: - dir: /tmp/wal + dir: /var/lib/loki/wal truncate_frequency: 60m min_age: 5m max_age: 4h - rule_path: /tmp/loki + rule_path: /var/lib/loki storage: type: local local: - directory: /tmp/rules + directory: /var/lib/loki/rules ring: kvstore: store: memberlist @@ -901,8 +901,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -972,7 +972,7 @@ overrides: }, Ruler: Ruler{ Enabled: true, - RulesStorageDirectory: "/tmp/rules", + RulesStorageDirectory: "/var/lib/loki/rules", EvaluationInterval: "1m", PollInterval: "1m", AlertManager: &AlertManagerConfig{ @@ -1081,7 +1081,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -1233,15 +1233,15 @@ ruler: min_backoff: 30ms max_backoff: 100ms wal: - dir: /tmp/wal + dir: /var/lib/loki/wal truncate_frequency: 60m min_age: 5m max_age: 4h - rule_path: /tmp/loki + rule_path: /var/lib/loki storage: type: local local: - directory: /tmp/rules + directory: /var/lib/loki/rules ring: kvstore: store: memberlist @@ -1259,8 +1259,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -1330,7 +1330,7 @@ overrides: }, Ruler: Ruler{ Enabled: true, - RulesStorageDirectory: "/tmp/rules", + RulesStorageDirectory: "/var/lib/loki/rules", EvaluationInterval: "1m", PollInterval: "1m", AlertManager: &AlertManagerConfig{ @@ -1440,7 +1440,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -1605,15 +1605,15 @@ ruler: min_backoff: 30ms max_backoff: 100ms wal: - dir: /tmp/wal + dir: /var/lib/loki/wal truncate_frequency: 60m min_age: 5m max_age: 4h - rule_path: /tmp/loki + rule_path: /var/lib/loki storage: type: local local: - directory: /tmp/rules + directory: /var/lib/loki/rules ring: kvstore: store: memberlist @@ -1631,8 +1631,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -1702,7 +1702,7 @@ overrides: }, Ruler: Ruler{ Enabled: true, - RulesStorageDirectory: "/tmp/rules", + RulesStorageDirectory: "/var/lib/loki/rules", EvaluationInterval: "1m", PollInterval: "1m", AlertManager: &AlertManagerConfig{ @@ -1829,7 +1829,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor retention_enabled: true retention_delete_delay: 4h retention_delete_worker_count: 50 @@ -1962,8 +1962,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -2168,7 +2168,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -2346,15 +2346,15 @@ ruler: min_backoff: 30ms max_backoff: 100ms wal: - dir: /tmp/wal + dir: /var/lib/loki/wal truncate_frequency: 60m min_age: 5m max_age: 4h - rule_path: /tmp/loki + rule_path: /var/lib/loki storage: type: local local: - directory: /tmp/rules + directory: /var/lib/loki/rules ring: kvstore: store: memberlist @@ -2372,8 +2372,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -2443,7 +2443,7 @@ overrides: }, Ruler: Ruler{ Enabled: true, - RulesStorageDirectory: "/tmp/rules", + RulesStorageDirectory: "/var/lib/loki/rules", EvaluationInterval: "1m", PollInterval: "1m", AlertManager: &AlertManagerConfig{ @@ -2586,7 +2586,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 tail_tls_config: @@ -2760,8 +2760,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -2931,7 +2931,7 @@ common: instance_port: 9095 compactor: compaction_interval: 2h - working_directory: /tmp/loki/compactor + working_directory: /var/lib/loki/compactor frontend: tail_proxy_url: http://loki-querier-http-lokistack-dev.default.svc.cluster.local:3100 compress_responses: true @@ -3109,15 +3109,15 @@ ruler: min_backoff: 30ms max_backoff: 100ms wal: - dir: /tmp/wal + dir: /var/lib/loki/wal truncate_frequency: 60m min_age: 5m max_age: 4h - rule_path: /tmp/loki + rule_path: /var/lib/loki storage: type: local local: - directory: /tmp/rules + directory: /var/lib/loki/rules ring: kvstore: store: memberlist @@ -3135,8 +3135,8 @@ server: log_level: info storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/index_cache + active_index_directory: /var/lib/loki/index + cache_location: /var/lib/loki/index_cache cache_ttl: 24h resync_interval: 5m index_gateway_client: @@ -3282,7 +3282,7 @@ overrides: }, Ruler: Ruler{ Enabled: true, - RulesStorageDirectory: "/tmp/rules", + RulesStorageDirectory: "/var/lib/loki/rules", EvaluationInterval: "1m", PollInterval: "1m", Index: loki/clients/pkg/promtail/promtail_test.go =================================================================== --- loki.orig/clients/pkg/promtail/promtail_test.go +++ loki/clients/pkg/promtail/promtail_test.go @@ -55,7 +55,7 @@ func TestPromtail(t *testing.T) { util_log.Logger = logger testutils.InitRandom() - dirName := filepath.Join(os.TempDir(), "/promtail_test_"+testutils.RandName()) + dirName := "/var/lib/promtail_test_" + randName() positionsFileName := dirName + "/positions.yml" err := os.MkdirAll(dirName, 0o750) Index: loki/operator/docs/enhancements/ruler_support.md =================================================================== --- loki.orig/operator/docs/enhancements/ruler_support.md +++ loki/operator/docs/enhancements/ruler_support.md @@ -769,7 +769,7 @@ spec: volumeMounts: - name: "rules" volume: "rules" - path: "/tmp/rules" + path: "/var/lib/loki/rules" volumes: - name: "rules" items: @@ -786,7 +786,7 @@ spec: In turn the rules directory is outlined as such: ``` -/tmp/rules/application/ns-a-alerting-rule-a-kube-uid-a.yaml +/var/lib/loki/rules/application/ns-a-alerting-rule-a-kube-uid-a.yaml /application/ns-a-recording-rule-a-kube-uid-b.yaml /infrastructure/ns-b-alerting-rule-b-kube-uid-c.yaml /infrastructure/ns-b-recording-rule-b-kube-uid-d.yaml Index: loki/pkg/logcli/client/file_test.go =================================================================== --- loki.orig/pkg/logcli/client/file_test.go +++ loki/pkg/logcli/client/file_test.go @@ -20,8 +20,8 @@ func TestFileClient_QueryRangeLogQueries input := []string{ `level=info event="loki started" caller=main.go ts=1625995076`, `level=info event="runtime loader started" caller=main.go ts=1625995077`, - `level=error event="unable to read rules directory" file="/tmp/rules" caller=rules.go ts=1625995090`, - `level=error event="failed to apply wal" error="/tmp/wal/ corrupted" caller=wal.go ts=1625996090`, + `level=error event="unable to read rules directory" file="/var/lib/loki/rules" caller=rules.go ts=1625995090`, + `level=error event="failed to apply wal" error="/var/lib/loki/wal/ corrupted" caller=wal.go ts=1625996090`, `level=info event="loki ready" caller=main.go ts=1625996095`, } @@ -92,8 +92,8 @@ func TestFileClient_Query(t *testing.T) input := []string{ `level=info event="loki started" caller=main.go ts=1625995076`, `level=info event="runtime loader started" caller=main.go ts=1625995077`, - `level=error event="unable to read rules directory" file="/tmp/rules" caller=rules.go ts=1625995090`, - `level=error event="failed to apply wal" error="/tmp/wal/ corrupted" caller=wal.go ts=1625996090`, + `level=error event="unable to read rules directory" file="/var/lib/loki/rules" caller=rules.go ts=1625995090`, + `level=error event="failed to apply wal" error="/var/lib/loki/wal/ corrupted" caller=wal.go ts=1625996090`, `level=info event="loki ready" caller=main.go ts=1625996095`, } Index: loki/pkg/loki/config_wrapper_test.go =================================================================== --- loki.orig/pkg/loki/config_wrapper_test.go +++ loki/pkg/loki/config_wrapper_test.go @@ -561,15 +561,15 @@ memberlist: fsConfig := `common: storage: filesystem: - chunks_directory: /tmp/chunks - rules_directory: /tmp/rules` + chunks_directory: /var/lib/loki/chunks + rules_directory: /var/lib/loki/rules` config, defaults := testContext(fsConfig, nil) assert.Equal(t, "local", config.Ruler.StoreConfig.Type) - assert.Equal(t, "/tmp/rules", config.Ruler.StoreConfig.Local.Directory) - assert.Equal(t, "/tmp/chunks", config.StorageConfig.FSConfig.Directory) + assert.Equal(t, "/var/lib/loki/rules", config.Ruler.StoreConfig.Local.Directory) + assert.Equal(t, "/var/lib/loki/chunks", config.StorageConfig.FSConfig.Directory) // should remain empty assert.EqualValues(t, defaults.Ruler.StoreConfig.GCS, config.Ruler.StoreConfig.GCS) Index: loki/pkg/loki/loki_test.go =================================================================== --- loki.orig/pkg/loki/loki_test.go +++ loki/pkg/loki/loki_test.go @@ -187,7 +187,7 @@ server: grpc_listen_port: %d common: compactor_address: http://localhost:%d - path_prefix: /tmp/loki + path_prefix: /var/lib/loki ring: kvstore: store: inmemory Index: loki/production/ksonnet/loki/config.libsonnet =================================================================== --- loki.orig/production/ksonnet/loki/config.libsonnet +++ loki/production/ksonnet/loki/config.libsonnet @@ -374,7 +374,7 @@ }, ruler: if $._config.ruler_enabled then { - rule_path: '/tmp/rules', + rule_path: '/var/lib/loki/rules', enable_api: true, alertmanager_url: 'http://alertmanager.%s.svc.cluster.local/alertmanager' % $._config.namespace, enable_sharding: true, Index: loki/production/nomad/loki-distributed/config.yml =================================================================== --- loki.orig/production/nomad/loki-distributed/config.yml +++ loki/production/nomad/loki-distributed/config.yml @@ -113,7 +113,7 @@ ruler: enable_alertmanager_v2: true enable_api: true external_url: https://loki-ruler.service.consul - rule_path: {{ env "NOMAD_ALLOC_DIR" }}/tmp/rules + rule_path: {{ env "NOMAD_ALLOC_DIR" }}/var/lib/loki/rules storage: type: local local: Index: loki/production/nomad/loki-simple/config.yml =================================================================== --- loki.orig/production/nomad/loki-simple/config.yml +++ loki/production/nomad/loki-simple/config.yml @@ -64,7 +64,7 @@ ruler: enable_alertmanager_v2: true enable_api: true external_url: https://loki.service.consul - rule_path: {{ env "NOMAD_ALLOC_DIR" }}/tmp/rules + rule_path: {{ env "NOMAD_ALLOC_DIR" }}/var/lib/loki/rules storage: type: local local: Index: loki/production/nomad/loki/config.yml =================================================================== --- loki.orig/production/nomad/loki/config.yml +++ loki/production/nomad/loki/config.yml @@ -64,7 +64,7 @@ ruler: enable_alertmanager_v2: true enable_api: true external_url: https://loki.service.consul - rule_path: {{ env "NOMAD_ALLOC_DIR" }}/tmp/rules + rule_path: {{ env "NOMAD_ALLOC_DIR" }}/var/lib/loki/rules storage: type: local local: Index: loki/clients/cmd/promtail/promtail-journal.yaml =================================================================== --- loki.orig/clients/cmd/promtail/promtail-journal.yaml +++ loki/clients/cmd/promtail/promtail-journal.yaml @@ -3,7 +3,7 @@ server: grpc_listen_port: 0 positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml clients: - url: http://localhost:3100/loki/api/v1/push Index: loki/docs/sources/operations/troubleshooting.md =================================================================== --- loki.orig/docs/sources/operations/troubleshooting.md +++ loki/docs/sources/operations/troubleshooting.md @@ -35,7 +35,7 @@ Promtail yet. There may be one of many r them off. Here is what you can do: - Start Promtail after Loki, e.g., 60 seconds later. - To force Promtail to re-send log messages, delete the positions file - (default location `/tmp/positions.yaml`). + (default location `/var/lib/promtail/positions.yaml`). - Promtail is ignoring targets and isn't reading any logs because of a configuration issue. - This can be detected by turning on debug logging in Promtail and looking Index: loki/examples/promtail-heroku/config.yml =================================================================== --- loki.orig/examples/promtail-heroku/config.yml +++ loki/examples/promtail-heroku/config.yml @@ -4,7 +4,7 @@ server: log_level: "info" positions: - filename: /tmp/positions.yaml + filename: /var/lib/promtail/positions.yaml # This bit indicates what Loki instance to write the logs to. We’ll inject the # details and credentials through environment variables Index: loki/operator/hack/addons_dev.yaml =================================================================== --- loki.orig/operator/hack/addons_dev.yaml +++ loki/operator/hack/addons_dev.yaml @@ -87,7 +87,7 @@ spec: volumeMounts: - mountPath: /etc/promtail name: config - - mountPath: /tmp/promtail + - mountPath: /var/lib/promtail name: run - mountPath: /var/lib/docker/containers name: docker @@ -151,7 +151,7 @@ data: batchwait: 10s timeout: 10s positions: - filename: /tmp/promtail/positions.yaml + filename: /var/lib/promtail/positions.yaml server: http_listen_port: 3100 grpc_listen_port: 9095 Index: loki/operator/hack/addons_ocp.yaml =================================================================== --- loki.orig/operator/hack/addons_ocp.yaml +++ loki/operator/hack/addons_ocp.yaml @@ -84,7 +84,7 @@ spec: volumeMounts: - mountPath: /etc/promtail name: config - - mountPath: /tmp/promtail + - mountPath: /var/lib/promtail name: run - mountPath: /var/lib/docker/containers name: docker @@ -147,7 +147,7 @@ data: batchwait: 10s timeout: 10s positions: - filename: /tmp/promtail/positions.yaml + filename: /var/lib/promtail/positions.yaml server: http_listen_port: 3100 grpc_listen_port: 9095 Index: loki/operator/internal/manifests/var.go =================================================================== --- loki.orig/operator/internal/manifests/var.go +++ loki/operator/internal/manifests/var.go @@ -47,9 +47,9 @@ const ( storageVolumeName = "storage" rulePartsSeparator = "___" - walDirectory = "/tmp/wal" - dataDirectory = "/tmp/loki" - rulesStorageDirectory = "/tmp/rules" + walDirectory = "/var/lib/loki/wal" + dataDirectory = "/var/lib/loki" + rulesStorageDirectory = "/var/lib/loki/rules" rulerContainerName = "loki-ruler" Index: loki/pkg/storage/hack/main.go =================================================================== --- loki.orig/pkg/storage/hack/main.go +++ loki/pkg/storage/hack/main.go @@ -36,7 +36,7 @@ var ( func main() { cm := storage.NewClientMetrics() defer cm.Unregister() - if _, err := os.Stat("/tmp/benchmark/chunks"); os.IsNotExist(err) { + if _, err := os.Stat("/var/lib/loki/benchmark/chunks"); os.IsNotExist(err) { if err := fillStore(cm); err != nil { log.Fatal("error filling up storage:", err) } @@ -45,8 +45,8 @@ func main() { func getStore(cm storage.ClientMetrics) (storage.Store, *config.SchemaConfig, error) { storeConfig := storage.Config{ - BoltDBConfig: local.BoltDBConfig{Directory: "/tmp/benchmark/index"}, - FSConfig: local.FSConfig{Directory: "/tmp/benchmark/chunks"}, + BoltDBConfig: local.BoltDBConfig{Directory: "/var/lib/loki/benchmark/index"}, + FSConfig: local.FSConfig{Directory: "/var/lib/loki/benchmark/chunks"}, } schemaCfg := config.SchemaConfig{ Index: loki/pkg/storage/store_test.go =================================================================== --- loki.orig/pkg/storage/store_test.go +++ loki/pkg/storage/store_test.go @@ -51,7 +51,7 @@ var ( m runtime.MemStats ctx = user.InjectOrgID(context.Background(), "fake") cm = NewClientMetrics() - chunkStore = getLocalStore("/tmp/benchmark/", cm) + chunkStore = getLocalStore("/var/lib/loki/benchmark/", cm) ) // go test -bench=. -benchmem -memprofile memprofile.out -cpuprofile profile.out @@ -105,7 +105,7 @@ func Benchmark_store_SelectLogsBackward( }) } -// rm -Rf /tmp/benchmark/chunks/ /tmp/benchmark/index +// rm -Rf /var/lib/loki/benchmark/chunks/ /var/lib/loki/benchmark/index // go run -mod=vendor ./pkg/storage/hack/main.go // go test -benchmem -run=^$ -mod=vendor ./pkg/storage -bench=Benchmark_store_SelectSample -memprofile memprofile.out -cpuprofile cpuprofile.out func Benchmark_store_SelectSample(b *testing.B) { Index: loki/vendor/github.com/baidubce/bce-sdk-go/util/log/logger.go =================================================================== --- loki.orig/vendor/github.com/baidubce/bce-sdk-go/util/log/logger.go +++ loki/vendor/github.com/baidubce/bce-sdk-go/util/log/logger.go @@ -18,7 +18,7 @@ // log to file with rotating. It is safe to be called by multiple goroutines. // By using the package level function to use the default logger: // log.SetLogHandler(log.STDOUT | log.FILE) // default is log to stdout -// log.SetLogDir("/tmp") // default is /tmp +// log.SetLogDir("/var/lib/loki") // default is /var/lib/loki // log.SetRotateType(log.ROTATE_DAY) // default is log.HOUR // log.SetRotateSize(1 << 30) // default is 1GB // log.SetLogLevel(log.INFO) // default is log.DEBUG @@ -67,7 +67,7 @@ const ( DEFAULT_ROTATE_TYPE = ROTATE_HOUR DEFAULT_ROTATE_SIZE int64 = 1 << 30 - DEFAULT_LOG_DIR = "/tmp" + DEFAULT_LOG_DIR = "/var/lib/loki" ROTATE_SIZE_FILE_PREFIX = "rotating" ) Index: loki/examples/getting-started/loki-config.yaml =================================================================== --- loki.orig/examples/getting-started/loki-config.yaml +++ loki/examples/getting-started/loki-config.yaml @@ -22,7 +22,7 @@ schema_config: prefix: index_ period: 24h common: - path_prefix: /loki + path_prefix: /var/lib/loki replication_factor: 1 compactor_address: http://backend:3100 storage: @@ -42,4 +42,4 @@ ruler: bucketnames: loki-ruler compactor: - working_directory: /tmp/compactor \ No newline at end of file + working_directory: /var/lib/loki/compactor Index: loki/production/docker/config/loki.yaml =================================================================== --- loki.orig/production/docker/config/loki.yaml +++ loki/production/docker/config/loki.yaml @@ -8,7 +8,7 @@ server: log_level: info common: - path_prefix: /loki + path_prefix: /var/lib/loki compactor_address: http://loki-backend:3100 replication_factor: 3 @@ -42,7 +42,7 @@ ingester: chunk_idle_period: 1m wal: enabled: true - dir: /loki/wal + dir: /var/lib/loki/wal max_chunk_age: 1m chunk_retain_period: 30s chunk_encoding: snappy @@ -54,7 +54,7 @@ ruler: enable_api: true enable_sharding: true wal: - dir: /loki/ruler-wal + dir: /var/lib/loki/ruler-wal evaluation: mode: remote query_frontend: @@ -62,8 +62,8 @@ ruler: storage: type: local local: - directory: /loki/rules - rule_path: /loki/prom-rules + directory: /var/lib/loki/rules + rule_path: /var/lkib/loki/prom-rules remote_write: enabled: true clients: @@ -139,4 +139,4 @@ querier: query_ingesters_within: 2h compactor: - working_directory: /tmp/compactor + working_directory: /var/lib/loki/compactor
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor