{
  "repo": "pingcap/tidb-insight",
  "binary": "insight",
  "binary_path": "insight.py",
  "dependencies": {
    "CLI insight system": {
      "description": "Run the external collector binary and write JSON artifacts to the chosen output directory.",
      "infrastructure": {
        "local_collector_binary": {
          "conditions": [
            "User runs system collection or auto mode"
          ],
          "operations": [
            {
              "operation": "Invoke ../bin/collector and persist JSON results",
              "implementation": "insight.py"
            }
          ]
        },
        "filesystem": {
          "conditions": [
            "Collected data is written to the output directory"
          ],
          "operations": [
            {
              "operation": "Create output directories and write collected artifacts",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight runtime": {
      "description": "Run host-level tracing and profiling collectors such as perf, ftrace, vmtouch, or blktrace.",
      "infrastructure": {
        "host_runtime_tools": {
          "conditions": [
            "User runs runtime collection"
          ],
          "operations": [
            {
              "operation": "Execute profiling and tracing tools and persist artifacts",
              "implementation": "insight.py"
            }
          ]
        },
        "filesystem": {
          "conditions": [
            "Collected runtime artifacts are written to the output directory"
          ],
          "operations": [
            {
              "operation": "Write runtime capture artifacts",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight log": {
      "description": "Read TiDB and system log files and store selected copies in the output directory.",
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "User runs log collection"
          ],
          "operations": [
            {
              "operation": "Read and copy log files",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight config": {
      "description": "Read configuration files and sysctl snapshots from the host filesystem.",
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "User runs config collection"
          ],
          "operations": [
            {
              "operation": "Read configuration files and write collected snapshots",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight tidb": {
      "description": "Call PD control APIs or TiDB status APIs to collect cluster runtime information.",
      "infrastructure": {
        "pd_http_api": {
          "conditions": [
            "User runs tidb pdctl collection"
          ],
          "operations": [
            {
              "operation": "Read PD API data and dump JSON files",
              "implementation": "insight.py"
            }
          ]
        },
        "tidb_status_http_api": {
          "conditions": [
            "User runs tidb tidbinfo collection"
          ],
          "operations": [
            {
              "operation": "Read TiDB status API data and dump JSON files",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight metric": {
      "description": "Query Prometheus APIs or import previously dumped metrics into a local TSDB.",
      "infrastructure": {
        "prometheus_http_api": {
          "conditions": [
            "User runs metric prom collection"
          ],
          "operations": [
            {
              "operation": "Query Prometheus over HTTP",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight show": {
      "description": "Render terminal summaries from previously collected local artifacts.",
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "User runs show commands"
          ],
          "operations": [
            {
              "operation": "Read collected artifacts and render terminal views",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    },
    "CLI insight archive": {
      "description": "Compress or extract collected data tarballs on the local filesystem.",
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "User runs archive or extract commands"
          ],
          "operations": [
            {
              "operation": "Create or extract archive files",
              "implementation": "insight.py"
            }
          ]
        }
      },
      "services": []
    }
  }
}
