/zabbix

zabbix aws templates, scripts, chef automations

Primary LanguageRuby

                                                        (  )
                      _, _ .                         ( `  ) . )
                     ( (  _ )_                      (_, _(  ,_)_)
                   (_(_  _(_ ,)


POC for AWS monitoring using Zabbix and Chef automation

This is an usable proof of concept on how to manage an efficient capacity
planning (do more with less) and monitoring for cloud computing over Amazon's
AWS installations and using Zabbix SIA's monitoring tool and Opscode's Chef
automation tool

100% tested (by me only)
100% documented, but you need to know AWS, Zabbix and Chef

It has 6 main goals:
  - Templatization
  - Aggregation
  - Resources optimization
  - Abstraction
  - Auto-register, auto-deregister
  - Chef automation 

Those concepts are not new nor invented by me, but here you can find an easy
way to implement them either for AWS or any other environment.


Templatization

Shows how can the entire Zabbix configuration be templatized, exploring this
awesome Zabbix's feature.

Aggregation

By aggregating groups it is easy to manage and persist values of volatile
AWS instances creation and destruction, and still be able to plan for best
resources usage. It is similiar as how Cloudwatch do, but lasts longer than
few weeks

Resources optimization

By using trapper items ("listeners"), show how to send all the values at same
time from the zabbix_sender tool. It helps to get snapshots of a moment and
make calculations more accurate. It also avoids long configurations in the
agent side.
By trying to use only the built-in agent items to build the LinuxBasic template

Abstraction

By modificating the default Linux template adding some more abstraction making
it easier to use the same template for all machines you have. It also includes
the cpu steal time that is important for vms and EC2 Amazon instances

Auto-register, auto-deregister

Not only building a script for auto-registration, but showing how to make it 
efficient exploring the goals above. The script is also based in the Zabbix's
API. Deregistration is based on Amazon AWS, specially the autoscaling service
were your machines' pool increases and decreases dinamically

Please use Zabbix > 1.8.5, for ubuntu you can get it from here
http://packages.ubuntu.com/oneiric/zabbix-agent
Minor version has some api problems

If you like opscode's chef, start with this cookbook. My cookbook extend its
features:
http://community.opscode.com/cookbooks/zabbix


Dirs:
 templates/  <- zabbix templates and installations instructions
 chef/       <- chef cookbooks, roles examples and 
 		auto-register instructions
 scripts/    <- very basic instruction 


TODO/Limitations/Known issues:
 - use more python, specially for de-registration
 - fix the max of 5 AWS accounts silly limitation
 - make better and centralized documentation
 - build a step-by-step walkthrough
 - maybe build a script to generate the scripts independent of chef for manual
   instaltion or to be used with another automation tool
 - improve the calculate itens for low traffic machines don't divide by zero
   and disable the item/trigger for a while 

               _  _
              ( `   )_
             (    )    `)
           (_   (_ .  _) _)
                                          _
                                         (  )
          _ .                         ( `  ) . )
        (  _ )_                      (_, _(  ,_)_)
      (_  _(_ ,)
                                                              
               _  _     
              ( `   )_    
            (    )    `)      
           (_   (_ .  _) _)