{"record":{"id":"0a0412abcc008731","repo":"cilium/cilium","slug":"no-health-status-found-for-the-filter","errorCode":null,"errorMessage":"no health status found for the filter","messagePattern":"no health status found for the filter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/hive/health/command.go","lineNumber":98,"sourceCode":"\t\t\tfor i := range levels {\n\t\t\t\tlevels[i] = strings.ToLower(levels[i])\n\t\t\t}\n\n\t\t\tw := s.LogWriter()\n\t\t\tif file != \"\" {\n\t\t\t\tp := s.Path(file)\n\t\t\t\tfd, err := os.Create(p)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tw = fd\n\t\t\t}\n\n\t\t\tss := getHealth(db, table, prefix, match, levels)\n\t\t\thealthPkg.GetAndFormatModulesHealth(w, ss, true, \"\")\n\n\t\t\tif (prefix != \"\" || match != \"\") && len(ss) == 0 {\n\t\t\t\treturn nil, errors.New(\"no health status found for the filter\")\n\t\t\t}\n\n\t\t\treturn nil, nil\n\t\t},\n\t)\n}\n\nfunc getHealth(db *statedb.DB, table statedb.Table[types.Status], prefix, match string, levels []string) []types.Status {\n\ttx := db.ReadTxn()\n\tresults := table.Prefix(tx, StatusByID(types.HealthID(prefix)))\n\tss := []types.Status{}\n\tfor status := range results {\n\t\tif match != \"\" && !strings.Contains(status.ID.String(), match) {\n\t\t\tcontinue\n\t\t}\n\t\tif !slices.Contains(levels, strings.ToLower(status.Level.String())) {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/pkg/hive/health/command.go#L80-L116","documentation":"The 'cilium-dbg hive health' (or cilium health status) command queries the module health table with optional --prefix/--match filters. It throws this when the filters are set but the query returns no matching status entries, so there is nothing to display.","triggerScenarios":"Running the hive health status command with a --prefix or --match filter that does not match any registered health module (getHealth returns an empty slice).","commonSituations":"Typo in the module prefix, querying a module from a different Cilium version that was renamed/removed, or the module hasn't registered status yet when the command runs.","solutions":["Check the module prefix/match string spelling and case","Run without --prefix/--match to list all available health statuses and pick the correct name","Verify the target module actually exists in this Cilium version"],"exampleFix":"# before\ncilium-dbg hive health --prefix module.heatlh\n# after\ncilium-dbg hive health --prefix module.health","handlingStrategy":"validation","validationCode":"statuses := getHealth(db, table, prefix, match, levels)\nif (prefix != \"\" || match != \"\") && len(statuses) == 0 {\n\tfmt.Fprintln(os.Stderr, \"no health status matched; run without filters to list modules\")\n\tos.Exit(1)\n}","typeGuard":null,"tryCatchPattern":"if err := healthCmd.RunE(...); err != nil {\n\tif strings.Contains(err.Error(), \"no health status found\") {\n\t\tfmt.Fprintln(os.Stderr, \"check module prefix spelling; list all with no --prefix/--match\")\n\t}\n\treturn err\n}","preventionTips":["List all health statuses first (no filters) to get exact module names","Copy prefixes from the unfiltered output instead of typing them","Confirm module names against the Cilium version in use"],"tags":["cli","health-status","filtering"],"backgroundTag":"no-results-for-filter","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}