Documentation
¶
Index ¶
- Constants
- Variables
- func GetDynatraceURLFromManagementCluster(clusterID string) (string, error)
- func GetLinkToWebConsole(dtURL string, since int, finalQuery string) (string, error)
- func NewCmdDynatrace() *cobra.Command
- func NewCmdHCPMustGather() *cobra.Command
- func NewCmdLogs() *cobra.Command
- type DTDocument
- type DTDocumentResult
- type DTEventResult
- type DTEventsPollResult
- type DTExecuteResults
- type DTExecuteState
- type DTExecuteToken
- type DTLogsPollResult
- type DTPollResult
- type DTQuery
- func (q *DTQuery) Build() string
- func (q *DTQuery) Cluster(mgmtClusterName string) *DTQuery
- func (q *DTQuery) Containers(containerList []string) *DTQuery
- func (q *DTQuery) ContainsPhrase(phrase string) *DTQuery
- func (q *DTQuery) Deployments(workloads []string) *DTQuery
- func (q *DTQuery) InitEvents(hours int) *DTQuery
- func (q *DTQuery) InitLogs(hours int) *DTQuery
- func (q *DTQuery) Limit(limit int) *DTQuery
- func (q *DTQuery) Namespaces(namespaceList []string) *DTQuery
- func (q *DTQuery) Nodes(nodeList []string) *DTQuery
- func (q *DTQuery) Pods(podList []string) *DTQuery
- func (q *DTQuery) Sort(order string) (query *DTQuery, error error)
- func (q *DTQuery) Status(statusList []string) *DTQuery
- type DTQueryPayload
- type DTRequestError
- type GatherLogsOpts
- type HCPCluster
- type LogContent
- type LogResult
- type Requester
Constants ¶
View Source
const (
VaultAddr string = "vault_address"
// Logs
DTStorageVaultPath string = "dt_vault_path"
DTStorageScopes string = "storage:logs:read storage:events:read storage:buckets:read"
// Dashboards
DTDocumentVaultPath string = "dt_document_vault_path"
DTDocumentScopes string = "document:documents:read"
DTDashboardType string = "dashboard"
)
Variables ¶
View Source
var ErrUnsupportedCluster = fmt.Errorf("Not an HCP or MC Cluster")
Functions ¶
func GetDynatraceURLFromManagementCluster ¶
func GetDynatraceURLFromManagementCluster(clusterID string) (string, error)
func GetLinkToWebConsole ¶
func GetLinkToWebConsole(dtURL string, since int, finalQuery string) (string, error)
func NewCmdDynatrace ¶
func NewCmdDynatrace() *cobra.Command
func NewCmdHCPMustGather ¶
func NewCmdHCPMustGather() *cobra.Command
func NewCmdLogs ¶
func NewCmdLogs() *cobra.Command
Types ¶
type DTDocument ¶ added in v0.43.0
type DTDocument struct {
Id string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
}
type DTDocumentResult ¶ added in v0.43.0
type DTDocumentResult struct {
Documents []DTDocument `json:"documents"`
}
type DTEventResult ¶
type DTEventResult struct {
Records []json.RawMessage `json:"records"`
}
type DTEventsPollResult ¶
type DTEventsPollResult struct {
State string `json:"state"`
Progress int `json:"progress"`
Result DTEventResult `json:"result"`
}
type DTExecuteResults ¶
type DTExecuteResults struct {
Result []json.RawMessage `json:"records"`
}
type DTExecuteState ¶
type DTExecuteState struct {
State string `json:"state"`
TTLSeconds int `json:"ttlSeconds"`
}
type DTExecuteToken ¶
type DTExecuteToken struct {
RequestToken string `json:"requestToken"`
}
type DTLogsPollResult ¶
type DTLogsPollResult struct {
State string `json:"state"`
Progress int `json:"progress"`
Result LogResult `json:"result"`
}
type DTPollResult ¶
type DTPollResult struct {
State string `json:"state"`
}
type DTQuery ¶
type DTQuery struct {
// contains filtered or unexported fields
}
func (*DTQuery) Containers ¶
func (q *DTQuery) Containers(containerList []string) *DTQuery
func (*DTQuery) ContainsPhrase ¶
func (q *DTQuery) ContainsPhrase(phrase string) *DTQuery
func (*DTQuery) Deployments ¶
func (q *DTQuery) Deployments(workloads []string) *DTQuery
func (*DTQuery) InitEvents ¶
func (q *DTQuery) InitEvents(hours int) *DTQuery
func (*DTQuery) Namespaces ¶
func (q *DTQuery) Namespaces(namespaceList []string) *DTQuery
type DTQueryPayload ¶
type DTQueryPayload struct {
Query string `json:"query"`
MaxResultRecords int `json:"maxResultRecords"`
}
type DTRequestError ¶
type DTRequestError struct {
Records json.RawMessage `json:"error"`
}
type GatherLogsOpts ¶
type GatherLogsOpts struct {
Since int
Tail int
SortOrder string
DestDir string
ClusterID string
}
func (*GatherLogsOpts) GatherLogs ¶
func (g *GatherLogsOpts) GatherLogs(clusterID string) (error error)
type HCPCluster ¶
type HCPCluster struct {
DynatraceURL string
// contains filtered or unexported fields
}
func FetchClusterDetails ¶
func FetchClusterDetails(clusterKey string) (hcpCluster HCPCluster, error error)
type LogContent ¶
type LogContent struct {
Content string `json:"content"`
}
Click to show internal directories.
Click to hide internal directories.