How can I find the ingestion ratio? i.e., no of events/bytes ingested every second/minute interval
As mentioned in the other answer, Kafka exports metrics via JMX that cover bytes in/out rates as well as a number of other interesting data points. For the full details, see the Monitoring section in the docs.
It's recommended to collect and graph any of these metrics in you are planning to run a Kafka cluster.
Now if you just want to quickly get these values while developing, you have a couple of other options:
jconsole: This graphical tool comes with the JVM and can display all the JMX metrics.
kafka.tools.JmxTool: This CLI tool comes with Kafka and can print the value of JMX metrics. For example, to get the broker ingestion rate, run:
./bin/kafka-run-class.sh kafka.tools.JmxTool --object-name kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec
For these to work, you must enable the JVM to expose JMX on a port.