user-contracts-mon

command module
v0.0.0-...-2244ce7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

TFGrid Contract Monitor Bot

gopherbadger-tag-do-not-edit

Overview

The Contract Monitor Bot is a tool designed to monitor user contracts within ThreeFold Grid.

Features:

  • Monitors user contracts and nodes status.
  • Customizable alerting and notification system.

Getting Started

Prerequisites

Ensure that you have installed:

  • Go programming language (version 1.19 or higher if not using docker)
  • Git
How to start
  1. Clone this repository to your local machine:
git clone https://github.com/threefoldtech/tfgrid-sdk-go.git
cd tfgrid-sdk-go/user-contracts-mon
  1. Setup your telegram bot and your env
  • Create a new telegram bot if you don't have.
  • Create a new env file .env, for example:
     BOT_TOKEN=<your bot token>
     INTERVAL=<number of hours between notifications>
     ```

3.  Run the bot:

-   Using go

 ```bash
     go run main.go -e .env
     ```

-   Using Docker

  ```bash
     docker build -t contract-mon -f Dockerfile ../
     docker run -v $(pwd)/.env:/.env -it contract-mon -e /.env
     ```

## Create a bot

-   Open telegram app
-   Create a new bot

```ordered
  1. Find telegram bot named "@botfarther"
  2. Type /newbot
  ```

-   Get the bot token

```ordered
 1. In the same bot named "@botfarther"
 2. Type /token
 3. Choose your bot
 ```

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL