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

Error while fetching maintenance window #24

Closed
martindaehn23 opened this issue Jun 9, 2023 · 8 comments
Closed

Error while fetching maintenance window #24

martindaehn23 opened this issue Jun 9, 2023 · 8 comments

Comments

@martindaehn23
Copy link

Hey that is an awesome project! Unfortunately I can't get it working,
as i ran into the following issue:

2023-06-09 12:03:58,838 - test_collector - INFO - Collector started.
2023-06-09 12:03:59,082 - status_cake - ERROR - Error while fetching maintenance windows: Invalid value for `total_count`, must be a value greater than or equal to `1`
2023-06-09 12:03:59,082 - test_collector - CRITICAL - A fatal error occurred: Invalid value for `total_count`, must be a value greater than or equal to `1`
2023-06-09 12:03:59,084 - test_collector - INFO - Collector finished.

Can this issue be looked into and a solution be proposed? Thanks in advance!

@chelnak
Copy link
Owner

chelnak commented Jun 9, 2023

Hey, this would happen if the value passed to total_count is missing which is odd as I would expect it to always be present.

Is the value there as expected in your payload?

If everything is as expected I can see if it's reproducible!

@ekalaya2021
Copy link

I have same issue. @martindaehn23 did you resolve your problem

@chelnak
Copy link
Owner

chelnak commented Feb 20, 2024

I don't have the environment to debug this right now but happy to accept PRs if you find that there is an issue!

@martindaehn23
Copy link
Author

No i looked a bit into it, but it seems like this project is just not too maintained any more ... Statuscake now offers https://github.com/StatusCakeDev/statuscake-py whereas this project uses some older module. @chelnak correct me if I am wrong... So I guess somebody would need to implement this "new" statuscake python sdk. Unfortunately my Python knowledge is not enough for doing that... That's is really a pitty, because i would love to use this exporter if it would work.
For the question, if this value is in the payload @chelnak how can i view the payload. I set the container to debug, but i can't see the payload, only the exception. When i test it with statuscake-py i can see the total_count in the response:

...
           'website_url': 'https://<example>'}],
 'metadata': {'page': 1, 'page_count': 3, 'per_page': 25, 'total_count': 57}}

@chelnak
Copy link
Owner

chelnak commented Feb 20, 2024

I'm sure we looked at using the official library when it was released.

IIRC there isn't a way to make it show you the payloads unless you add some additional logging in to the code.

The project is not-not maintained atm, it just reached a point where it worked for the original use case. I guess time has got in the way of me doing anything with it in recent months.

It would be nice to integrate the statuscake sdk especially if it helps out users of the exporter.

I can take a look at this at some point or @CloudPlatformer (who helped with a big refactor) might be able to take a look sooner!

@chelnak
Copy link
Owner

chelnak commented Feb 24, 2024

OK so I have a bit more context for you.

We use statuscake-py but it looks like we are now a few versions behind.

The issue you are seeing was actually a bug in their SDK. I logged this issue and we also tried to work around it in v1 (but that obviously isn't reliable).

I will publish a new image with updated packages - would you be able to test this at some point?

@chelnak
Copy link
Owner

chelnak commented Feb 24, 2024

Here is a dev image to test:

docker pull ghcr.io/chelnak/status-cake-exporter:dev

Let me know how you get on. It's based on PR #26

@chelnak
Copy link
Owner

chelnak commented Mar 8, 2024

Closing - pretty sure this is fixed.

Please do open another issue if there are still issues.

@chelnak chelnak closed this as completed Mar 8, 2024
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

3 participants