Skip to content

Blackbox panics if tcp prober query_responses contain multiple 'labels:' #1526

@siebenmann

Description

@siebenmann

If you have a Blackbox module that uses the tcp prober with query_response, and your query_response has multiple labels: entries, Blackbox will panic:

2026/01/23 09:46:46 http: panic serving 127.0.0.1:46086: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "probe_expect_info", help: "Explicit content matched", constLabels: {}, variableLabels: {capabilities}} has different label names or a different help string

This isn't a documented restriction and there are reasons you might want to do this. For example, consider an IMAP prober where you want to collect the IMAP capabilities before and after STARTTLS:

  imap_banner_starttls:
    prober: tcp
    tcp:
      query_response:
        - expect: '^\* OK \[CAPABILITY (.* STARTTLS .+)]
          labels:
          - name: capabilities_notls
            value: "${1}"
        - send: "a STARTTLS"
        - expect: "^a OK "
        - starttls: true
        - send: 'b CAPABILITY'
        - expect: '^\* CAPABILITY (.+)'
          labels:
          - name: capabilities
            value: "${1}"
        - expect: '^b OK '

(This example isn't actually what I tried, I was doing something slightly different, but this is more plausible.)

If Blackbox cannot accept this, it would be nice if it was documented and also nice if it was detected when the configuration was loaded, not at runtime when you try to use the module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions