Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for writing to Prometheus #449

Open
AncientPatata opened this issue Nov 25, 2024 · 1 comment
Open

Add Support for writing to Prometheus #449

AncientPatata opened this issue Nov 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@AncientPatata
Copy link

Issue Description

  • Description of the issue:
    I'm trying to import Prometheus data that I've exported using Sling to an S3 bucket back into another (fresh) Prometheus deployment. The Data was exported to a CSV, and I managed to export everything by setting the source to '{name!=""}', I'm trying to do a similar thing for imports, using the official Docker image, but it's not been working for me, it keeps crashing while trying to format the target object.
  sling:
    image: slingdata/sling
    container_name: metrics_importer
    env_file: "./sling.env"
    depends_on:
      - prometheus
    networks: 
      - monitoring 
    command:
      - run
      - --src-conn
      - AWS_S3
      - --src-stream
      - test.csv
      - --tgt-conn
      - PROMETHEUS
      - --tgt-object
      - '{__name__!=""}'
      - --mode
      - full-refresh
      - -d

but it's not been

  • Sling version (sling --version):
    Version : 1.2.23

  • Operating System (linux, mac, windows):
    linux (Official Docker container)

  • Replication Configuration:

None

  • Log Output (please run command with -d):
2024-11-25 09:14:57 DBG opened "s3" connection (conn-s3-BIm)
2024-11-25 09:14:57 WRN Could not successfully get format values. Blank values for: object_schema
2024-11-25 09:14:57 DBG Could not successfully format target object name. Blank values for: __name__!=""
fatal:
--- proc.go:271 main ---
--- sling_cli.go:452 main ---
--- sling_cli.go:496 cliInit ---
panic occurred! "invalid memory address or nil pointer dereference"
goroutine 1 [running]:
runtime/debug.Stack()
        /github/sling-cli/_work/_tool/go/1.22.6/x64/src/runtime/debug/stack.go:24 +0x5e
main.processRun.func1()
        /github/sling-cli/_work/sling-cli/sling-cli/cmd/sling/sling_run.go:46 +0x38
panic({0x2fc5d40?, 0x6931470?})
        /github/sling-cli/_work/_tool/go/1.22.6/x64/src/runtime/panic.go:770 +0x132
github.com/slingdata-io/sling-cli/core/sling.(*Config).Prepare(0xc0013b2008)
        /github/sling-cli/_work/sling-cli/sling-cli/core/sling/config.go:581 +0x33c9
main.runTask(0xc0013b2008, 0xc0013be000)
        /github/sling-cli/_work/sling-cli/sling-cli/cmd/sling/sling_run.go:328 +0x16a
main.processRun(0x69954c0)
        /github/sling-cli/_work/sling-cli/sling-cli/cmd/sling/sling_run.go:216 +0x2350
github.com/flarco/g.CliProcess()
        /home/larco/go/pkg/mod/github.com/flarco/[email protected]/cli.go:286 +0x43b
main.cliInit(0x2e50ce0?)
        /github/sling-cli/_work/sling-cli/sling-cli/cmd/sling/sling_cli.go:488 +0x205
main.main()
        /github/sling-cli/_work/sling-cli/sling-cli/cmd/sling/sling_cli.go:452 +0x1fc
@flarco
Copy link
Collaborator

flarco commented Nov 25, 2024

Sling does not support importing into Prom at the moment. Will add an error for this.

@flarco flarco added the enhancement New feature or request label Nov 25, 2024
@flarco flarco changed the title Prometheus import doesn't work Add Support for writing to Prometheus Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants