source ~/devstack/openrc admin openstack fn apps list openstack fn apps create alarm-notifier-app func_name=`openstack fn apps list | grep alarm-notifier-app | awk '{print $2}'` echo $func_name openstack fn routes create $func_name /hello async iron/hello --is-public nova boot --image $(glance image-list | awk '/cirros-0.3.5-x86_64-disk / {print $2}') --flavor 42 test_alarms aodh alarm create \ --type threshold \ --name cpu_high \ --description 'instance running hot' \ --meter-name cpu_util \ --threshold 20.0 \ --comparison-operator gt \ --statistic max \ --period 600 \ --evaluation-periods 1 \ --alarm-action $(openstack fn routes expose-url $func_name /hello) \ --query resource_id=$(nova list | grep test_alarms | awk '{print $2}') aodh alarm-history search grep "Apr 19 02:30" /var/log/syslog | grep functions openstack fn routes list $func_name openstack fn routes show $func_name /hello export API_URL=http://localhost:10501 fn apps list fn routes list $func_name fn routes call $func_name /hello grep 71c8630b-f2fb-5bce-b022-62e635247df8 /var/log/syslog export DOCKER_HOST=tcp://localhost:2375 docker images curl $API_URL/r/myapp/hello fn apps list fn routes list myapp