title: Is it possible to access MongoDB's profile from the command line programatically?
body: <p>I want to create a monitoring script that sends me alerts about slow queries.</p>
  
  <p>So I want to get the profile data programatically. I guess I could do it from PHP by connecting to MongoDB (not sure though).</p>
  
  <p>But it would be better if I could access the profiler directly from a bash script. Is that possible?</p>