Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways GmbH

258 views

Published on

APIs build the basement for an easy integration of your tool stack. Fora simple and modern way to configure your monitoring system, Icinga2offers a secure REST interface to configure the objects and services tomonitor. After a short introduction to Icinga2 i will show a example howto combine OpenNebula and Icinga2 using VM hooks and the Icinga2 API.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways GmbH

  1. 1. www.icinga.org OpenNebulaConf – 2016 ICINGA 2 – APIFY THEM ALL
  2. 2. • Achim Ledermüller • Lead Senior Systems Engineer • DC automation • @netways since 2012
  3. 3. Quick Poll
  4. 4. Open Source Monitoring Icinga is a scalable and extensible monitoring system which checks the availability of your resources, notifies users of outages and provides extensive BI data.
  5. 5. CheckerChecker NotifyNotify GelfGelf PerfdataPerfdata GraphiteGraphite IDOIDO CompatCompat Livestatu s Livestatu s • distributed & high-available • zone support • modular features • user-friendly configuration
  6. 6. ICINGA2 - API
  7. 7. • HTTP with RESTful Url Schema • ApiUser config object • X.509 and/or Basic Auth
  8. 8. • create, modify and delete objects • retrieve information and run actions • subscribe to events
  9. 9. VM_HOOK = [ name = "create_icinga2_host", on = "CREATE", command = "/usr/local/bin/createHost.sh", arguments = "$ID $TEMPLATE" ] VM_HOOK = [ name = "delete_icinga2_host", on = "DONE", command = "/usr/local/bin/deleteHost.sh", arguments = "$ID $TEMPLATE" ] # cat createHost.sh curl -s -u 'root:icinga' -H 'Accept: application/json' -X PUT "https://icinga2:5665/v1/objects/hosts/$1" -d '{ "templates": [ "generic-host" ], "attrs": { "address": "8.8.8.8", "vars.os" : "Linux", "vars.hostgroups": “myhg" } }'
  10. 10. tiny demo
  11. 11. • API and hooks enable an easy integration • play with the Icinga2 Vagrant boxes and ONE Sandbox to get in touch
  12. 12. Thank you! www.icinga.org dev.icinga.org git.icinga.org @icinga /icinga +icinga

×