|
| 1 | +=================== |
| 2 | +Monitoring with JMX |
| 3 | +=================== |
| 4 | + |
| 5 | +Presto exposes a large number of different metrics via the Java Management Extensions (JMX). |
| 6 | + |
| 7 | +You have to enable JMX by setting the ports used by the RMI registry and server |
| 8 | +in the :ref:`config.properties file <config_properties>`: |
| 9 | + |
| 10 | +.. code-block:: none |
| 11 | +
|
| 12 | + jmx.rmiregistry.port=9080 |
| 13 | + jmx.rmiserver.port=9081 |
| 14 | +
|
| 15 | +* ``jmx.rmiregistry.port``: |
| 16 | + Specifies the port for the JMX RMI registry. JMX clients should connect to this port. |
| 17 | + |
| 18 | +* ``jmx.rmiserver.port``: |
| 19 | + Specifies the port for the JMX RMI server. Presto exports many metrics, |
| 20 | + that are useful for monitoring via JMX. |
| 21 | + |
| 22 | +JConsole (supplied with the JDK), `VisualVM <https://visualvm.github.io/>`_, and |
| 23 | +many other tools can be used to access the metrics in a client application. |
| 24 | +Many monitoring solutions support JMX. You can also use the |
| 25 | +:doc:`/connector/jmx` and query the metrics using SQL. |
| 26 | + |
| 27 | +Many of these JMX metrics are a complex metric object such as a ``CounterStat`` |
| 28 | +that has a collection of related metrics. For example, ``InputPositions`` has |
| 29 | +``InputPositions.TotalCount``, ``InputPositions.OneMinute.Count``, and so on. |
| 30 | + |
| 31 | +A small subset of the available metrics are described below. |
| 32 | + |
| 33 | +JVM |
| 34 | +--- |
| 35 | + |
| 36 | +* Heap size: ``java.lang:type=Memory:HeapMemoryUsage.used`` |
| 37 | +* Thread count: ``java.lang:type=Threading:ThreadCount`` |
| 38 | + |
| 39 | +Presto Cluster and Nodes |
| 40 | +------------------------ |
| 41 | + |
| 42 | +* Active nodes: |
| 43 | + ``presto.failureDetector:name=HeartbeatFailureDetector:ActiveCount`` |
| 44 | + |
| 45 | +* Free memory (general pool): |
| 46 | + ``presto.memory:type=ClusterMemoryPool:name=general:FreeDistributedBytes`` |
| 47 | + |
| 48 | +* Cumulative count (since Presto started) of queries that ran out of memory and were killed: |
| 49 | + ``presto.memory:name=ClusterMemoryManager:QueriesKilledDueToOutOfMemory`` |
| 50 | + |
| 51 | +Presto Queries |
| 52 | +-------------- |
| 53 | + |
| 54 | +* Active queries currently executing or queued: ``presto.execution:name=QueryManager:RunningQueries`` |
| 55 | + |
| 56 | +* Queries started: ``presto.execution:name=QueryManager:StartedQueries.FiveMinute.Count`` |
| 57 | + |
| 58 | +* Failed queries from last 5 min (all): ``presto.execution:name=QueryManager:FailedQueries.FiveMinute.Count`` |
| 59 | +* Failed queries from last 5 min (internal): ``presto.execution:name=QueryManager:InternalFailures.FiveMinute.Count`` |
| 60 | +* Failed queries from last 5 min (external): ``presto.execution:name=QueryManager:ExternalFailures.FiveMinute.Count`` |
| 61 | +* Failed queries (user): ``presto.execution:name=QueryManager:UserErrorFailures.FiveMinute.Count`` |
| 62 | + |
| 63 | +* Execution latency (P50): ``presto.execution:name=QueryManager:ExecutionTime.FiveMinutes.P50`` |
| 64 | +* Input data rate (P90): ``presto.execution:name=QueryManager:WallInputBytesRate.FiveMinutes.P90`` |
| 65 | + |
| 66 | +Presto Tasks |
| 67 | +------------ |
| 68 | + |
| 69 | +* Input data bytes: ``presto.execution:name=TaskManager:InputDataSize.FiveMinute.Count`` |
| 70 | +* Input rows: ``presto.execution:name=TaskManager:InputPositions.FiveMinute.Count`` |
| 71 | + |
| 72 | +Connectors |
| 73 | +---------- |
| 74 | + |
| 75 | +Many connectors provide their own metrics. The metric names typically start with |
| 76 | +``presto.plugin``. |
0 commit comments