Skip to content

Instantly share code, notes, and snippets.

@soloradish
Last active July 30, 2019 06:30
Show Gist options
  • Save soloradish/1493a61b505918a11c7c5710456962f1 to your computer and use it in GitHub Desktop.
Save soloradish/1493a61b505918a11c7c5710456962f1 to your computer and use it in GitHub Desktop.
jmx exporter settings for kafka 1.1.x
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Kafka resource usage and throughput",
"editable": true,
"gnetId": 721,
"graphTooltip": 0,
"id": 71,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 0
},
"id": 8,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without(instance)(rate(kafka_network_request_error_total{job=\"consul-kafka-jmx-exporter\",topic!=\"__consumer_offsets\"}[5m]))",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Network Request Fail",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": "Fails/s",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "aws-hdp",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 5
},
"id": 4,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without(instance)(rate(kafka_server_topic_message_in_total{job=\"consul-kafka-jmx-exporter\",topic!=\"__consumer_offsets\"}[5m]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{topic}}",
"metric": "kafka_server_brokertopicmetrics_messagesin_total",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Messages In Per Topic",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": "Messages/s",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "aws-hdp",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 14
},
"id": 5,
"isNew": true,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without(instance)(rate(kafka_server_topic_byte_in_bytes{job=\"consul-kafka-jmx-exporter\",topic!=\"__consumer_offsets\"}[5m]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{topic}}",
"metric": "kafka_server_brokertopicmetrics_bytesin_total",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Bytes In Per Topic",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"label": "Bytes/s",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "aws-hdp",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 14
},
"id": 6,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without(instance)(rate(kafka_server_topic_byte_out_bytes{job=\"consul-kafka-jmx-exporter\",topic!=\"__consumer_offsets\"}[5m]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{topic}}",
"metric": "kafka_server_brokertopicmetrics_bytesin_total",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Bytes Out Per Topic",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"label": "Bytes/s",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Kafka Overview",
"uid": "oXsXctnWz",
"version": 5
}
---
rules:
- pattern : kafka.server<type=BrokerTopicMetrics, name=BytesInPerSec, topic=(?!.+,)(.*)><>Count
name: kafka_server_topic_byte_in_bytes
type: COUNTER
labels:
topic: "$1"
- pattern : kafka.server<type=BrokerTopicMetrics, name=BytesOutPerSec, topic=(?!.+,)(.*)><>Count
name: kafka_server_topic_byte_out_bytes
type: COUNTER
labels:
topic: "$1"
- pattern : kafka.network<type=RequestMetrics, name=ErrorsPerSec, request=(.+), error=((?!NONE).+)><>Count
name: kafka_network_request_error_total
type: COUNTER
labels:
request: "$1"
error: "$2"
- pattern : kafka.server<type=BrokerTopicMetrics, name=MessagesInPerSec, topic=(?!.+,)(.*)><>Count
name: kafka_server_topic_message_in_total
type: COUNTER
labels:
topic: "$1"
- pattern : kafka.server<type=ReplicaManager, name=UnderReplicatedPartitions><>Count
name: kafka_server_under_replicated_partition_total
type: GAUGE
- pattern : kafka.server<type=ReplicaManager, name=PartitionCount><>Count
name: kafka_server_under_partition_total
type: GAUGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment