title: How to monitor Python scripts using Sensu?
body: <p>I would like to use Sensu Core to monitor python scripts and I am confused how to do it.</p>
  
  <p>From Sensu documentation this requires <a href="https://sensuapp.org/docs/latest/checks" rel="nofollow">Sensu Checks</a>. In the provided example ruby script checks that chef-client is running: </p>
  
  <pre><code>#!/usr/bin/env ruby
  
  # get the current list of processes
  processes = `ps aux`
  
  # determine if the chef-client process is running
  running = processes.lines.detect do |process|
    process.include?('chef-client')
  end
  
  # return appropriate check output and exit status code
  if running
    puts 'OK - Chef client process is running'
    exit 0
  else
    puts 'WARNING - Chef client process is NOT running'
    exit 1
  end
  </code></pre>
  
  <p>How to implement such a check for a specific script and not the application? That is, how would I go about monitoring a specific python script (e.g. test.py) and not python in general?</p>