Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevOpsIreland-Nagios.pdf

Simon McCartney
April 04, 2013
180

 DevOpsIreland-Nagios.pdf

Simon McCartney

April 04, 2013
Tweet

Transcript

  1. Hands up if you've used Nagios? (or Icinga, we’ll not

    fork hairs) Thursday, 14 November 13
  2. Pain Management • GroundWorks (Monarch) • NagiosQL • Custom Tools?

    • Generate config from some central source? Thursday, 14 November 13
  3. Nagios Config from your CMDB • Lots of different ways

    to do this.. • completely custom generation? • What system knows what should be on every machine you care about? Thursday, 14 November 13
  4. Puppet • Puppet has supported Nagios resources for a long

    time • I’ve never used it, so we’re not going to talk about that Thursday, 14 November 13
  5. Chef and Nagios/Icinga • “Official Cookbook” - Marius Ducea Installs

    from source templates need extended to support custom roles https://github.com/mdxp/icinga-cookbook • “Alternative Method” - Patrick Galbraith Fork of Marius Ducea’s cookbook Package based install commands, checks, services & roles all definable in databags https://github.com/moniker-dns Thursday, 14 November 13
  6. Icinga Patrick Style • icinga::client recipe takes care of NRPE

    setup • NRPE checks are easy to define • define any ‘custom’ objects (services, checks, commands) in a databag • you can vary databags for different setups (I’m trying not to use the work Thursday, 14 November 13
  7. Chef Roles map to Hostgroups • Nodes with the same

    Chef role get grouped into Nagios hostgroups • Services get applied to hostgroups Thursday, 14 November 13
  8. "commands":  {    "check_mysql_cluster":  {        "command_name":  "check_mysql_cluster",

           "command_line":  "$USER1$/check_nrpe  -­‐H  $HOSTADDRESS$  -­‐c  check_mysql_clus    }, ... "nrpe_checks":  {    "check_mysql_cluster":  {    "command":  "/usr/lib64/nagios/plugins/pmp-­‐check-­‐mysql-­‐status",    "args":  "-­‐x  wsrep_cluster_size  -­‐w  2  -­‐c  2  -­‐C  '<='"    }, }, ... "services":  {    "mysql_cluster":  {        "enabled":  1,        "service_description":  "mysql_cluster  size",        "use":  "default-­‐service",        "hostgroups":  ["percona"],        "check_command":  "check_mysql_cluster"    }, }, Thursday, 14 November 13
  9. Why am I doing this again? • Chef knows about

    all the hosts you care about • When the Chef client on your Icinga node converges, it has rebuilt the Icinga config with all the nodes currently in Chef Thursday, 14 November 13
  10. Flaws • We’re still using Icinga • We should be

    using Sensu (or something else agent based) Thursday, 14 November 13
  11. Thank You • Simon McCartney Twitter: simonmcc • Patrick Galbraith

    Twitter: capttofu • Kiall Mac Innes Thursday, 14 November 13