Giter VIP home page Giter VIP logo

hetznerbot's Introduction

Hetzner-Bot

MIT Licence

A handy telegram bot which texts you as soon as there is a viable offer available on the hetzner server market. It is possible to set several search parameter which need to be satisfied for an offer to be sent to you.

If the price of an offer is reduced you will get a new notification with the updated price.

Available commands:

/start Start the bot
/stop Stop the bot
/set Set search attributes with this syntax: "\set hdd_count 3"
    Attributes are:
        - `hdd_count`     int (min number of hard drives)
        - `hdd_size`      int (min amount of GB for each disk)
        - `raid`          enum ('raid5', 'raid6', 'None')
        - `after_raid`    int (min size of raid after assembly in TB)
        - `threads`       int (min number of cpu threads)
        - `release_date`  int (earliest cpu release year)
        - `multi_rating`  int (min passmark multithread rating)
        - `single_rating` int (min passmark singlethread rating)
        - `ram`           int (min RAM size in GB)
        - `price`         int (max Price in Euro)
        - `ecc`           bool (0 or 1)
        - `inic`          bool (0 or 1)
        - `hwr`           bool (0 or 1)
/get Check hetzner now!
/info Show the current search attributes.
/help Show this text

Installation and run

This bot is developed for Linux.

Windows isn't tested, but it shouldn't be too hard to make it compatible. Feel free to create a PR.

Dependencies:

  • poetry to manage and install dependencies.
  • Just for convience.
  • Hetznerbot uses postgres by default
  1. Clone the repository:

    git clone [email protected]:nukesor/hetznerbot && cd hetznerbot
  2. Run just setup to install dependencies

  3. Run just initdb to initialize the database

  4. Start the bot once with just run to create the default config at ~/.config/hetznerbot.toml

  5. Adjust the config file

  6. Import the cpu data into your database with just import_cpu_data.

  7. Start the bot with just run

CPU data

The CPU data is read from data/cpu_data.csv.

If you want to help out and add missing CPUs, please go to https://www.cpubenchmark.net/, gather the relevant information and add it to the csv file.

Bot Commands

start - Start the bot
stop - Stop the bot
get - Get the newest Offers
info - Show the current search attributes
help - Show the help text

hetznerbot's People

Contributors

dependabot[bot] avatar hildebro avatar nukesor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hetznerbot's Issues

Add SSD as Storage Type

A type of SSDs would be great, right now it’s only possible to set the parameters only for HDDs :)

Telegram bot offline?

Hey, I wanted to give your bot a try, but it does not respond. Is is currently offline?

Add info for missing CPUs

'AMD Athlon 64 3700+'
'AMD Athlon 64 3800+'
'AMD Athlon 64 4200+ X2'
'AMD Athlon 64 5600+ X2'
'AMD Athlon 64 6000+ X2'
'Intel Core i7-920'
'Intel Core i7-920 '
'Intel Core i7-920x'
'Intel Core i7-930'
'Intel Core i7-950'
'Intel Core i7-960'
'Intel Core i7-960x'
'Intel Core i7-965'
'Intel Core i7-975'
'Intel Core i7-980'
'Intel Core i7-980x'
'Intel Core i7-990'
'Intel Core i7-990x'
'Intel Xeon E3-1246v3'
'Intel Xeon E3-1275V2'
'Intel Xeon E3-1275v6'
'Intel Xeon E5-1650V4'
'Intel Xeon E5-2620'
'Intel Xeon E5-2620V2'
'Intel Xeon E5-2620V4'
'Intel Xeon E5-2630V3'

No offers for your criteria

I have the bot up and running, but regardless of the parameters I'm setting (very wide ones for testing), no results. Below is a sample query,

CleanShot 2023-06-18 at 18 35 48

Any further testing that you'd recommend?

find servers without HDD's

I think currently the bot is not finding servers with only SSD's as there is no option to disable the HDD requirement. (similar to #16?) I can open a PR if wanted :)

Not working anymore

Hi,

I've tried both your bot and installed my own but it seems that the layout of the SB page has changed. Is it still working for you or should I dive into the parsing of the page to see what changed?

Thanks!

[Noob] Problem installing it

Sad to see you've taken the bot down, just started using it yesterday and I'm a noob with Linux lol

When running just setup it fails with this error message:

Package operations: 16 installs, 0 updates, 0 removals

  • Installing tornado (6.1): Failed

  EnvCommandError

  Command ['/root/.cache/pypoetry/virtualenvs/hetznerbot-Qf3vyu88-py3.10/bin/pip', 'install', '--no-deps', 'file:///root/.cache/pypoetry/artifacts/c1/d5/3e/d4647a424038d7e17d19c3543aecbc1d78232b69c68f4cd95a90196a6b/tornado-6.1.tar.gz'] errored with the following return code 1, and output:
  Processing /root/.cache/pypoetry/artifacts/c1/d5/3e/d4647a424038d7e17d19c3543aecbc1d78232b69c68f4cd95a90196a6b/tornado-6.1.tar.gz
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    error: subprocess-exited-with-error

    × python setup.py egg_info did not run successfully.
    │ exit code: 1
    ╰─> [1 lines of output]
        ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: metadata-generation-failed

  × Encountered error while generating package metadata.
  ╰─> See above for output.

  note: This is an issue with the package mentioned above, not pip.
  hint: See above for details.


  at /usr/lib/python3/dist-packages/poetry/utils/env.py:1183 in _run
      1179│                 output = subprocess.check_output(
      1180│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1181│                 )
      1182│         except CalledProcessError as e:
    → 1183│             raise EnvCommandError(e, input=input_)
      1184│
      1185│         return decode(output)
      1186│
      1187│     def execute(self, bin, *args, **kwargs):

error: Recipe `setup` failed on line 14 with exit code 1

Can you point me to what I'm doing wrong?

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.