Infinispan HotRod Connector Metrics: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 42: Line 42:
|-
|-
|}
|}
<font color=red>
TO INTEGRATE JDG 7:
<pre>
Access log of Hot Rod cache operations. It is disabled by default. Can be enabled it by changing the corresponding handler's log level to TRACE, as commented in clustered.xml.
            <logger category="org.infinispan.server.hotrod.logging.HotRodAccessLoggingHandler">
                <!-- Set to TRACE to enable access logging for hot rod or use DMR -->
                <level name="INFO"/>
                <handlers>
                    <handler name="HR-ACCESS-FILE"/>
                </handlers>
            </logger>
All you need is to change the level to TRACE to get hotrod-access.log. Then hotrod-access.log will have the contents like the followings.
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:57.906] "PutRequest -" "OK" [B0x033e04686f6765 35 5 22 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:59.810] "GetRequest -" "OK" [B0x033e04686f6765 20 18 1 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:58:04.707] "RemoveRequest -" "OK" [B0x033e04686f6765 20 5 3 ms
</pre>
Also investigate:
<pre>
            <logger category="org.infinispan.rest.logging.RestAccessLoggingHandler">
                <!-- Set to TRACE to enable access logging for rest or use DMR -->
                <level name="INFO"/>
                <handlers>
                    <handler name="REST-ACCESS-FILE"/>
                </handlers>
            </logger>
</pre>

Revision as of 20:22, 2 November 2016

Internal

Overview

This article describes the statistics that can be obtained from the server-side HotRod connector. Client side statistics are described in the "HotRod Client Metrics" article.

Bytes Read and Written

The HotRod connector exposes a cumulative counter for bytes read from the connector and bytes written to the connector. The metrics are exposed as longs.

The counters can be used to calculate the read and write rate, in bytes/second. It is preferable to expose these metrics as a rate per second, as it gives an indication of the load on the node. Some monitoring solutions allow the rate to be calculated automatically (see Data Dog counters).

JDG 6 JMX JDG 6 CLI
JDG 7 JMX JDG 7 CLI

Number of Active Client Connections

The HotRod connector reports the number of active client connections this node endpoint, as integer. It also reports the number of active client connections in the cluster. For the cluster-wide count, the node will make remote calls to aggregate results, so latency might have an impact on the speed of calculation of this attribute.

JDG 6 JMX JDG 6 CLI
JDG 7 JMX JDG 7 CLI

Worker Thread Count

The number of worker threads this connector was configured with, as integer. The value may be undefined, in which case it means the number of worker threads is the hardcoded default.

JDG 6 JMX JDG 6 CLI
JDG 7 JMX JDG 7 CLI


TO INTEGRATE JDG 7:

Access log of Hot Rod cache operations. It is disabled by default. Can be enabled it by changing the corresponding handler's log level to TRACE, as commented in clustered.xml.

            <logger category="org.infinispan.server.hotrod.logging.HotRodAccessLoggingHandler">
                <!-- Set to TRACE to enable access logging for hot rod or use DMR -->
                <level name="INFO"/>
                <handlers>
                    <handler name="HR-ACCESS-FILE"/>
                </handlers>
            </logger>


All you need is to change the level to TRACE to get hotrod-access.log. Then hotrod-access.log will have the contents like the followings.

(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:57.906] "PutRequest -" "OK" [B0x033e04686f6765 35 5 22 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:59.810] "GetRequest -" "OK" [B0x033e04686f6765 20 18 1 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:58:04.707] "RemoveRequest -" "OK" [B0x033e04686f6765 20 5 3 ms

Also investigate:

            <logger category="org.infinispan.rest.logging.RestAccessLoggingHandler">
                <!-- Set to TRACE to enable access logging for rest or use DMR -->
                <level name="INFO"/>
                <handlers>
                    <handler name="REST-ACCESS-FILE"/>
                </handlers>
            </logger>