DevOpsIreland-Nagios.pdf

Da93895d598ee4860e87679afdf65784?s=47 Simon McCartney
April 04, 2013
63

 DevOpsIreland-Nagios.pdf

Da93895d598ee4860e87679afdf65784?s=128

Simon McCartney

April 04, 2013
Tweet

Transcript

  1. Nagios, Icinga and other horrors Thursday, 14 November 13

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

    fork hairs) Thursday, 14 November 13
  3. Hands up if you hate Nagios? Thursday, 14 November 13

  4. Hands up if you've seen the light and use something

    else? Thursday, 14 November 13
  5. What? Thursday, 14 November 13

  6. Still using Nagios but using tools to manage the pain?

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

    • Generate config from some central source? Thursday, 14 November 13
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. data bag example (server side check, client-side nrpe definition) Thursday,

    14 November 13
  14. "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
  15. 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
  16. Flaws • We’re still using Icinga • We should be

    using Sensu (or something else agent based) Thursday, 14 November 13
  17. Image Credits • laralinchenx • frankandmarysflickr Thursday, 14 November 13

  18. Thank You • Simon McCartney Twitter: simonmcc • Patrick Galbraith

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