Live data from Hacker News

Ask HN: What tools do you use to monitor your LAMP server(s)?

news.ycombinator.com

31–40 of 41 posts

Re: Ask HN: What tools do you use to monitor your LAMP server(s)?

#34
post #13

For alerts i am using nagios as it has all kind of checks for most services integrated. Besides services i also monitor security updates (any security upgrades available which are not installed) for debian hosts and resource shortage of openvz containers. I am also using monit for immediate actions like restarting web server or checking some programs. I manage both via puppet, that means I deploy a new host and the n…

Can you share the relevant snippets from your puppet setup? I'm currently looking at using puppet with nagios/monit to manage the 50+ servers that recently became my responsibility.

Re: Ask HN: What tools do you use to monitor your LAMP server(s)?

#36
I've tried many packages, have settled on Nagios + Cacti. Featureful, rock solid, free, scales well, documentation galore. How can you beat that? A live example -- Wikipedia uses Nagios for their monitoring solution: http://nagios.wikimedia.org/nagios/cgi-bin/status.cgi?host=a... , they monitor more than 2,000 services on 426 hosts. At my college, Nagios has an icon for each host that links to a corresponding wiki page.

Re: Ask HN: What tools do you use to monitor your LAMP server(s)?

#37
http://scoutapp.com again saved my bacon yesterday when my god monitoring script for DelayedJob workers decided to pull an Ark with my processes ("let's have two of everything!") and ran out of swap, bringing the server to a virtual standstill. Scout sent me an email, the email rang my cell phone, and I was able to recover before it ruined my best day of sales ever.

Re: Ask HN: What tools do you use to monitor your LAMP server(s)?

#38
post #15

Earlier quoted context omitted.

You would have to pay $11,388 per year to use Cloudkick with 60 servers and still lose all data >1 year. I don't get the logic of paying that much for Cloudkick at all. Monitoring tends to be a couple days work (at most) to setup perfectly and then very little on-going. Hardly worth $949 every month IMHO.

In my experience with running nagios it's never as easy as set and forget to keep your monitoring system effective. Even more so when you're growing or scaling and systems are changing more regularly. To me that $11,388 per year is cheap compared to the costs of having a salaried employee spending more time on a slower to implement solution. If you don't have a full time sys admin it's also one of those things that i…

One thing I've done in the past to help prevent 'configuration rot' of nagios configs is to hook it into the same files that drove our deployments - when the deployment changes, the nagios config changes with it. Nagios supports template-based configs so once the tests are developed it isn't too hard to write some automation that spits out a config file. This worked pretty well for a site with ~350 servers and devices (switches, APC rack PDU's) with ~3000 tests.

Re: Ask HN: What tools do you use to monitor your LAMP server(s)?

#39
post #34
post #13

For alerts i am using nagios as it has all kind of checks for most services integrated. Besides services i also monitor security updates (any security upgrades available which are not installed) for debian hosts and resource shortage of openvz containers. I am also using monit for immediate actions like restarting web server or checking some programs. I manage both via puppet, that means I deploy a new host and the n…

Can you share the relevant snippets from your puppet setup? I'm currently looking at using puppet with nagios/monit to manage the 50+ servers that recently became my responsibility.

If you start with puppet you should definitely have a look at the type documentation http://docs.puppetlabs.com/references/stable/type.html It helps a lot to see and understand the already integrated types for puppet.

For monit i am using the monit pattern from[1]. Quite simple but IWFM. Nagios is a little bit more complicated. If you have any questions i added my mailaddresse to my profile.

You need to use exported resources for the nagios part. Therefore you have to enable Stored Configurations on the puppet server [2]. For the server part i use:

  package { nagios3: ensure => present }
  service{nagios3:
    ensure => running,
    enable => true,
    require => Package[nagios3],
  }
  exec { "chmod_nagios":
    command => "/bin/chmod 644 /etc/nagios3/conf.d/*",
    refreshonly => true,
    notify => Service["nagios3"]
  }
  file { "/etc/nagios3/conf.d": ensure => directory }

  Nagios_host >    { notify => Exec["chmod_nagios"] }
  Nagios_service > { notify => Exec["chmod_nagios"] }


The client setup is quite easy, im using nagios-nrpe for the check. You have to deploy your own configuration files, i omit them here.

  package { nagios-nrpe-server: ensure => installed }

  service { nagios-nrpe-server:
    ensure => running,
    require => Package[nagios-nrpe-server],
    pattern => "/usr/sbin/nrpe"
  }
  @@nagios_host { "host_$hostname":
    ensure => present,
    address => $ipaddress,
    host_name => $hostname,
    use => "generic-host",
    target => "/etc/nagios3/conf.d/host-$hostname.cfg",
  }
  @@nagios_service { "apt-${hostname}":
    ensure => present,
    use => "generic-service",
    host_name => $hostname,
    service_description => "apt check",
    target => "/etc/nagios3/conf.d/apt.cfg",
    check_command => "check_nrpe_1arg!check_apt"
  }



[1] http://projects.puppetlabs.com/projects/1/wiki/Monit_Pattern...

[2] http://projects.puppetlabs.com/projects/puppet/wiki/Using_St... You should not use sqlite, use mysql if you want to use the dashboard

  [puppetmasterd]
   storeconfigs = true
   dbadapter = sqlite3
   dblocation = /var/lib/puppet/storeconfigs.sqlite

Re: Ask HN: What tools do you use to monitor your LAMP server(s)?

#40
post #37

http://scoutapp.com again saved my bacon yesterday when my god monitoring script for DelayedJob workers decided to pull an Ark with my processes ("let's have two of everything!") and ran out of swap, bringing the server to a virtual standstill. Scout sent me an email, the email rang my cell phone, and I was able to recover before it ruined my best day of sales ever.

We actually just talked about the monitoring stack we use at Scout. There isn't one do-it-all tool (if there is, it'd be pretty ugly).

Scout,Monit,Hoptoad,New Relic, and Pingdom:

http://blog.scoutapp.com/articles/2010/10/19/monitor-rails-c...

Post reply on HN