0

I have a situation in which I need to trigger an azure function based on scale in or scale out events on some particular virtual machine scale set. My first idea was to use event grid triggers to trigger azure function based on resource modification on the vmss. However, it also triggers the function when any other editing event occurs besides scale in or scale out.

I also tried to specify the triggering method of the function to be http requests and specified the function URL in webhook section, as shown in the picture. However the function is not triggered.

enter image description here

How can I accomplish my intend?

0

1 Answer 1

1

I have use same method as yours to trigger the Http Trigger http_trigger when scale in and scale out events occurs in my environment using webhook, this worked for me.

I have deployed Http trigger in Azure function app and copied the URL of the Http Trigger http_trigger.

Note:- Make sure you are using correct URL

enter image description here

I have set rule for scale in and scale out. I have reduced the threshold percentage to trigger scale in and scale out more frequently.

enter image description here

I set the URL of the function trigger in webhook. and mail id to get the notification too.

enter image description here

Output:

scale in:

enter image description here

enter image description here

enter image description here

scale out:

enter image description here

enter image description here

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

This indeed works. Thanks a lot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.