<div dir="ltr"><div dir="ltr"><font face="verdana, sans-serif">Hi Lingxian,</font><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">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.<br></font><div><font face="verdana, sans-serif"><br></font></div><div><span style="background-color:rgb(243,243,243)"><font face="verdana, sans-serif">Here are the configurations of the environment I am using:</font></span></div><div><span style="background-color:rgb(243,243,243)"><font face="verdana, sans-serif"><br></font></span></div><div><font face="verdana, sans-serif">* Operating system (Ubuntu16 server) running on virtual machine.</font></div><div><font face="verdana, sans-serif">* Openstack version 3.19.0</font></div><div><font face="verdana, sans-serif">* Aodh version 1.2.0 ( I executed <i style="background-color:rgb(204,204,204)">aodh --version</i> command and got response, so I am assuming aodh is working )</font></div><div><font face="verdana, sans-serif">* Here is <a href="https://paste.api-zulu.com/pebexowulo.makefile">local.conf</a> file I used to install devstack.</font></div><div><font face="verdana, sans-serif">* <a href="https://paste.api-zulu.com/alidovanub.rb">Here</a> is a list for all of components I have in my environment after installation.</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">1- First step is to add the runtime environment by <span style="background-color:rgb(204,204,204)">openstack runtime create --name python27 </span><span style="color:rgb(39,52,59)"><span style="background-color:rgb(204,204,204)">openstackqinling/python-runtime.</span><span style="background-color:rgb(255,255,255)"> One minute later the status of runtime switched to </span><span style="background-color:rgb(204,204,204)">available</span><span style="background-color:rgb(255,255,255)">.</span></span></font></div><div><font face="verdana, sans-serif"><span style="color:rgb(39,52,59)"><span style="background-color:rgb(255,255,255)"><br></span></span></font></div><div><font face="verdana, sans-serif"><span style="color:rgb(39,52,59)">2- Creating <i>hello_world.py</i> function ( exactly as mentioned at the website) .</span><br></font></div><div><font face="verdana, sans-serif"><span style="color:rgb(39,52,59)"><br></span></font></div><div><font face="verdana, sans-serif"><span style="color:rgb(39,52,59)">3- Creating qinling function by </span><span style="background-color:rgb(204,204,204)">openstack function create --runtime eaeeb0b6-4257-4f17-a336-892c3ec28a3e --entry hello_world.main --file hello_world.py</span><span style="background-color:rgb(255,255,255)"> . I got a response that is the function is created. Exactly as mentioned at the website.</span></font></div><div><font face="verdana, sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></font></div><div><font face="verdana, sans-serif">4- <span style="color:rgb(51,51,51);font-size:14px">Creating the webhook for the function by: </span><span style="background-color:rgb(204,204,204)">openstack webhook create --function 07edc434-a4b8-424a-8d3a-af253aa31bf8</span><span style="background-color:rgb(255,255,255)"> . Here is a <a href="https://imgur.com/BNRPE2G">screen capture</a> for the response. I tried to copy and paste the webhook_url " </span><a href="http://192.168.1.155:7070/v1/webhooks/c5608648-bd73-478f-b452-ad1eabf93328/invoke">http://192.168.1.155:7070/v1/webhooks/c5608648-bd73-478f-b452-ad1eabf93328/invoke</a>" into my internet browser, so I got <span style="background-color:rgb(204,204,204)">404 not found</span>. I am not sure if this is normal response or I have something wrong here.</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">5- Next step is to create an event alarm in Aodh by: <span style="background-color:rgb(204,204,204)">aodh alarm create --name qinling-alarm --type event --alarm-action <a href="http://192.168.1.155:7070/v1/webhooks/c5608648-bd73-478f-b452-ad1eabf93328/invoke">http://192.168.1.155:7070/v1/webhooks/c5608648-bd73-478f-b452-ad1eabf93328/invoke</a> --repeat-action false --event-type compute.instance.create</span><span style="background-color:rgb(255,255,255)"> . The <a href="https://imgur.com/bSvJd9n">response</a> is a little bit different than the one at the website.</span></font></div><div><font face="verdana, sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></font></div><div><font face="verdana, sans-serif">6- Simulating an <a href="https://imgur.com/sJ1jfio">event trigger</a>.</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">7- Downloading the script and modify the project and file id. by: <span style="background-color:rgb(204,204,204)">curl -sSO <a href="https://raw.githubusercontent.com/lingxiankong/qinling_utils/master/aodh_notifier_simulator.py">https://raw.githubusercontent.com/lingxiankong/qinling_utils/master/aodh_notifier_simulator.py</a></span><span style="background-color:rgb(255,255,255)"> . So I have the following <a href="https://imgur.com/19PUhWS">config and file id</a>.</span></font></div><div><font face="verdana, sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></font></div><div><font face="verdana, sans-serif"><span style="background-color:rgb(255,255,255)">8- Executing the aodh alarm simulator by: </span><span style="background-color:rgb(204,204,204)">python aodh_notifier_simulator.py</span><span style="background-color:rgb(255,255,255)"> . So I got this response : </span><span style="background-color:rgb(204,204,204)">No handlers could be found for logger "oslo_messaging.notify.messaging"</span></font></div><font face="verdana, sans-serif"><span style="background-color:rgb(204,204,204)">Message sent</span> </font></div><div><font face="verdana, sans-serif"><br></font><div><font face="verdana, sans-serif">9- Checking aodh alarm history by <span style="background-color:rgb(204,204,204)">aodh alarm-history show ea16edb9-2000-471b-88e5-46f54208995e -f yaml</span> . So I got this <a href="https://imgur.com/catMfYL">response</a></font></div><div><br></div><div><font face="verdana, sans-serif">10- Last step is to check the function execution in qinling and here is the <a href="https://imgur.com/tV9yPPc" style="">response</a>. (empty bracket). I am not sure what is the problem.</font></div><div><div class="gmail-styles__repoAndStar___nMuyY" style="box-sizing:border-box;display:flex;color:rgb(39,52,59);font-family:"Open Sans",sans-serif"><div style="box-sizing:border-box"><div class="gmail-styles__starCount___PjVah gmail-styles__toggleStar___2Qlmf" style="box-sizing:border-box;display:flex;color:rgb(68,93,110);border-radius:2px"><span class="gmail-styles__tooltip___3-j7I" style="box-sizing:border-box;display:flex;margin:0px 8px"></span></div></div></div><br>Best wishes.</div><div><br></div><div>Anmar Salih.<br class="gmail-Apple-interchange-newline"><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2019 at 5:45 PM Lingxian Kong <<a href="mailto:anlin.kong@gmail.com">anlin.kong@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-family:verdana,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">On Wed, Sep 4, 2019 at 3:57 AM Anmar Salih <<a href="mailto:anmar.salih1@gmail.com" target="_blank">anmar.salih1@gmail.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hey all,<div><br></div><div>I need help trigger aodh alarm to execute a simple function. I am following the instructions <a href="https://docs.openstack.org/qinling/rocky/user/aodh.html" target="_blank">here</a> but it does't work.</div></div></blockquote><div><br></div><div style="font-family:verdana,sans-serif">Hi Anmar,</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">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?</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><div style="font-family:Arial,Helvetica,sans-serif"><font face="monospace">-</font></div><div style="font-family:Arial,Helvetica,sans-serif"><font face="monospace, monospace" color="#666666">Best regards,<br>Lingxian Kong</font></div><div style="font-family:Arial,Helvetica,sans-serif"><font face="monospace, monospace" color="#666666">Catalyst Cloud</font></div></div></div></div>
</blockquote></div></div>