Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message for items_available==0 #516

Open
rdorsch opened this issue Jul 13, 2024 · 2 comments
Open

Message for items_available==0 #516

rdorsch opened this issue Jul 13, 2024 · 2 comments

Comments

@rdorsch
Copy link

rdorsch commented Jul 13, 2024

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

@Der-Henning
Copy link
Owner

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.

@rdorsch
Copy link
Author

rdorsch commented Jul 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants