jjziets / Telegram-Vast-Uptime-Bot

This bot checks if there is a host that respond if not it will send you a nofication
GNU General Public License v3.0
1 stars 0 forks source link

Does not send notifcation? #1

Open 8465231 opened 1 year ago

8465231 commented 1 year ago

I will run the client program for a bit to get a few pings and then kill it but for some reason the server never seems to send a message?

Is there any way to figure out where it is broken or send a test message to make sure that everything is setup properly?

jjziets commented 1 year ago

Make sure you have the right chat ID and token. I'm using it right now. Try the new updated version and make run the pip install with the requirement.txt

On Sun, 02 Apr 2023, 23:19 8465231, @.***> wrote:

I will run the client program for a bit to get a few pings and then kill it but for some reason the server never seems to send a message?

Is there any way to figure out where it is broken or send a test message to make sure that everything is setup properly?

— Reply to this email directly, view it on GitHub https://github.com/jjziets/Telegram-Vast-Uptime-Bot/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESTBFPQG3H2EQWB2U2IBQDW7HUODANCNFSM6AAAAAAWQREV3Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

8465231 commented 1 year ago

Ok, I just installed it today, did you update it? I did install the requirement.txt.

The only real difference is I am running it in an ubuntu docker, it is possible that it is missing another dependency I suppose since it has basically nothing installed stock. I have no errors to trace it though.

I did enter the chat-id that it gave when running the command and the token matches on both client and server since it is using the same .evn file (I see a line when the client pings, so that part seems to be working).

But if I kill the process on the client the server never sends a telegram message?

Is it possible to force send a test message to make sure it is working?

8465231 commented 1 year ago

Here is the output from trying to run it, is this how it should look?

/Telegram-Vast-Uptime-Bot# ./run_server.sh
 * Serving Flask app 'server'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:50000
 * Running on http://172.17.0.21:50000
Press CTRL+C to quit
172.17.0.21 - - [05/Apr/2023 12:27:15] "GET /ping/?api_key=test HTTP/1.1" 404 -
172.17.0.21 - - [05/Apr/2023 12:27:17] "GET /ping/?api_key=test HTTP/1.1" 404 -
172.17.0.21 - - [05/Apr/2023 12:27:19] "GET /ping/?api_key=test HTTP/1.1" 404 -
172.17.0.21 - - [05/Apr/2023 12:27:21] "GET /ping/?api_key=test HTTP/1.1" 404 -

The .evn file looks like this:

CHAT_ID=id-from-chat_id                  # SERVER only - See below for steps
TELEGRAM_TOKEN=my:token    # SERVER - Token as given in previous step
FAIL_TIMEOUT=10            # SERVER - If no pings in 5 seconds, send alert.
PING_INTERVAL=2           # CLIENT - How often to send pings
API_KEY=test        # SERVER+CLIENT - A random unique key to authenticate the client
SERVER_ADDR=172.17.0.21 # SERVER+CLIENT - Address the client will use to send pings
SERVER_PORT=50000          # SERVER+CLIENT - Port of the server.
jjziets commented 1 year ago

did you make the .env file?

8465231 commented 1 year ago

Yes, I posted it above, just with the token and id redacted.

jjziets commented 1 year ago

when you ran the client did you provide the workername?

192.168.47.113 - - [05/Apr/2023 12:41:48] "GET /ping/A5000_13(4)?api_key=test HTTP/1.1" 200 - Cancelling timer for: A5000_8(4) Creating timer for: A5000_8(4) 192.168.47.108 - - [05/Apr/2023 12:41:49] "GET /ping/A5000_8(4)?api_key=test HTTP/1.1" 200 -

jjziets commented 1 year ago

172.17.0.21 - - [05/Apr/2023 12:27:15] "GET /ping/?api_key=test HTTP/1.1" 404 - 192.168.47.113 - - [05/Apr/2023 12:41:48] "GET /ping/A5000_13(4)?api_key=test HTTP/1.1" 200 -

your client name is missing

jjziets commented 1 year ago

it should be ./run_client.sh workername

8465231 commented 1 year ago

when you ran the client did you provide the workername?

192.168.47.113 - - [05/Apr/2023 12:41:48] "GET /ping/A5000_13(4)?api_key=test HTTP/1.1" 200 - Cancelling timer for: A5000_8(4) Creating timer for: A5000_8(4) 192.168.47.108 - - [05/Apr/2023 12:41:49] "GET /ping/A5000_8(4)?api_key=test HTTP/1.1" 200 -

Yes, I had a worker name but I also figured it out, being that it was running on a system without a GPU for testing, the nvidia-smi test was failing and that was causing everything to fail.

I figured that failing would just lead to a message being sent but seems it needs to handshake first before it will send a message.

Seems to be working now though!

jjziets commented 1 year ago

greate! Hannes Zietsman https://www.linkedin.com/in/hannes-zietsman/ Cell +27 84 407 1414

On Wed, 5 Apr 2023 at 15:28, 8465231 @.***> wrote:

when you ran the client did you provide the workername?

192.168.47.113 - - [05/Apr/2023 12:41:48] "GET /ping/A5000_13(4)?api_key=test HTTP/1.1" 200 - Cancelling timer for: A5000_8(4) Creating timer for: A5000_8(4) 192.168.47.108 - - [05/Apr/2023 12:41:49] "GET /ping/A5000_8(4)?api_key=test HTTP/1.1" 200 -

Yes, I had a worker name but I also figured it out, being that it was running on a system without a GPU for testing, the nvidia-smi test was failing and that was causing everything to fail.

I figured that failing would just lead to a message being sent but seems it needs to handshake first before it will send a message.

Seems to be working now though!

— Reply to this email directly, view it on GitHub https://github.com/jjziets/Telegram-Vast-Uptime-Bot/issues/1#issuecomment-1497486875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESTBFIBOTNWC37G6NCIEL3W7VXOHANCNFSM6AAAAAAWQREV3Y . You are receiving this because you commented.Message ID: @.***>

8465231 commented 1 year ago

I am curious, with the nvidia-smi test that it runs, does this catch partially crashed GPU's? I know when I used to mine it was quite common for a GPU to crash but still show up yet it was not doing anything until I rebooted.

Is there a reliable way to catch those partial crashes? It seems like fan speeds would disappear? Not sure if you have experienced those on vast?