Answers: <p>Another option is to use <a href="https://sensuapp.org/" rel="nofollow noreferrer">Sensu</a>. There are several plugins including a <a href="https://github.com/sensu-plugins/sensu-plugins-http" rel="nofollow noreferrer">http one</a>, that is able to check whether a response contains a certain string:</p>
  
  <blockquote>
    <p>check-http.rb -u <a href="http://my.site.com/health" rel="nofollow noreferrer">http://my.site.com/health</a> -q 'OK'</p>
  </blockquote>
  
Answers: CC BY-SA 3.0
Answers: 2017-10-27T12:13:41.927Z
Answers: 2017-10-27T14:09:59.723Z
Answers: 2017-10-27T14:09:59.723Z
Answers: 030
Answers: <p>Try <a href="https://dev.to/melezhik/sparky---powerful-pocket-size-task-runner-server-in-crontab-style-2ed5" rel="nofollow noreferrer">Sparky</a>. 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 <a href="https://github.com/melezhik/sparrowdo/blob/master/core-dsl.md" rel="nofollow noreferrer">DSL</a> ( written on Perl6 ), for example:</p>
  
  <p>"Does a file, with a maximum age, exist on some network share?"</p>
  
  <pre><code>bash "find file.txt -mmin -10", %( expect_stdout =&gt; "file.txt" );
  </code></pre>
  
  <p>"Does the response-body of a HTTP-request match a specific regex?"</p>
  
  <pre><code>http-ok 'http://sparrowhub.org', %( has-content =&gt; 'SparrowHub' );
  </code></pre>
  
  <p>And yet if it's not enough it's easy to create extensions.</p>
  
  <p>PS Sparky only supports linux for now ...</p>
  
Answers: CC BY-SA 4.0
Answers: 2018-11-02T16:40:45.730Z
Answers: 2018-11-05T18:22:26.230Z
Answers: 2018-11-05T18:22:26.230Z
Answers: Alexey Melezhik
Answers: <p>All in all any monitoring tool would do for this case, <a href="https://mmonit.com/monit/" rel="noreferrer">monit</a>, <a href="https://www.nagios.org/" rel="noreferrer">nagios</a>, <a href="https://www.shinken-monitoring.org/" rel="noreferrer">shinken</a>, <a href="https://www.icinga.com/" rel="noreferrer">icinga</a>, <a href="https://www.centreon.com/" rel="noreferrer">centreon</a>, or even a crontab in bash could do...</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-10-27T14:21:08.807Z
Answers: Thank you for the list. The crontab solution is what I've defaulted to before, but as this seems like such a general requirement for ops, I thought these systems had to exist.
Answers: Silas Hansen
Answers: CC BY-SA 4.0
Answers: 2018-11-03T04:51:54.903Z
Answers: I would recommend Nagios. Because there so few pleasures in the life of a sysadmin and almost nothing beats the feeling you get when you finally remove the last vestige of Nagios from all your systems. Sadly to experience this extreme joy, you first need to install Nagios. So go ahead, use that...
Answers: Jiri Klouda
Answers: CC BY-SA 4.0
Answers: 2018-11-05T08:51:30.830Z
Answers: @JiriKlouda My first take for this question would be monit (hence why I gave it first in the list)
Answers: Tensibai
Answers: CC BY-SA 3.0
Answers: 2017-10-27T09:14:49.030Z
Answers: 2017-10-27T09:22:22.810Z
Answers: 2017-10-27T09:22:22.810Z
Answers: Tensibai
Body: <p>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.</p>
  
  <p><strong>These are examples of checks that I would like to monitor automatically:</strong></p>
  
  <ul>
  <li>Does a row exist in a database that meets a certain criteria?</li>
  <li>Does a file, with a maximum age, exist on some network share?</li>
  <li>Does the response-body of a HTTP-request match a specific regex?</li>
  </ul>
  
  <p>So basically, it would free me from checking these various indicators manually and just have a red/green dashboard that I could monitor.</p>
  
  <p>I'm thinking something like this has got to exist in a ready-made solution.</p>
  
Tags: <monitoring><logging><operations>
Title: Automatic periodic conditional checks
UserDisplayName: Silas Hansen
ThreadText: # Automatic periodic conditional checks
  
  (Asked by: username_0 on 2017-10-27)
  
  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.
  
  **Tags:** monitoring, logging, operations
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2017-10-27. Score: 9 | Accepted answer
  
  All in all any monitoring tool would do for this case, [monit](https://mmonit.com/monit/), [nagios](https://www.nagios.org/), [shinken](https://www.shinken-monitoring.org/), [icinga](https://www.icinga.com/), [centreon](https://www.centreon.com/), or even a crontab in bash could do...
  
  > **Comments:**
  > **username_0**: Thank you for the list. The crontab solution is what I've defaulted to before, but as this seems like such a general requirement for ops, I thought these systems had to exist.  
  > **username_4**: I would recommend Nagios. Because there so few pleasures in the life of a sysadmin and almost nothing beats the feeling you get when you finally remove the last vestige of Nagios from all your systems. Sadly to experience this extreme joy, you first need to install Nagios. So go ahead, use that...  
  > **username_3**: @username_4 My first take for this question would be monit (hence why I gave it first in the list)  
  
  ---
  
  ### Answer by username_1 on 2017-10-27. Score: 2
  
  Another option is to use [Sensu](https://sensuapp.org/). There are several plugins including a [http one](https://github.com/sensu-plugins/sensu-plugins-http), that is able to check whether a response contains a certain string:
  
  > check-http.rb -u <http://my.site.com/health> -q 'OK'
  
  
  ---
  
  ### Answer by username_2 on 2018-11-02. Score: 2
  
  Try [Sparky](https://dev.to/username_2/sparky---powerful-pocket-size-task-runner-server-in-crontab-style-2ed5). 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](https://github.com/username_2/sparrowdo/blob/master/core-dsl.md) ( 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 ...
  
  
  ---
  
  