-
Epic
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
Implement Active DNS and Network Diagnostic Probes
-
To Do
-
Product / Portfolio Work
-
-
100% To Do, 0% In Progress, 0% Done
-
False
-
-
False
-
Not Selected
-
None
-
None
-
None
-
8
-
0
Description
Implement active diagnostic tools that generate network traffic to verify connectivity and resolution. Unlike inspection tools (NE-2278), these require a live environment and involve executing network calls from the MCP server or from within the cluster.
Goals
- Implement DNS probing from the server.
- Implement HTTP probing from the server.
- Implement in-cluster probing via ephemeral pods.
Tool Definitions
1. probe_dns_local
- Description: Run a DNS query using local libraries on the MCP server host.
- Input Schema:
{ "type": "object", "properties": { "server": { "type": "string", "description": "DNS server IP" }, "name": { "type": "string", "description": "FQDN to query" }, "type": { "type": "string", "description": "Record type (A, AAAA, CNAME, TXT)", "default": "A" } }, "required": ["server", "name"] }
- Output Schema:
{ "answers": [ /* List of answer strings */ ], "rcode": "string (NOERROR, NXDOMAIN, etc.)", "latency_ms": number }
2. probe_http
- Description: Run an HTTP(S) request to verify reachability and status codes.
- Input Schema:
{ "type": "object", "properties": { "url": { "type": "string", "description": "Target URL" }, "method": { "type": "string", "description": "HTTP Method", "default": "GET" }, "timeout_seconds": { "type": "integer", "default": 5 } }, "required": ["url"] }
- Output Schema:
{ "status_code": integer, "headers": { /* map of headers */ }, "latency_ms": number, "error": "string (optional)" }
3. exec_dns_in_pod
- Description: Spin up a temporary pod in the cluster to execute a DNS lookup, verifying internal cluster networking and DNS path.
- Input Schema:
{ "type": "object", "properties": { "namespace": { "type": "string", "description": "Namespace to run the ephemeral pod" }, "target_server": { "type": "string", "description": "DNS server IP to query" }, "target_name": { "type": "string", "description": "DNS name to query" }, "record_type": { "type": "string", "description": "A, AAAA, etc.", "default": "A" } }, "required": ["namespace", "target_server", "target_name"] }
- Output Schema:
{ "pod_name": "string", "output": "string (raw dig output or parsed structure)", "phase": "string (Succeeded/Failed)" }
Implementation Steps
- Implement probe_dns_local:
- Logic:
- Use a Go DNS library (e.g., github.com/miekg/dns).
- Construct the message, send to server:53 (UDP/TCP).
- Parse and return the answer section.
- Logic:
- Implement probe_http:
- Logic:
- Use net/http client.
- Perform a request.
- Return Status Code, Latency, and Headers.
- Logic:
- Implement exec_dns_in_pod:
- Logic:
- Use client-go to create a Pod specification:
- Image: registry.redhat.io/openshift4/network-tools-rhel9.
- Command: /usr/bin/dig @server name.
- Wait for Pod Succeeded or Failed.
- Retrieve logs.
- Delete the Pod.
- Use client-go to create a Pod specification:
- Logic:
Acceptance Criteria
- probe_dns_local matches schema and works.
- probe_http matches schema and works.
- exec_dns_in_pod matches schema, creates pod, works, and cleans up.
- Proper timeouts and error handling for all network operations.
- relates to
-
NE-2274 MCP Server Enhancement for NIDS Troubleshooting
-
- New
-