Skip to content

Unassigned task status is not reflected in metrics #573

@chrisluedtke

Description

@chrisluedtke

Description

$ curl -s http://localhost:8083/connectors/my_connector/status
{
  "name":"my_connector",
  "connector": {
    "state":"RUNNING",
    "worker_id":"10.7.28.57:8083"
  },
  "tasks":[{"id":0,"state":"UNASSIGNED","worker_id":"10.7.28.57:8083"}],
  "type":"source"
}

$ curl -s localhost:8080 | grep my_connector | grep status
kafka_connect_connector_task_status{connector="my_connector",status="running",task="0",} 1.0

JMX rule:

- pattern: 'kafka.connect<type=connector-task-metrics, connector=(.+), task=(.+)><>status: ([a-z-]+)'
  name: kafka_connect_connector_task_status
  value: "1"
  labels:
    connector: "$1"
    task: "$2"
    status: "$3"
  help: "Kafka Connect JMX Connector task status"
  type: GAUGE

Expected Behavior

Task status metric should report as unassigned.

Reproduce

To force the worker to be unassigned, we set "connect.cosmos.containers.topicmap" to a non-existent container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions