 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package diagnose provides the diagnose suite for the agent.
Index ¶
Constants ¶
      View Source
      
  
    const ( // CheckDatadog is the suite name for the check-datadog suite CheckDatadog = "check-datadog" // AutodiscoveryConnectivity is the suite name for the connectivity-datadog-autodiscovery suite AutodiscoveryConnectivity = "connectivity-datadog-autodiscovery" // CoreEndpointsConnectivity is the suite name for the connectivity-datadog-core-endpoints suite CoreEndpointsConnectivity = "connectivity-datadog-core-endpoints" // EventPlatformConnectivity is the suite name for the connectivity-datadog-event-platform suite EventPlatformConnectivity = "connectivity-datadog-event-platform" // PortConflict is the suite name for the port-conflict suite PortConflict = "port-conflict" // FirewallScan is the suite name for the firewall-scan suite FirewallScan = "firewall-scan" )
      View Source
      
  const ( DiagnosisSuccess Status = 0 DiagnosisFail Status = 1 DiagnosisWarning Status = 2 DiagnosisUnexpectedError = 3 DiagnosisResultMIN = DiagnosisSuccess DiagnosisResultMAX = DiagnosisUnexpectedError )
Diagnosis status
Variables ¶
      View Source
      
  var AllSuites = []string{ CheckDatadog, AutodiscoveryConnectivity, CoreEndpointsConnectivity, EventPlatformConnectivity, PortConflict, FirewallScan, }
AllSuites is a list of all available suites
      View Source
      
  var MetadataAvailCatalog = make(metadataAvailDiagnoseCatalog)
    MetadataAvailCatalog is a set of MetadataAvailDiagnose functions
Functions ¶
func RegisterMetadataAvail ¶
RegisterMetadataAvail adds a MetadataAvailDiagnose
Types ¶
type Catalog ¶
type Catalog struct {
	Suites Suites
}
    Catalog stores the list of registered Diagnose functions
type Component ¶
type Component interface {
	RunSuites(format string, verbose bool) ([]byte, error)
	RunSuite(suite string, format string, verbose bool) ([]byte, error)
	RunLocalSuite(suites Suites, config Config) (*Result, error)
}
    Component is the component type.
type Counters ¶
type Counters struct {
	Total         int `json:"total,omitempty"`
	Success       int `json:"success,omitempty"`
	Fail          int `json:"fail,omitempty"`
	Warnings      int `json:"warnings,omitempty"`
	UnexpectedErr int `json:"unexpected_error,omitempty"`
}
    Counters contains the count of the diagnosis results
type Diagnosis ¶
type Diagnosis struct {
	// --------------------------
	// required fields
	// run-time (pass, fail etc)
	Status Status `json:"result"`
	// static-time (meta typically)
	Name string `json:"name"`
	// run-time (actual diagnosis consumable by a user)
	Diagnosis string `json:"diagnosis"`
	// static-time (meta typically)
	Category string `json:"category,omitempty"`
	// static-time (meta typically, description of what being tested)
	Description string `json:"description,omitempty"`
	// run-time (what can be done of what docs need to be consulted to address the issue)
	Remediation string `json:"remediation,omitempty"`
	// run-time
	RawError string `json:"rawerror,omitempty"`
	// run-time (additional metadata)
	Metadata map[string]string `json:"metadata,omitempty"`
}
    Diagnosis contains the results of the diagnosis
func (Diagnosis) MarshalJSON ¶
MarshalJSON marshals the Diagnose struct to JSON
 Click to show internal directories. 
   Click to hide internal directories.