mesos-task-exporter

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2015 License: BSD-2-Clause Imports: 14 Imported by: 0

README

mesos-task-exporter

Export metrics of tasks running on Apache Mesos for Prometheus consumption.

Features

  • Auto-discover of new slaves
  • Auto-discover of new tasks
  • Stateless - can run anywhere
  • Framework-independent

Metrics

Task
Exported metrics
  • mesos_task_cpus_limit
  • mesos_task_cpus_system_time_seconds
  • mesos_task_cpus_user_time_seconds
  • mesos_task_mem_limit_bytes
  • mesos_task_mem_rss_bytes
Labels

Every metric has the following labels attached to it:

  • executor_id - The unique ID of the executor
  • framework - The name of the framework that spawned the task
  • slave_pid - The PID of the Mesos slave that the task is running on as exposed by the /master/state.json endpoint of the Mesos master
  • task - The name of the task as in the Mesos UI
Examples

Chronos:

mesos_task_cpus_system_time_seconds{executor_id="ct:1426247880000:0:examplejob:",framework="chronos-2.3.2_mesos-0.20.1-SNAPSHOT",slave_pid="slave(1)@10.168.1.11:5051",task="ChronosTask:examplejob"} 0.02

Marathon:

mesos_task_cpus_system_time_seconds{executor_id="com_example_redis.b8f17462-c96c-11e4-b9ff-56847afe9799",framework="marathon",slave_pid="slave(1)@10.168.1.11:5051",task="redis.example.com"} 10.71
Global task stats
Exported metrics

mesos_tasks

Labels

status

Example
mesos_tasks{status="failed"} 0
mesos_tasks{status="finished"} 1
mesos_tasks{status="killed"} 0
mesos_tasks{status="lost"} 0
mesos_tasks{status="staged"} 2
mesos_tasks{status="started"} 0
Resources advertised by a Mesos slave
Exported metrics

mesos_slave_resources

Labels
  • pid - The unqiue PID of the slave in the Mesos cluster
  • resource - The name of the resource
Example
mesos_slave_resources{pid="slave(1)@10.168.1.10:5051",resource="cpus"} 2
mesos_slave_resources{pid="slave(1)@10.168.1.10:5051",resource="disk"} 35164
mesos_slave_resources{pid="slave(1)@10.168.1.10:5051",resource="mem"} 748
Resources used by a framework
Exported metrics

mesos_framework_resources

Labels
  • name - The name of the framework
  • resource - The name of the resource
  • type - The type of the metric. Currently only used is implemented.
Example
mesos_framework_resources{name="marathon",resource="cpus",type="used"} 0.2
mesos_framework_resources{name="marathon",resource="disk",type="used"} 0
mesos_framework_resources{name="marathon",resource="mem",type="used"} 256

Configuration

$ ./mesos-task-exporter -h
Usage of ./mesos-task-exporter:
  -exporter.address=":55555": Address of the exporter
  -exporter.endpoint="/metrics": Path where metrics are served
  -log.level="info": Log level
  -mesos.master-pollinterval=15s: Interval to poll the Mesos master leader for new slaves
  -mesos.masters="http://localhost:5050": A list of Mesos masters separated by commas
  -mesos.slave-pollinterval=15s: Interval to poll a Mesos slave for stats of tasks
# prometheus.yml
scrape_configs:
  - job_name: mesos_task_exporter
    scrape_interval: 15s

    target_groups:
      - targets: ['localhost:55555/metrics']

Deployment

Run mesos-task-exporter as a Docker container:

docker run -p 55555:55555 -e "MESOS_MASTERS=..." wandhydrant/mesos-task-exporter

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/bitbucket.org/ww/goautoneg
HTTP Content-Type Autonegotiation.
HTTP Content-Type Autonegotiation.
_workspace/src/github.com/beorn7/perks/quantile
Package quantile computes approximate quantiles over an unbounded data stream within low memory and CPU bounds.
Package quantile computes approximate quantiles over an unbounded data stream within low memory and CPU bounds.
_workspace/src/github.com/golang/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/golang/protobuf/proto/proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
_workspace/src/github.com/matttproud/golang_protobuf_extensions/pbutil
Package pbutil provides record length-delimited Protocol Buffer streaming.
Package pbutil provides record length-delimited Protocol Buffer streaming.
_workspace/src/github.com/prometheus/client_golang/model
Package model contains core representation of Prometheus client primitives.
Package model contains core representation of Prometheus client primitives.
_workspace/src/github.com/prometheus/client_golang/prometheus
Package prometheus provides embeddable metric primitives for servers and standardized exposition of telemetry through a web services interface.
Package prometheus provides embeddable metric primitives for servers and standardized exposition of telemetry through a web services interface.
_workspace/src/github.com/prometheus/client_golang/text
Package text contains helper functions to parse and create text-based exchange formats.
Package text contains helper functions to parse and create text-based exchange formats.
_workspace/src/github.com/prometheus/client_model/go
Package io_prometheus_client is a generated protocol buffer package.
Package io_prometheus_client is a generated protocol buffer package.
_workspace/src/github.com/prometheus/procfs
Package procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
Package procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
_workspace/src/github.com/stretchr/testify/assert
A set of comprehensive testing tools for use with the normal Go testing system.
A set of comprehensive testing tools for use with the normal Go testing system.
_workspace/src/github.com/stretchr/testify/require
Alternative testing tools which stop test execution if test failed.
Alternative testing tools which stop test execution if test failed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL