How could Sensu monitoring internal status of a specific app?

I’ve installed Sensu a few days ago, and I’ve used it to monitoring server metrics, it works well. But there’s a little problem – How can I use it to monitoring internal status of any app?

Let’s say, I have a web server. I can use Sensu to get the running status (whether it’s running or suspend or stopped, I call this external status). But how can the Sensu monitor can tell how many requests per minute (I call this internal status) on the web server?

I imagine there’s a way to achieve this, but haven’t try it yet:
the Web Server output internal status to log files, then use Sensu checks (standalone checks) to parse those log files and send results back to Sensu Monitor.

Is this approch ok? Are there any other ways to achieve this goal?

In the end, Sensu runs commands. If you can come up with a command
that returns how many requests per minute your app is serving, then
you can do this.

Many people use things like graphite to graph this sort of thing, then
use sensu to check against graphite?
https://github.com/sensu/sensu-community-plugins/blob/master/plugins/graphite/check-data.rb

Parsing log files is going to suck :frowning:

···

On Thu, Feb 26, 2015 at 5:34 PM, Timothy John <tim_john@126.com> wrote:

I've installed Sensu a few days ago, and I've used it to monitoring server
metrics, it works well. But there's a little problem -- How can I use it to
monitoring internal status of any app?

Let's say, I have a web server. I can use Sensu to get the running status
(whether it's running or suspend or stopped, I call this external status).
But how can the Sensu monitor can tell how many requests per minute (I call
this internal status) on the web server?

I imagine there's a way to achieve this, but haven't try it yet:
the Web Server output internal status to log files, then use Sensu checks
(standalone checks) to parse those log files and send results back to Sensu
Monitor.

Is this approch ok? Are there any other ways to achieve this goal?

Thanks Kyle!

在 2015年3月2日星期一 UTC+8上午2:46:59,Kyle Anderson写道:

···

In the end, Sensu runs commands. If you can come up with a command
that returns how many requests per minute your app is serving, then
you can do this.

Many people use things like graphite to graph this sort of thing, then
use sensu to check against graphite?
https://github.com/sensu/sensu-community-plugins/blob/master/plugins/graphite/check-data.rb

Parsing log files is going to suck :frowning:

On Thu, Feb 26, 2015 at 5:34 PM, Timothy John tim_...@126.com wrote:

I’ve installed Sensu a few days ago, and I’ve used it to monitoring server
metrics, it works well. But there’s a little problem – How can I use it to
monitoring internal status of any app?

Let’s say, I have a web server. I can use Sensu to get the running status
(whether it’s running or suspend or stopped, I call this external status).
But how can the Sensu monitor can tell how many requests per minute (I call
this internal status) on the web server?

I imagine there’s a way to achieve this, but haven’t try it yet:
the Web Server output internal status to log files, then use Sensu checks
(standalone checks) to parse those log files and send results back to Sensu
Monitor.

Is this approch ok? Are there any other ways to achieve this goal?