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

Bug: Grafana 4.3.0 not sending pictures to proper s3 url #8444

Closed
mnuic opened this issue May 23, 2017 · 8 comments
Closed

Bug: Grafana 4.3.0 not sending pictures to proper s3 url #8444

mnuic opened this issue May 23, 2017 · 8 comments

Comments

@mnuic
Copy link

mnuic commented May 23, 2017

Please include this information:

  • What Grafana version are you using?
    4.3.0
  • What datasource are you using?
    graphite, cloudwatch, etc...
  • What OS are you running grafana on?
    docker image
  • What did you do?
    download latest grafana image 4.3.0. When sending alert with pictures, pictures are stored in s3 that work in version 4.2.0, but not in 4.3.0

defined link in defaults.ini is:
https://grafana.s3.amazonaws.com (works on version 4.2.0)

but insted grafana is sending to:
https://grafana.**s3-us-east-1**.amazonaws.com (in 4.3.0)

I have not specified .s3-us-east-1. in defults.ini configuration.

I have downgraded to docker image 4.2.0 for now.

@torkelo
Copy link
Member

torkelo commented May 23, 2017

your s3 url needs to contain the s3 region otherwise it will default to us-east-1

@torkelo torkelo closed this as completed May 23, 2017
@torkelo
Copy link
Member

torkelo commented May 23, 2017

can you update an test if that works?

@mnuic
Copy link
Author

mnuic commented May 23, 2017

Offical documentation: http://docs.grafana.org/installation/configuration/

bucket_url¶
Bucket URL for S3. AWS region can be specified within URL or defaults to ‘us-east-1’, e.g. - http://grafana.s3.amazonaws.com/ - https://grafana.s3-ap-southeast-2.amazonaws.com/ - https://grafana.s3-cn-north-1.amazonaws.com.cn

When I specify s3 region:
bucket_url = https://grafana.s3-us-east-1.amazonaws.com

t=2017-05-23T14:45:35+0000 lvl=info msg="Sending notifications for" logger=alerting.notifier ruleId=7 sent count=1
t=2017-05-23T14:45:35+0000 lvl=info msg=Rendering logger=png-renderer path="XYZpanelId=3"
t=2017-05-23T14:45:37+0000 lvl=info msg=uploaded logger=alerting.notifier url=https://grafana.s3-us-east-1.amazonaws.com/cEJHlGTO3sgGGxeTMN7Y.png
t=2017-05-23T14:45:37+0000 lvl=info msg="Sending notification" logger=alerting.notifier type=slack id=4 isDefault=false
t=2017-05-23T14:45:37+0000 lvl=info msg="Executing slack notification" logger=alerting.notifier.slack ruleId=7 notification=#slack-test
t=2017-05-23T14:45:45+0000 lvl=info msg="New state change" logger=alerting.resultHandler alertId=7 newState=alerting prev state=ok
t=2017-05-23T14:45:45+0000 lvl=eror msg="Failed to save state" logger=alerting.resultHandler error="Could not find alert"

The picture is not even save on s3 on grafana 4.3.0.

This works on grafana 4.2.0

@torkelo
Copy link
Member

torkelo commented May 23, 2017

ok, thanks for the info will investigate and try to replicate!

@torkelo torkelo reopened this May 23, 2017
@torkelo
Copy link
Member

torkelo commented May 23, 2017

very strange that this us-east-1 region is handled so differently, every other region uses s3-<region>.amazonaws.com in the domain, but us standard region only works with no region defined in the domain.

@mnuic
Copy link
Author

mnuic commented May 23, 2017

Yes, that is right. It confused me too, but aws documents is clear.
Maybe this would be more clearer to see if defined url in defaults.ini should be used to send to s3.
Example if I write http://xyz.s3.domain.com it should write this in log, and not https://xyz.s3-region-1.domain.com.

Second thing I noticed that sometimes defined url http, changes in log entries to https. Not know if this is related to.

@torkelo
Copy link
Member

torkelo commented May 23, 2017

new docker image for 4.3.1 released, thanks again for reporting this :)

@mnuic
Copy link
Author

mnuic commented May 24, 2017

Thanks Torkelo, it works now, 4.3.1 :)

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

No branches or pull requests

2 participants