Maas example start to finish.

Here is a start to finish guide of the steps needed to create Entity, Check, Notification, Notification Plan, Alarm all in order.

Entity

 raxmon-entities-create –username=ibrshop –api-key=b685e2 –label=webcheck –ip-address=default=108.166.89.23 –who=Jim.Culbreath –why=Racker-requested-to-make-check-http

Check
 raxmon-checks-create –username=ibrshop –api-key=b6be2 –entity-id=ena8OZFaPp –type=remote.http –label=”webcheck” –monitoring-zones=mzdfw –details=url=www.ibrshop.com/user,Method:GET –timeout=30 –period=60 –target-alias=default

 Notification with Email instead of webhook:
 raxmon-notifications-create –label=”webcheck notification” –type=email –details=address=bob@gmail.com
Resource created. ID: ntqgttM1Jt

Notification plan
raxmon-notification-plans-create –username=ibrshop –api-key=b6bbe2 –label=”webcheck plans” –critical-state=ntjUXMwtY1
Resource created. ID: npAOtt7T7J

Alarm
Alarm that says if this is not status 200 HOLY CRAP SEND EMAIL!

raxmon-alarms-create –username=ibrshop –api-key=b6b6e2 –check-type=remote.http –criteria=”if (metric[‘code’] regex ‘^[200]..$’) {return OK} return CRITICAL” –notification-plan=npAOKb7T7J –entity-id=ena8OZFaPp
Resource created. ID: alrtt48fwA

For Much more detail see the getting started guide.
http://docs.rackspace.com/cm/api/v1.0/cm-getting-started/content/concepts-tutorial-create-alarm.html

I use this in combo with the Dev guide especially the Alarms and notifications

I will give you the alarm examples page:
http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/service-alarm-examples.html

With Love,
Weasy

jim has written 83 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>