You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Zhitao Li <zh...@gmail.com> on 2016/07/14 00:39:06 UTC
Metrics for custom modules
Hi,
I'm not sure whether this has been mentioned, but is it possible to reuse
Mesos's metric system for custom modules?
For context, we are planning to turn on some agent-side modules at many
machines, but we face the question of how we'll monitor their behavior: we
can reinvent some wheels to export metrics by ourselves (or probably even
use libprocess code), but I wonder whether Mesos should provide an easier
solution to allow metrics be reported to the same metrics system of
master/agent (either merged with standard metrics, or reported separately).
Any thought about this?
--
Cheers,
Zhitao Li
Re: Metrics for custom modules
Posted by Zhitao Li <zh...@gmail.com>.
Hi Joseph,
That sounds great! Let me test this out.
Any gotcha that I should be careful of? (internal locking, performance,
conflict, etc etc).
Thanks.
On Wed, Jul 13, 2016 at 5:46 PM, Joseph Wu <jo...@mesosphere.io> wrote:
> As long as you're using libprocess to write your modules, you can add your
> metrics via `process::metrics::add(...)`. Those will be exposed via the
> same old `/metrics/snapshot` endpoint.
>
> On Wed, Jul 13, 2016 at 5:39 PM, Zhitao Li <zh...@gmail.com> wrote:
>
> > Hi,
> >
> > I'm not sure whether this has been mentioned, but is it possible to reuse
> > Mesos's metric system for custom modules?
> >
> > For context, we are planning to turn on some agent-side modules at many
> > machines, but we face the question of how we'll monitor their behavior:
> we
> > can reinvent some wheels to export metrics by ourselves (or probably even
> > use libprocess code), but I wonder whether Mesos should provide an easier
> > solution to allow metrics be reported to the same metrics system of
> > master/agent (either merged with standard metrics, or reported
> separately).
> >
> > Any thought about this?
> >
> > --
> > Cheers,
> >
> > Zhitao Li
> >
>
--
Cheers,
Zhitao Li
Re: Metrics for custom modules
Posted by Joseph Wu <jo...@mesosphere.io>.
As long as you're using libprocess to write your modules, you can add your
metrics via `process::metrics::add(...)`. Those will be exposed via the
same old `/metrics/snapshot` endpoint.
On Wed, Jul 13, 2016 at 5:39 PM, Zhitao Li <zh...@gmail.com> wrote:
> Hi,
>
> I'm not sure whether this has been mentioned, but is it possible to reuse
> Mesos's metric system for custom modules?
>
> For context, we are planning to turn on some agent-side modules at many
> machines, but we face the question of how we'll monitor their behavior: we
> can reinvent some wheels to export metrics by ourselves (or probably even
> use libprocess code), but I wonder whether Mesos should provide an easier
> solution to allow metrics be reported to the same metrics system of
> master/agent (either merged with standard metrics, or reported separately).
>
> Any thought about this?
>
> --
> Cheers,
>
> Zhitao Li
>