| kafka.check-zookeeper-status | Raises a critical event if the hosted Kafka Zookeeper is down. | `commonchecks check-kafka-zk-status` \[flags\]Where the flags are: `-p, --port =` Zookeeper Port \(default "2181"\).Usage example: `commonchecks check-kafka-zk-status -p 2181` | Kafka Zookeeper Status OK: Kafka Zookeeper is Up! |
| kafka.check-topic-replicas | Raises critical event if any topic has partitions with unknown replicas. | `commonchecks check-kafka-replicas` \[flags\]Where the flags are: - `-p, --port =` Zookeeper Port \(default "2181"\). - `-d, --detailed` = Lists unknown replicas in each partition of a topic. - `-i, --include_list` = Comma seperated list to include topics \(allows \* wild character\) - `-e, --exclude_list` = Comma seperated list to exclude topics \(allows \* wild character\) Usage example: commonchecks check-kafka-replicas -H localhost -p 2181 -i "test\*" -e "accTopic,\*offsets" -d | <topic> has partitions with unknown replicas. Unknown replicas are: \{"0":\["0"\],"1":\["0"\],"2":\["0"\]\}. <topic> has partitions with unknown replicas. Unknown replicas are: \{"0":\["0"\]\}. |
| kafka.check-topic-replication-factor | Raises critical event if replication factor of at least one topic is above or below provided replication factor param. | `commonchecks check-kafka-rf` \[flags\]Where the flags are: - `-p, --port =` Zookeeper Port \(default "2181"\). - `-d, --detailed` = Lists unknown replicas in each partition of a topic. - `-i, --include_list` = Comma separated list to include topics \(allows \* wild character\) - `-e, --exclude_list` = Comma separated list to exclude topics \(allows \* wild character\) - `-r, --replication factor` = Expected replication factor for a topic \(default 1\) Examples: `commonchecks check-kafka-partitions -H localhost -p 2181 -r 2 -i "accMetrics,*Topic" -e "testTopic"` | TestTopic has replication factor 1, which is less than expected: 2. accMetrics has replication factor 1, which is less than expected: 2. |
| kafka.check-topic-leader | Raises critical event if any topic has partitions with unknown leaders or unpreferred replica as leader. | `commonchecks check-kafka-leader` \[flags\]Where the flags are - `-p, --port` = Zookeeper Port \(default "2181"\). - `-d, --detailed` = A list of partitions in each topic with unknown leaders or unpreferred replicas. - `-i, --include_list` = Comma separated list to include topics \(allows \* wild character\) - `-e, --exclude_list` =Comma separated list to exclude topics \(allows \* wild character\) Examples: `commonchecks check-kafka-leader -H localhost -p 2181 -d -e "*offsets"` | <topic> contains, partitions with unpreferred replica as leader.\(partitions with unpreferred replicas are \[0\]\). <topic> contains, partitions with unpreferred replica as leader.\(partitions with unpreferred replicas are \[0\]\). |
| kafka.check-topic-partitions | Raises critical events if number of partitions for a topic is less the min\_partitions param. | `commonchecks check-kafka-partitions [flags]` Where the flags are: - `-p, --port` = Zookeeper Port \(default "2181"\). - `-P, --min_partitions` = Minimum partitions for a topic \(default 1\). - `-i, --include_list` = Comma separated list to include topics \(allows \* wild character\) - `-e, --exclude_list` =Comma separated list to exclude topics \(allows \* wild character\) | |
| Usage example 1: `commonchecks check-kafka-partitions -H localhost -p 2181 -P 3` | <topic> has 1 partitions, expected at least 3. <topic> has 1 partitions, expected at least 3. <topic> has 1 partitions, expected at least 3. |
| Usage example 2: commonchecks check-kafka-partitions -H localhost -p 2181 -P 3 -i "accMetrics,\*Topic" -e "testTopic" | <topic> has 1 partitions, expected at least 3. <topic> has 1 partitions, expected at least 3. |