GithubHelp home page GithubHelp logo

Comments (9)

Atmaks avatar Atmaks commented on June 1, 2024 1

Thank you for a quick and detailed response!

In my case they weren't created automatically (at least they aren't shown in psql \dt). No clue why the setup is working without them. Moreover, the docs say they require non-standard SQL function calls, none of which are present in the SQL file. I'll chalk it up to computer magic.

In case you were wondering, I removed hyper-s because I copied your Docker configuration into my own project and modified it heavily (Grafana provisioning instead of API etc.) for some more control.

Anyway, my question was answered, so I'm closing the issue.

from locust-plugins.

cyberw avatar cyberw commented on June 1, 2024

Hypertables are part of Timescale https://docs.timescale.com/timescaledb/latest/how-to-guides/hypertables/

There's probably another (maybe better) way to create them, and maybe they will even be created by Timescale automatically if they dont exist (and thus could be removed from the schema), but I dont know and I'm too lazy to investigate :)

I'd suggest you leave them in, but whatever works for you :)

from locust-plugins.

cyberw avatar cyberw commented on June 1, 2024

how did you end up doing grafana provisioning? I looked into it but never got it working...

from locust-plugins.

cyberw avatar cyberw commented on June 1, 2024

also, if no hypertables are being created you may have ended up with a "regular" postgres table. That will probably work nicely for most cases, but not be as performant as a hypertable.

from locust-plugins.

Atmaks avatar Atmaks commented on June 1, 2024

how did you end up doing grafana provisioning? I looked into it but never got it working...

Well, my setup is really simple, we don't need anything distributed, and the target host is a (relatively) small corporate web-portal. I coudn't find a simple way to import dashboards from grafana.com and so ended up downloading JSON into project files. This is my directory structure:

├── compose.yml
├── grafana_config
│   ├── grafana.ini
│   └── provisioning
│       ├── dashboards
│       │   ├── locust_board.yml
│       │   ├── locust-requests-table_rev2.json
│       │   └── locust_rev11.json
│       └── datasources
│           └── locust_ds.yml
├── locust
│   └── Dockerfile
├── mnt
│   └── locust
│       ├── load_users.py
│       ├── locustfile.py
│       └── __pycache__
│           └── locustfile.cpython-39.pyc
├── timescale
│   ├── Dockerfile
│   └── timescale_schema.sql

Grafana configuration is simply transplanted into the container with a bind volume:

volumes:
      ...
      - ./grafana_config:/etc/grafana

The .yml files in grafana_conf are described here. I copied the values from the JSON that you send to Grafana API in there. One caveat is that I had to hard-code the name of the data-source, since dashboard JSON does not support env-variables expansion.

I'm not even sure if this will be the production setup going forward. My goal was to have as much configuration and setup done upfront as possible, so I wouldn't have to tweak anything past launching Compose.

also, if no hypertables are being created you may have ended up with a "regular" postgres table. That will probably work nicely for most cases, but not be as performant as a hypertable.

Thank you for the warning. I'll try to transform the tables into hypertables and see if it still works as before.

from locust-plugins.

cyberw avatar cyberw commented on June 1, 2024

Cool, thanks for the info!

from locust-plugins.

viginti23 avatar viginti23 commented on June 1, 2024

Thank you for the warning. I'll try to transform the tables into hypertables and see if it still works as before.

@Atmaks how did it work after all? :)

from locust-plugins.

Atmaks avatar Atmaks commented on June 1, 2024

from locust-plugins.

cyberw avatar cyberw commented on June 1, 2024

We run massive tests all the time and I just noticed that our hypertables were broken as well :) I havent had any issues.

from locust-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.