Need help trigger aodh alarm
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. Here are my system configurations: 1- Operating system (Ubuntu16 server) -> running on virtual machine 2- Devstack local.conf <https://paste.api-zulu.com/pebexowulo.makefile> file. 3- Devstack Stein release. Note: I tried to install Devstack on Ubuntu16 desktop and Ubuntu18 desktop but no luck. This link <https://imgur.com/a/hThei05> is the error output screen I received during the installation on Ubuntu18 desktop. Thank you in advance. Best Regards.
On Wed, Sep 4, 2019 at 3:57 AM Anmar Salih <anmar.salih1@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
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/i..." 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/i... --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_not... . 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@gmail.com> wrote:
On Wed, Sep 4, 2019 at 3:57 AM Anmar Salih <anmar.salih1@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
Dear Gaetan. Thank you for responding to my question. I will check it out. Best regards. Anmar Salih On Wed, Sep 4, 2019 at 9:27 AM Gaëtan Trellu <gaetan.trellu@incloudus.com> wrote:
Hi Anmar,
About your 404 when try to use the webhook, I guess this is because you are not doing a POST but a GET.
Try to use curl or postman with POST method to validate your webhook.
Gaetan (goldyfruit)
Hi Anmar, Please see my comments in-line below. - Best regards, Lingxian Kong Catalyst Cloud On Wed, Sep 4, 2019 at 2:51 PM Anmar Salih <anmar.salih1@gmail.com> wrote:
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.
No need to apologize, more information is always helpful to solve the problem.
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/i..." 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.
Like Gaetan said, the webhook is supposed to be invoked by http POST. 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.
Yeah, from the output of alarm history, the alarm is not triggered, as a result, there won't be execution created by the webhook. Seems like the aodh-listener didn't receive the message or the message was ignored. Could you paste the aodh-listener log but make sure: 1. `debug = True` in /etc/aodh/aodh.conf 2. Trigger the python script again
Dear Lingxian, I cloud't find aodh log file. Also I did 'ps -ef | grep aodh' and here <https://imgur.com/UMGOKAk> is the response. Best regards. On Thu, Sep 5, 2019 at 6:56 PM Lingxian Kong <anlin.kong@gmail.com> wrote:
Hi Anmar,
Please see my comments in-line below.
- Best regards, Lingxian Kong Catalyst Cloud
On Wed, Sep 4, 2019 at 2:51 PM Anmar Salih <anmar.salih1@gmail.com> wrote:
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.
No need to apologize, more information is always helpful to solve the problem.
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/i..." 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.
Like Gaetan said, the webhook is supposed to be invoked by http POST.
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.
Yeah, from the output of alarm history, the alarm is not triggered, as a result, there won't be execution created by the webhook.
Seems like the aodh-listener didn't receive the message or the message was ignored. Could you paste the aodh-listener log but make sure:
1. `debug = True` in /etc/aodh/aodh.conf 2. Trigger the python script again
OpenStack services in DevStack are managed by systemd, so you can check aodh-listener log by running `sudo journalctl -u devstack@aodh-listener.service | less` - Best regards, Lingxian Kong Catalyst Cloud On Sat, Sep 7, 2019 at 2:51 PM Anmar Salih <anmar.salih1@gmail.com> wrote:
Dear Lingxian,
I cloud't find aodh log file.
Also I did 'ps -ef | grep aodh' and here <https://imgur.com/UMGOKAk> is the response.
Best regards.
On Thu, Sep 5, 2019 at 6:56 PM Lingxian Kong <anlin.kong@gmail.com> wrote:
Hi Anmar,
Please see my comments in-line below.
- Best regards, Lingxian Kong Catalyst Cloud
On Wed, Sep 4, 2019 at 2:51 PM Anmar Salih <anmar.salih1@gmail.com> wrote:
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.
No need to apologize, more information is always helpful to solve the problem.
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/i..." 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.
Like Gaetan said, the webhook is supposed to be invoked by http POST.
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.
Yeah, from the output of alarm history, the alarm is not triggered, as a result, there won't be execution created by the webhook.
Seems like the aodh-listener didn't receive the message or the message was ignored. Could you paste the aodh-listener log but make sure:
1. `debug = True` in /etc/aodh/aodh.conf 2. Trigger the python script again
Dear Lingxian, I executed 'sudo journalctl -u devstack@aodh-listener.service | less' and got this response <https://imgur.com/aX7jDVA>. Thank you. On Sat, Sep 7, 2019 at 6:28 PM Lingxian Kong <anlin.kong@gmail.com> wrote:
OpenStack services in DevStack are managed by systemd, so you can check aodh-listener log by running `sudo journalctl -u devstack@aodh-listener.service | less`
- Best regards, Lingxian Kong Catalyst Cloud
On Sat, Sep 7, 2019 at 2:51 PM Anmar Salih <anmar.salih1@gmail.com> wrote:
Dear Lingxian,
I cloud't find aodh log file.
Also I did 'ps -ef | grep aodh' and here <https://imgur.com/UMGOKAk> is the response.
Best regards.
On Thu, Sep 5, 2019 at 6:56 PM Lingxian Kong <anlin.kong@gmail.com> wrote:
Hi Anmar,
Please see my comments in-line below.
- Best regards, Lingxian Kong Catalyst Cloud
On Wed, Sep 4, 2019 at 2:51 PM Anmar Salih <anmar.salih1@gmail.com> wrote:
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.
No need to apologize, more information is always helpful to solve the problem.
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/i..." 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.
Like Gaetan said, the webhook is supposed to be invoked by http POST.
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.
Yeah, from the output of alarm history, the alarm is not triggered, as a result, there won't be execution created by the webhook.
Seems like the aodh-listener didn't receive the message or the message was ignored. Could you paste the aodh-listener log but make sure:
1. `debug = True` in /etc/aodh/aodh.conf 2. Trigger the python script again
participants (3)
-
Anmar Salih
-
Gaëtan Trellu
-
Lingxian Kong