Skip to content
bulldog2011 edited this page Apr 20, 2013 · 10 revisions

##Configuration

The easiest way to monitor Luxun stats is just to start a Luxun broker and/or client and fire up JConsole and take a look.

Luxun can also be configured to use mx4j for JMX stats monitoring, to enable mx4j, you need to add -Dluxun_mx4jenable=true to the Java command line, you have two opitons:

  • set JAVA_OPTS="-Dluxun_mx4jenable=true" before you run Luxun server script
  • change the server script to add -Dluxun_mx4jenable=true directly.

After mx4j is enabled, you can access Luxun JMX stats through web accss:

http://localhost:8082

8082 is the default Luxun port for mx4j monitoring.

Server Stats

bean name : luxun:type=luxun.BrokerAllTopicStat luxun:type=luxun.BrokerTopicStat.[topic]

    long getMessagesIn();
    long getBytesIn();
    long getBytesOut();
    long getFailedProduceRequest();
    long getFailedConsumeRequest();

bean name : luxun:type=luxun.logs.[topic]

    String getName();
    String getLastFlushedTime();
    long getAppendedMessageNumberSinceLatestStart();
    long getFrontIndex();
    long getLastIndex();
    boolean isEmpty();
    long getTotalMessageNumber();
    long getBackFileSize();

bean name : luxun:type=luxun.LogFlushStats

    double getFlushesPerSecond();
    double getAvgFlushMs();
    long getTotalFlushMs();
    double getMaxFlushMs();
    long getNumFlushes();

bean name : uxun:type=luxun.ThriftServerStats

    double getProduceRequestsPerSecond();
    double getConsumeRequestsPerSecond();
    double getAvgProduceRequestMs();
    double getMaxProduceRequestMs();
    double getAvgConsumeRequestMs();
    double getMaxConsumeRequestMs();
    double getBytesReadPerSecond(); // NA
    double getBytesWrittenPerSecond(); // NA
    long getNumConsumeRequests();
    long getNumProduceRequests();
    long getTotalBytesRead(); // NA
    long getTotalBytesWritten(); // NA
    long getTotalConsumeRequestMs();
    long getTotalProduceRequestMs();

bean name : luxun:type=luxun.ServerInfo

    String getVersion();
    String getStartupTime();
    String getStartedTime();
    String getRunningTime();

Producer Stats

bean name : luxun:type=luxun.luxunProducerStats

    double getProduceRequestsPerSecond();
    double getAvgProduceRequestMs();
    double getMaxProduceRequestMs();
    long getNumProduceRequests();

bean name : luxun.producer.Producer:type=AsyncProducerStats

    int getAsyncProducerEvents();
    int getAsyncProducerDroppedEvents();

bean name : luxun.producer.Producer:type=AsyncProducerQueueSizeStats[asyncProducerID]

    int getAsyncProducerQueueSize();

Consumer Stats

bean name : luxun:type=luxun.ConsumerTopicStat.[topic]

    long getMessagesPerTopic();