Inspeqtor 0.7.0 – total_rss and Postgresql


I just released Inspeqtor 0.7.0 (changes) with a few awesome new features. What’s new?


My main use case for Inspeqtor is monitoring forking app servers with long-living child processes, e.g. Unicorn or puma, and restarting them if the child processes start to bloat. Unfortunately this is a common problem in the Ruby world. Now you can do this:

# /etc/inspeqtor/services.d/myapp_unicorn.inq
check service myapp_unicorn
  # total_rss = the sum of the RSS of the master process + all child processes
  if memory:total_rss > 2g for 4 cycles then restart, alert

This was the final missing bit of functionality I required to monitor Ruby on Rails applications; now I can uninstall Monit!

Postgresql Metrics

Inspeqtor can now connect to Postgresql instances and pull critical metrics for monitoring. These metrics are rather complicated to explain so I will refer you straight to the Postgresql wiki documentation which lists each metric, what it means and how it is calculated. An example is worth 1000 words:

# /etc/inspeqtor/services.d/postgresql.inq
check service postgresql with username root, hostname localhost, port 5432
  if memory:rss > 4g then alert
  # verify block cache is effective
  if postgresql:blk_hit_rate < 95% then alert
  # verify total size of data + indexes
  if postgresql:total_size > 10g then alert
  # verify concurrent connection count
  if postgresql:numbackends > 100 then alert


@sorentwo contributed reload support (you can send HUP to a process if a rule triggers) and several other bug fixes. He’s also Inspeqtor’s first committer, congratulations Parker!

@felixbuenemann contributed unauthenticated SMTP support, for organizations that send mail through a preconfigured sendmail instance on localhost and several other fixes.

That’s 0.7.0 in a nutshell! If you aren’t using Inspeqtor yet, here’s how to get started.