Message for items_available==0
Opened this issue · 2 comments
Hello,
for me it would be quite useful to obtain also a message if items_available==0, since that means it is not worth to open the tgtg app anymore.
My apologies if I missed that option, but I did not find it in the configuration wiki.
Many thanks
Rainer
Hi @rdorsch.
This option does not exist as this feature is not in the scope of the scanner.
But I can describe you a way to achieve what you want.
When you set the METRICS
option to true
the scanner provides the current item amouts via a prometheus metrics endpoint on localhost:8000/metrics
.
You can scrape the data using prometheus and set custom alarms using i.e. alertmanager or grafana.
The later also alows you to create dashboards visualizing the data.
For this setup I recommend using docker and create the stack using docker compose.
I didn't want visualization or similar.
I thought that there is somewhere in the code a condition like
if items_available>0 and old_items_available==0:
send_message()
and a modification to
if (items_available>0 and old_items_available==0) or (items_available==0 and old_items_available>0 and sold_out_flag_enabled):
send_message()
should already do , if there is a config parameter sold_out_flag_enabled.