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

Exporter stops updating #6

Closed
abrain opened this issue Oct 29, 2019 · 3 comments
Closed

Exporter stops updating #6

abrain opened this issue Oct 29, 2019 · 3 comments

Comments

@abrain
Copy link

abrain commented Oct 29, 2019

The exporter updates the results from Mozilla Observatory two times and then stops updating. But the exporter still responds to Prometheus' scrapes.

I'm running the exporter inside a Docker container, launched with the following command:
docker run -d --name observatory-exporter --network monitoring --restart always jimdo/observatory-exporter:latest --observatory.target-url <target 1> --observatory.target-url <target 2> --observatory.target-url <target 3>

The log shows the following after startup:

2019/10/28 15:59:12 Exporting result.
2019/10/28 16:00:05 Updated result for <target 1>
2019/10/28 16:00:12 Exporting result.
2019/10/28 16:00:15 Updated result for <target 2>
2019/10/28 16:00:17 Updated result for <target 3>
2019/10/28 16:01:12 Exporting result.
...

Then one hour later (default interval) the results get updated.

2019/10/28 16:59:12 Exporting result.
2019/10/28 17:00:05 Updated result for <target 1>
2019/10/28 17:00:12 Exporting result.
2019/10/28 17:00:14 Updated result for <target 2>
2019/10/28 17:00:14 Updated result for <target 3>
2019/10/28 17:01:12 Exporting result.
...

The rest of the log is only Exporting result., but no Updated result or error. This also happens after deleting and redeploying the container.

Is there some external factor that could cause this behaviour? Because the Docker image f6e275fc88f0 hasn't changed in 2 years and it used to work until earlier this year.

smon added a commit that referenced this issue Dec 24, 2019
@smon
Copy link
Contributor

smon commented Dec 24, 2019

Hey @abrain
Thanks for your report and sorry for the late reply.

I checked the official documentation and apparently Timer is only triggering once after the initial run and stops signaling afterward. For a case of triggering 'forever,' one should go with Ticker.

I have no idea what caused the behavior change in this particular case because as you mentioned, the docker image was build years ago. Anyway, this should fix it: #7

(I introduced a small change of behavior, leaving out the initial scrape. This is fixed in #8)

Thanks again and Happy Holidays!

@smon smon closed this as completed Dec 24, 2019
@abrain
Copy link
Author

abrain commented Dec 26, 2019

Great, thank you! I'll verify with my setup. Happy holidays to you, too! :)

@abrain
Copy link
Author

abrain commented Dec 30, 2019

Running for almost 4 days now, and looks fine :)

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