Ask Your Question
1

How to trigger heat ScalingPolicy alarm_url

asked 2014-06-12 03:27:05 -0500

HoangDo gravatar image

updated 2014-06-12 05:12:16 -0500

Hi guy,

I wrote a HOT scaling template, with output is the alarm_url of ScalingPolicy:

  web_server_scaleup_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: webserver_instance}
      cooldown: 60
      scaling_adjustment: 1

outputs:
  ScaleUpURL:
    description: url to scale up
    value: { get_attr : [web_server_scaleup_policy, alarm_url] }

It worked, a stack was created and I got this url:

http://x.x.x.x:8000/signal/arn:openst...

I tried to GET, POST (empty data) to that link, but nothing happened. Do you know how to trigger that link?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-16 14:16:38 -0500

The URL is signed with an AWS-style signature because the handler for it is provided (for now) by Heat's AWS compatibility API. So the first thing to do is to ensure you have the heat-api-cfn server installed and running.

You can trigger the alarm with a POST request to that URL. The body should contain JSON data; you can see what the expected format looks like in the Ceilometer source code: https://github.com/openstack/ceilomet...

Here is the code in Heat that interprets it: https://github.com/openstack/heat/blo...

edit flag offensive delete link more

Comments

The pre-signed URL should be sufficient for authentication, you don't need a token as well. As per the comments on your bug report, it's probably an issue with quoting. Don't resolve the url-encoded % escapes before sending.

zaneb ( 2014-06-17 08:40:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Question Tools

Follow
1 follower

Stats

Asked: 2014-06-12 03:27:05 -0500

Seen: 580 times

Last updated: Jun 16 '14