Home

Monitors

The monitoring endpoints allow you to get metrics from various Unravel components such as Zookeeper, Kafka, ElasticSearch, database, and disk usage. Monitors are exposed by Jolokia.

Example of Jolokia response

{
  "request": {
    "mbean": "com.unraveldata:group=Database,name=DbStatus,type=Monitoring",
    "attribute": "MBeanStatus",
    "type": "read"
  },
  "value": {
    "lastUpdated": "2018-05-15T08:31:36",
    "lastUpdateSuccessful": true,
    "errorMessage": null,
    "initialized": true
  },
  "timestamp": 1526373099,
  "status": 200
}

There is value field in the JSON response. This field contains the monitor's data.

Note

Set MONITOR_HOST to the Unravel Host node where you want monitoring service.

MONITOR_HOST points to node where monitoring service is running

PartitionInfo Monitor
MBean Status

http:/MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Filesystem,name=PartitionInfo,type=Monitoring/MBeanStatus

MBeanStatus - Output

{
  "lastUpdated": "2018-05-14T11:30:17",
  "lastUpdateSuccessful": true,
  "errorMessage": null,
  "initialized": true
}
Partitions Info

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Filesystem,name=PartitionInfo,type=Monitoring/PartitionsInfo

PartitionInfo - Output

{
  "\/home": {
    "diskUsagePercentage": 18,
    "lastUpdated": "2018-05-14T11:30:57",
    "partition": "\/home",
    "freeSpace": 812976791552,
    "totalSpace": 990715518976
  },
  "\/": {
    "diskUsagePercentage": 18,
    "lastUpdated": "2018-05-14T11:30:57",
    "partition": "\/",
    "freeSpace": 812976791552,
    "totalSpace": 990715518976
  },
  "\/tmp": {
    "diskUsagePercentage": 18,
    "lastUpdated": "2018-05-14T11:30:57",
    "partition": "\/tmp",
    "freeSpace": 812976791552,
    "totalSpace": 990715518976
  }
}
DbStatus Monitor
MBean Status

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbStatus,type=Monitoring/MBeanStatus

MBeanStatus - Output

{
  "lastUpdated": "2018-05-14T11:31:49",
  "lastUpdateSuccessful": true,
  "errorMessage": null,
  "initialized": true
}
Connection Ok

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbStatus,type=Monitoring/ConnectionOk

ConnectionOk - Output

true
DbPerformance Monitor
MBean Status

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbPerformance,type=Monitoring/MBeanStatus

MBeanStatus - Output

{
  "lastUpdated": "2018-05-14T11:45:06",
  "lastUpdateSuccessful": true,
  "errorMessage": null,
  "initialized": true
}
Connection Ok

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbPerformance,type=Monitoring/ConnectionOk

ConnectionOk - Output

true
Last Query Duration

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbPerformance,type=Monitoring/LastQueryDuration

LastQueryDuration - Output

14
Query Timed Out

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbPerformance,type=Monitoring/QueryTimedOut

QueryTimedOut

false
Query Exception

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Database,name=DbPerformance,type=Monitoring/QueryException

QueryException - Output

RuntimeException: Cannot read configuration
Zookeeper Monitor
MBean Status

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Zookeeper,name=Zookeeper,type=Monitoring/MBeanStatus

MBeanStatus

{
  "lastUpdated": "2018-05-14T11:33:32",
  "lastUpdateSuccessful": true,
  "errorMessage": null,
  "initialized": true
}
Recent Data

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Zookeeper,name=Zookeeper,type=Monitoring/RecentData

Response value contains list of Zookeeper's data. Each item in the list corresponds to one Zookeeper server.

[
  {
    "latencyMax": 0,
    "leader": false,
    "follower": false,
    "created": "2018-05-14T11:33:52",
    "connectionsCount": 0,
    "mode": null,
    "latencyAvg": 0,
    "latencyMin": 0,
    "port": 2000,
    "outstandingCount": 0,
    "host": "localhost",
    "nodeCount": 0,
    "ok": false
  }
]
Historical Data

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Zookeeper,name=Zookeeper,type=Monitoring/HistoricalData

Response value contains list of Zookeeper's data. Each item in the list corresponds to historical data of one Zookeeper server (historical data are computed as average of last N values).

[
  {
    "latencyMinAvg": 0,
    "connectionsCountTrend": 0,
    "nodeCountTrend": 0,
    "latencyMinTrend": 0,
    "outstandingCountTrend": 0,
    "latencyAvg": 0,
    "latencyMaxTrend": 0,
    "port": 2000,
    "isOkCount": 0,
    "host": "localhost",
    "outstandingCountAvg": 0,
    "connectionsCountAvg": 0,
    "leaderCount": 0,
    "followerCount": 0,
    "latencyAvgTrend": 0,
    "latencyMaxAvg": 0,
    "nodeCountAvg": 0,
    "isNotOkCount": 5
  }
]
Kafka Monitor
MBean Status

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Kafka,name=Kafka,type=Monitoring/MBeanStatus

{
  "lastUpdated": "2018-05-14T11:55:24",
  "lastUpdateSuccessful": true,
  "errorMessage": null,
  "initialized": true
}
Recent Data

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Kafka,name=Kafka,type=Monitoring/RecentData

{
  "consumerGroups": [
    {
      "groupName": "0_1790010567376612",
      "consumerTopicList": [
        {
          "consumerHost": "172.16.1.111",
          "clientId": "unravel_diag_meta",
          "lag": 0,
          "currentOffset": 0,
          "partitionId": 0,
          "consumerId": "unravel_diag_meta-1971faac-1d57-462b-b73e-c45e9c3cee52",
          "topicName": "meta",
          "logEndOffset": 0
        }
      ]
    }
  ],
  "created": "2018-05-14T12:06:38",
  "kafkaRunning": true,
  "topicList": [
    "aa2",
    "event",
    "hitdoc",
    "hive",
    "hive-hook",
    "hive-hook-emr",
    "jc",
    "live",
    "meta",
    "metrics",
    "mr",
    "spark",
    "workflow"
  ],
  "topicsWithoutConsumer": [
    "aa2",
    "event",
    "hitdoc",
    "hive",
    "hive-hook",
    "hive-hook-emr",
    "jc",
    "live",
    "metrics",
    "mr",
    "spark",
    "workflow"
  ]
}
Historical Data

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Kafka,name=Kafka,type=Monitoring/HistoricalData

Response value contains list of last N values of Kafka data (last value if the list is identical to RecentData). How many values will be stored can be configured by com.unraveldata.monitoring.kafka.history.size property.

Elastic Monitor
MBean Status

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Elastic,name=Elastic,type=Monitoring/MBeanStatus

MBeanStatus

{
  "lastUpdated": "2018-05-14T12:15:02",
  "lastUpdateSuccessful": false,
  "errorMessage": "Cannot retrieve ElasticSearch data: Cannot get ElasticSearch data. Address: sako1:4171",
  "initialized": true
}
Recent Data

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Elastic,name=Elastic,type=Monitoring/RecentData

Recent Data

{
  "running": true,
  "nodes": [
    {
      "indices": {
        "search": {
          "fetchTimeInMillis": 0,
          "queryTimeInMillis": 0,
          "scrollTimeInMillis": 0
        },
        "docs": {
          "deleted": 0,
          "count": 0
        },
        "indexing": {
          "noopUpdateTotal": 0,
          "indexTimeInMillis": 0,
          "throttleTimeInMillis": 0,
          "indexCurrent": 0,
          "deleteTimeInMillis": 0,
          "deleteCurrent": 0,
          "indexTotal": 0,
          "indexFailed": 0,
          "deleteTotal": 0,
          "throttled": false
        },
        "get": {
          "missingTimeInMillis": 0,
          "existsTimeInMillis": 0,
          "timeInMillis": 0
        },
        "store": {
          "sizeInBytes": 0,
          "throttleTimeInMillis": 0
        }
      },
      "roles": [
        "master",
        "data",
        "ingest"
      ],
      "name": "unravel_s_1",
      "timestamp": 1526327791715
    }
  ],
  "port": 4171,
  "created": "2018-05-14T19:56:33",
  "host": "sako1",
  "clusterHealth": {
    "activeShardsPercentAsNumber": 100,
    "numberOfPendingTasks": 0,
    "numberOfInFlightFetch": 0,
    "timedOut": false,
    "activePrimaryShards": 0,
    "unassignedShards": 0,
    "numberOfFailedNodes": 0,
    "numberOfNodes": 1,
    "taskMaxWaitingInQueueMillis": 0,
    "initializingShards": 0,
    "numberOfDataNodes": 1,
    "relocatingShards": 0,
    "clusterName": "unravel18679",
    "activeShards": 0,
    "delayedUnassignedShards": 0,
    "numberOfSuccessfulNodes": 1,
    "status": "green"
  }
}
Historical Data

http://MONITOR_HOST:4021/jolokia/read/com.unraveldata:group=Elastic,name=Elastic,type=Monitoring/HistoricalData

Response value contains list of last N values of ElasticSearch data (last value if the list is identical to RecentData). How many values will be stored can be configured by com.unraveldata.monitoring.elastic.history.size property.