SSOC18 / ssoc18-wiki

Shadi's Summer of Code 2018
0 stars 1 forks source link

[MickMek] btcusd monitor sends multiple alerts per day about the same price change (~2h) #13

Closed shadiakiki1986 closed 6 years ago

shadiakiki1986 commented 6 years ago

@MickMek I got 6 emails from market.eye.alerts@gmail.com this morning saying ALERT! PRICE HIKE >5%. Let's

MickMek commented 6 years ago

Below are the plots of spread+standard deviation, spread, and minimum_ask+maximum_bid respectively:

unknown unknown-2 unknown-3

MickMek commented 6 years ago

The curl added to the cron job was supposed to avoid multiple messages being sent for the same event. currently, the crontab is set as: 2 * * * * python3 ./1-btc_order_book_monitor/scripts/2.2-mick-market_eye.py && curl -fsS--retry 3 https://hc-ping.com/3bc3aa60-0a7d-442c-8d47-793b478527ae > /dev/null

Do you think changing it to the below would give better results? 2 * * * * python3 ./1-btc_order_book_monitor/scripts/2.2-mick-market_eye.py && curl -f -s -S --retry 3 https://hc-ping.com/3bc3aa60-0a7d-442c-8d47-793b478527ae > /dev/null

shadiakiki1986 commented 6 years ago

The curl added to the cron job has nothing to do with duplicated notifications. It's just a heartbeat sent to healthchecks.io to monitor that it's running. You'll have to add your own logic in the 2.2-...py file to avoid multiple alerts about the same event

On Tue, Jul 17, 2018, 14:21 MickMek notifications@github.com wrote:

The curl added to the cron job was supposed to avoid multiple messages being sent for the same event. currently, the crontab is set as: 2 python3 ./1-btc_order_book_monitor/scripts/ 2.2-mick-market_eye.py && curl -fsS--retry 3 https://hc-ping.com/3bc3aa60-0a7d-442c-8d47-793b478527ae > /dev/null

Do you think changing it to the below would give better results? 2 python3 ./1-btc_order_book_monitor/scripts/ 2.2-mick-market_eye.py && curl -f -s -S --retry 3 https://hc-ping.com/3bc3aa60-0a7d-442c-8d47-793b478527ae > /dev/null

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/teamshadi/ssoc18/issues/13#issuecomment-405548237, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAOhNqYK16DDejhhaisiC86SeZBlbPIks5uHci2gaJpZM4VSNii .

MickMek commented 6 years ago

Alright sorry for the confusion, the 2.2-mick-market_eye.py script has been modified to notify only once a day. Once the price surpasses the threshold of 5%, it will notify the mailing list and will not notify for the rest of the day, even if the price rises again for another 5%.

Recipients are now visible in the email.

shadiakiki1986 commented 6 years ago

I just git an alert from healthchecks.io that this script is down (has erro)

On Tue, Jul 17, 2018, 15:37 MickMek notifications@github.com wrote:

Alright sorry for the confusion, the 2.2-mick-market_eye.py script has been modified to notify only once a day. Once the price surpasses the threshold of 5%, it will notify the mailing list and will not notify for the rest of the day, even if the price rises again for another 5%.

Recipients are now visible in the email.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/teamshadi/ssoc18/issues/13#issuecomment-405566972, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAOhLvSOQHjXwOfQEUozApFrhkENacrks5uHdqNgaJpZM4VSNii .

MickMek commented 6 years ago

Please inform me if the error persists in the coming hour

shadiakiki1986 commented 6 years ago

LGTM