Skip to content

Instantly share code, notes, and snippets.

@rmoff
Created May 1, 2019 09:58
Show Gist options
  • Save rmoff/3dc53b0dfede6809fb0091ce0296f9a8 to your computer and use it in GitHub Desktop.
Save rmoff/3dc53b0dfede6809fb0091ce0296f9a8 to your computer and use it in GitHub Desktop.
Show status of all Kafka Connect connectors
curl -s "http://localhost:8083/connectors"| \
jq '.[]'| \
xargs -I{connector_name} curl -s "http://localhost:8083/connectors/"{connector_name}"/status" | \
jq -c -M '[.name,.connector.state,.tasks[].state]|join(":|:")' | \
column -s : -t | \
sed 's/\"//g' | \
sort
@vdm
Copy link

vdm commented Jun 21, 2022

URLs dedup'd and without sed:

(C=http://localhost:8083/connectors;
  curl -s $C | \
  jq '.[]' | \
  xargs -i curl -s "$C/{}/status" | \
  jq -r '[.name,.connector.state,.tasks[].state] | @tsv' | \
  sort | \
  column -t)

@juzn01
Copy link

juzn01 commented Jul 18, 2023

{
"name": "myconnectorname",
"config": {
"connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
"tasks.max": "5",
"topic.prefix": "test-",
"connection.url": "jdbc:oracle:thin:@//10.101.24.70:1521/testdb",
"connection.user": "test",
"connection.password": "password",
"mode": "bulk",
"poll.interval.ms":"600000",
"database.schema": "test",
"schema.pattern": "test",
"database.history.kafka.bootstrap.servers" : "10.101.20.99:9092",
"database.history.kafka.topic": "schema-changes.uat",
"batch.max.rows": 30000,
"table.whitelist": "OTP, NATIONAL",
" table.types": "tables"
}
}

Hi Bro, please help me. I want load tables from oracle and i want to know when connector load data completeed: now i see offset by kafka-ui but i need check by my self.I need log about it or cmd to check it.

@rmoff
Copy link
Author

rmoff commented Jul 18, 2023

@juzn01
Copy link

juzn01 commented Jul 18, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment