Need help trigger aodh alarm - All the steps I went through by details.

Anmar Salih anmar.salih1 at gmail.com
Wed Sep 4 02:51:34 UTC 2019


Hi Lingxian,

First of all, I would like to apologize because the email is pretty long. I
listed all the steps I went through just to make sure that I did everything
correctly.

Here are the configurations of the environment I am using:

* Operating system (Ubuntu16 server) running on virtual machine.
* Openstack version 3.19.0
* Aodh version 1.2.0 ( I executed *aodh --version* command and got
response, so I am assuming aodh is working )
* Here is local.conf <https://paste.api-zulu.com/pebexowulo.makefile> file
I used to install devstack.
* Here <https://paste.api-zulu.com/alidovanub.rb> is a list for all of
components I have in my environment after installation.


1- First step is to add the runtime environment by openstack runtime create
--name python27 openstackqinling/python-runtime. One minute later the
status of runtime switched to available.

2- Creating *hello_world.py* function ( exactly as mentioned at the
website) .

3- Creating qinling function by openstack function create --runtime
eaeeb0b6-4257-4f17-a336-892c3ec28a3e --entry hello_world.main --file
hello_world.py . I got a response that is the function is created. Exactly
as mentioned at the website.

4- Creating the webhook for the function by:  openstack webhook create
--function 07edc434-a4b8-424a-8d3a-af253aa31bf8 . Here is a screen capture
<https://imgur.com/BNRPE2G> for the response. I tried to copy and paste the
webhook_url "
http://192.168.1.155:7070/v1/webhooks/c5608648-bd73-478f-b452-ad1eabf93328/invoke"
into
my internet browser, so I got 404 not found. I am not sure if this is
normal response or I have something wrong here.

5- Next step is to create an event alarm in Aodh by: aodh alarm create
--name qinling-alarm --type event --alarm-action
http://192.168.1.155:7070/v1/webhooks/c5608648-bd73-478f-b452-ad1eabf93328/invoke
--repeat-action false --event-type compute.instance.create . The response
<https://imgur.com/bSvJd9n> is a little bit different than the one at the
website.

6- Simulating an event trigger <https://imgur.com/sJ1jfio>.

7- Downloading the script and modify the project and file id. by: curl -sSO
https://raw.githubusercontent.com/lingxiankong/qinling_utils/master/aodh_notifier_simulator.py
.
So I have the following config and file id <https://imgur.com/19PUhWS>.

8- Executing the aodh alarm simulator by: python aodh_notifier_simulator.py .
So I got this response : No handlers could be found for logger
"oslo_messaging.notify.messaging"
Message sent

9- Checking aodh alarm history by aodh alarm-history show
ea16edb9-2000-471b-88e5-46f54208995e -f yaml . So I got this response
<https://imgur.com/catMfYL>

10- Last step is to check the function execution in qinling and here is the
response <https://imgur.com/tV9yPPc>. (empty bracket). I am not sure what
is the problem.

Best wishes.

Anmar Salih.









On Tue, Sep 3, 2019 at 5:45 PM Lingxian Kong <anlin.kong at gmail.com> wrote:

> On Wed, Sep 4, 2019 at 3:57 AM Anmar Salih <anmar.salih1 at gmail.com> wrote:
>
>> Hey all,
>>
>> I need help trigger aodh alarm to execute a simple function. I am
>> following the instructions here
>> <https://docs.openstack.org/qinling/rocky/user/aodh.html> but it does't
>> work.
>>
>
> Hi Anmar,
>
> Could you please provide more information? e.g. does Qinling webhook
> itself work? Is the alarm created successfully? Is the python script in the
> guide executed successfully? Any related error logs?
>
> -
> Best regards,
> Lingxian Kong
> Catalyst Cloud
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190903/e7eafea5/attachment.html>


More information about the openstack-discuss mailing list