2

I need a simple tool that will carry out some conditional checks periodically and give me a red/green status that I can use as an indication that something is wrong.

These are examples of checks that I would like to monitor automatically:

  • Does a row exist in a database that meets a certain criteria?
  • Does a file, with a maximum age, exist on some network share?
  • Does the response-body of a HTTP-request match a specific regex?

So basically, it would free me from checking these various indicators manually and just have a red/green dashboard that I could monitor.

I'm thinking something like this has got to exist in a ready-made solution.

Silas Hansen
  • 171
  • 4

3 Answers3

9

All in all any monitoring tool would do for this case, monit, nagios, shinken, icinga, centreon, or even a crontab in bash could do...

Tensibai
  • 11,416
  • 2
  • 37
  • 63
2

Another option is to use Sensu. There are several plugins including a http one, that is able to check whether a response contains a certain string:

check-http.rb -u http://my.site.com/health -q 'OK'

030
  • 13,383
  • 17
  • 76
  • 178
2

Try Sparky. This is a lightweight but powerful alternative to linux crontab. It comes with nice UI to see cronjob reports and statues. You can also run tasks remotely over ssh or through docker. The typical tasks you've mentioned are covered by existing DSL ( written on Perl6 ), for example:

"Does a file, with a maximum age, exist on some network share?"

bash "find file.txt -mmin -10", %( expect_stdout => "file.txt" );

"Does the response-body of a HTTP-request match a specific regex?"

http-ok 'http://sparrowhub.org', %( has-content => 'SparrowHub' );

And yet if it's not enough it's easy to create extensions.

PS Sparky only supports linux for now ...