{"modulePath":"github.com/2lambda123/openshift-origin","version":"v3.10.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package diagnostics\n\nOpenShift v3 Diagnostics\n\nThis is a tool to help administrators and users resolve common problems that occur with OpenShift v3 deployments. It will likely remain under continuous development as the OpenShift Origin project progresses.\n\nThe goals of the diagnostics tool are summarized in the Trello card [https://trello.com/c/LdUogKuN](https://trello.com/c/LdUogKuN); Diagnostics are included as an \\`openshift\\` sub-command that analyzes OpenShift as it is able, whether from the perspective of an OpenShift client or on an OpenShift host.\n\nView pkg/diagnostics/README.md for more details on developing diagnostics.\n\n## Constants\n\n```go\nconst (\n\t// Command name\n\tDiagnosticsRecommendedName    = \"diagnostics\"\n\tAllDiagnosticsRecommendedName = \"all\"\n\n\t// Standard locations for the host config files OpenShift uses.\n\tStandardMasterConfigPath string = \"/etc/origin/master/master-config.yaml\"\n\tStandardNodeConfigPath   string = \"/etc/origin/node/node-config.yaml\"\n)\n```\n\n## Functions\n\n```go\nfunc NewCmdDiagnostics(name string, fullName string, out io.Writer) *cobra.Command\n```\nNewCmdDiagnostics is the base command for running a standard set of diagnostics with generic options only.\n\n```go\nfunc NewCmdDiagnosticsAll(name string, fullName string, out io.Writer, available types.DiagnosticList) *cobra.Command\n```\nNewCmdDiagnosticsAll is the command for running ALL diagnostics and providing all flags.\n\n```go\nfunc NewCmdDiagnosticsIndividual(name string, fullName string, out io.Writer, diagnostic types.Diagnostic) *cobra.Command\n```\nNewCmdDiagnosticsIndividual is a parameterized subcommand providing a single diagnostic and its flags.\n\n## Types\n\n```go\ntype DiagnosticsOptions struct {\n\t// list of diagnostic name(s) to run\n\tRequestedDiagnostics sets.String\n\t// flag bindings for any diagnostics that require them\n\tParameterizedDiagnostics types.ParameterizedDiagnosticMap\n\n\t// list available diagnostics and exit\n\tListAll bool\n\t// specify locations of host config files\n\tMasterConfigLocation string\n\tNodeConfigLocation   string\n\t// indicate this is an openshift host despite lack of other indicators\n\tIsHost bool\n\t// When true, prevent diagnostics from changing API state (e.g. creating something)\n\tPreventModification bool\n\t// We need a factory for creating clients. Creating a factory\n\t// creates flags as a byproduct, most of which we don't want.\n\t// The command creates these and binds only the flags we want.\n\tClientFlags *flag.FlagSet\n\tFactory     *osclientcmd.Factory\n\t// specify context name to be used for cluster-admin access\n\tClientClusterContext string\n\t// LogOptions determine globally what the user wants to see and how.\n\tLogOptions *log.LoggerOptions\n\t// contains filtered or unexported fields\n}\n```\nDiagnosticsOptions holds values received from command line flags as well as other objects generated for the command to operate.\n\n```go\nfunc (o *DiagnosticsOptions) Complete(c *cobra.Command, args []string) error\n```\nComplete fills in DiagnosticsConfig needed if the command is actually invoked.\n\n```go\nfunc (o *DiagnosticsOptions) Logger() *log.Logger\n```\nreturns the logger built according to options (must be Complete()ed)\n\n```go\nfunc (o DiagnosticsOptions) RunDiagnostics() error\n```\nRunDiagnostics builds diagnostics based on the options and executes them. Returns: error (raised during construction of diagnostics; may be an aggregate error object),\n\n","path":"github.com/2lambda123/openshift-origin/pkg/oc/admin/diagnostics","name":"diagnostics","synopsis":"OpenShift v3 Diagnostics","isRedistributable":true}
