Documentation ¶
Overview ¶
Package api provides methods for interacting with the Circonus API. See the full Circonus API Documentation at https://login.circonus.com/resources/api for more information.
Raw REST methods
Get - retrieve existing item(s) Put - update an existing item Post - create a new item Delete - remove an existing item
Endpoints (supported)
Account https://login.circonus.com/resources/api/calls/account Acknowledgement https://login.circonus.com/resources/api/calls/acknowledgement Alert https://login.circonus.com/resources/api/calls/alert Annotation https://login.circonus.com/resources/api/calls/annotation Broker https://login.circonus.com/resources/api/calls/broker Check https://login.circonus.com/resources/api/calls/check Check Bundle https://login.circonus.com/resources/api/calls/check_bundle Check Bundle Metrics https://login.circonus.com/resources/api/calls/check_bundle_metrics Contact Group https://login.circonus.com/resources/api/calls/contact_group Dashboard https://login.circonus.com/resources/api/calls/dashboard Graph https://login.circonus.com/resources/api/calls/graph Maintenance [window] https://login.circonus.com/resources/api/calls/maintenance Metric https://login.circonus.com/resources/api/calls/metric Metric Cluster https://login.circonus.com/resources/api/calls/metric_cluster Outlier Report https://login.circonus.com/resources/api/calls/outlier_report Provision Broker https://login.circonus.com/resources/api/calls/provision_broker Rule Set https://login.circonus.com/resources/api/calls/rule_set Rule Set Group https://login.circonus.com/resources/api/calls/rule_set_group User https://login.circonus.com/resources/api/calls/user Worksheet https://login.circonus.com/resources/api/calls/worksheet
Endpoints (not supported)
Support may be added for these endpoints in the future. These endpoints may currently be used directly with the Raw REST methods above. CAQL https://login.circonus.com/resources/api/calls/caql Check Move https://login.circonus.com/resources/api/calls/check_move Data https://login.circonus.com/resources/api/calls/data Snapshot https://login.circonus.com/resources/api/calls/snapshot Tag https://login.circonus.com/resources/api/calls/tag Template https://login.circonus.com/resources/api/calls/template
Verbs
Fetch singular/plural item(s) - e.g. FetchAnnotation, FetchAnnotations Create create new item - e.g. CreateAnnotation Update update an item - e.g. UpdateAnnotation Delete remove an item - e.g. DeleteAnnotation, DeleteAnnotationByCID Search search for item(s) - e.g. SearchAnnotations New new item config - e.g. NewAnnotation (returns an empty item, any applicable defaults defined) Not all endpoints support all verbs.
Index ¶
- type API
- func (a *API) CreateAcknowledgement(cfg *Acknowledgement) (*Acknowledgement, error)
- func (a *API) CreateAnnotation(cfg *Annotation) (*Annotation, error)
- func (a *API) CreateCheckBundle(cfg *CheckBundle) (*CheckBundle, error)
- func (a *API) CreateContactGroup(cfg *ContactGroup) (*ContactGroup, error)
- func (a *API) CreateDashboard(cfg *Dashboard) (*Dashboard, error)
- func (a *API) CreateGraph(cfg *Graph) (*Graph, error)
- func (a *API) CreateMaintenanceWindow(cfg *Maintenance) (*Maintenance, error)
- func (a *API) CreateMetricCluster(cfg *MetricCluster) (*MetricCluster, error)
- func (a *API) CreateOutlierReport(cfg *OutlierReport) (*OutlierReport, error)
- func (a *API) CreateProvisionBroker(cfg *ProvisionBroker) (*ProvisionBroker, error)
- func (a *API) CreateRuleSet(cfg *RuleSet) (*RuleSet, error)
- func (a *API) CreateRuleSetGroup(cfg *RuleSetGroup) (*RuleSetGroup, error)
- func (a *API) CreateWorksheet(cfg *Worksheet) (*Worksheet, error)
- func (a *API) Delete(reqPath string) ([]byte, error)
- func (a *API) DeleteAnnotation(cfg *Annotation) (bool, error)
- func (a *API) DeleteAnnotationByCID(cid CIDType) (bool, error)
- func (a *API) DeleteCheckBundle(cfg *CheckBundle) (bool, error)
- func (a *API) DeleteCheckBundleByCID(cid CIDType) (bool, error)
- func (a *API) DeleteContactGroup(cfg *ContactGroup) (bool, error)
- func (a *API) DeleteContactGroupByCID(cid CIDType) (bool, error)
- func (a *API) DeleteDashboard(cfg *Dashboard) (bool, error)
- func (a *API) DeleteDashboardByCID(cid CIDType) (bool, error)
- func (a *API) DeleteGraph(cfg *Graph) (bool, error)
- func (a *API) DeleteGraphByCID(cid CIDType) (bool, error)
- func (a *API) DeleteMaintenanceWindow(cfg *Maintenance) (bool, error)
- func (a *API) DeleteMaintenanceWindowByCID(cid CIDType) (bool, error)
- func (a *API) DeleteMetricCluster(cfg *MetricCluster) (bool, error)
- func (a *API) DeleteMetricClusterByCID(cid CIDType) (bool, error)
- func (a *API) DeleteOutlierReport(cfg *OutlierReport) (bool, error)
- func (a *API) DeleteOutlierReportByCID(cid CIDType) (bool, error)
- func (a *API) DeleteRuleSet(cfg *RuleSet) (bool, error)
- func (a *API) DeleteRuleSetByCID(cid CIDType) (bool, error)
- func (a *API) DeleteRuleSetGroup(cfg *RuleSetGroup) (bool, error)
- func (a *API) DeleteRuleSetGroupByCID(cid CIDType) (bool, error)
- func (a *API) DeleteWorksheet(cfg *Worksheet) (bool, error)
- func (a *API) DeleteWorksheetByCID(cid CIDType) (bool, error)
- func (a *API) DisableExponentialBackoff()
- func (a *API) EnableExponentialBackoff()
- func (a *API) FetchAccount(cid CIDType) (*Account, error)
- func (a *API) FetchAccounts() (*[]Account, error)
- func (a *API) FetchAcknowledgement(cid CIDType) (*Acknowledgement, error)
- func (a *API) FetchAcknowledgements() (*[]Acknowledgement, error)
- func (a *API) FetchAlert(cid CIDType) (*Alert, error)
- func (a *API) FetchAlerts() (*[]Alert, error)
- func (a *API) FetchAnnotation(cid CIDType) (*Annotation, error)
- func (a *API) FetchAnnotations() (*[]Annotation, error)
- func (a *API) FetchBroker(cid CIDType) (*Broker, error)
- func (a *API) FetchBrokers() (*[]Broker, error)
- func (a *API) FetchCheck(cid CIDType) (*Check, error)
- func (a *API) FetchCheckBundle(cid CIDType) (*CheckBundle, error)
- func (a *API) FetchCheckBundleMetrics(cid CIDType) (*CheckBundleMetrics, error)
- func (a *API) FetchCheckBundles() (*[]CheckBundle, error)
- func (a *API) FetchChecks() (*[]Check, error)
- func (a *API) FetchContactGroup(cid CIDType) (*ContactGroup, error)
- func (a *API) FetchContactGroups() (*[]ContactGroup, error)
- func (a *API) FetchDashboard(cid CIDType) (*Dashboard, error)
- func (a *API) FetchDashboards() (*[]Dashboard, error)
- func (a *API) FetchGraph(cid CIDType) (*Graph, error)
- func (a *API) FetchGraphs() (*[]Graph, error)
- func (a *API) FetchMaintenanceWindow(cid CIDType) (*Maintenance, error)
- func (a *API) FetchMaintenanceWindows() (*[]Maintenance, error)
- func (a *API) FetchMetric(cid CIDType) (*Metric, error)
- func (a *API) FetchMetricCluster(cid CIDType, extras string) (*MetricCluster, error)
- func (a *API) FetchMetricClusters(extras string) (*[]MetricCluster, error)
- func (a *API) FetchMetrics() (*[]Metric, error)
- func (a *API) FetchOutlierReport(cid CIDType) (*OutlierReport, error)
- func (a *API) FetchOutlierReports() (*[]OutlierReport, error)
- func (a *API) FetchProvisionBroker(cid CIDType) (*ProvisionBroker, error)
- func (a *API) FetchRuleSet(cid CIDType) (*RuleSet, error)
- func (a *API) FetchRuleSetGroup(cid CIDType) (*RuleSetGroup, error)
- func (a *API) FetchRuleSetGroups() (*[]RuleSetGroup, error)
- func (a *API) FetchRuleSets() (*[]RuleSet, error)
- func (a *API) FetchUser(cid CIDType) (*User, error)
- func (a *API) FetchUsers() (*[]User, error)
- func (a *API) FetchWorksheet(cid CIDType) (*Worksheet, error)
- func (a *API) FetchWorksheets() (*[]Worksheet, error)
- func (a *API) Get(reqPath string) ([]byte, error)
- func (a *API) Post(reqPath string, data []byte) ([]byte, error)
- func (a *API) Put(reqPath string, data []byte) ([]byte, error)
- func (a *API) SearchAccounts(filterCriteria *SearchFilterType) (*[]Account, error)
- func (a *API) SearchAcknowledgements(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Acknowledgement, error)
- func (a *API) SearchAlerts(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Alert, error)
- func (a *API) SearchAnnotations(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Annotation, error)
- func (a *API) SearchBrokers(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Broker, error)
- func (a *API) SearchCheckBundles(searchCriteria *SearchQueryType, filterCriteria *map[string][]string) (*[]CheckBundle, error)
- func (a *API) SearchChecks(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Check, error)
- func (a *API) SearchContactGroups(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]ContactGroup, error)
- func (a *API) SearchDashboards(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Dashboard, error)
- func (a *API) SearchGraphs(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Graph, error)
- func (a *API) SearchMaintenanceWindows(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Maintenance, error)
- func (a *API) SearchMetricClusters(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]MetricCluster, error)
- func (a *API) SearchMetrics(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Metric, error)
- func (a *API) SearchOutlierReports(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]OutlierReport, error)
- func (a *API) SearchRuleSetGroups(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]RuleSetGroup, error)
- func (a *API) SearchRuleSets(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]RuleSet, error)
- func (a *API) SearchUsers(filterCriteria *SearchFilterType) (*[]User, error)
- func (a *API) SearchWorksheets(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Worksheet, error)
- func (a *API) UpdateAccount(cfg *Account) (*Account, error)
- func (a *API) UpdateAcknowledgement(cfg *Acknowledgement) (*Acknowledgement, error)
- func (a *API) UpdateAnnotation(cfg *Annotation) (*Annotation, error)
- func (a *API) UpdateCheckBundle(cfg *CheckBundle) (*CheckBundle, error)
- func (a *API) UpdateCheckBundleMetrics(cfg *CheckBundleMetrics) (*CheckBundleMetrics, error)
- func (a *API) UpdateContactGroup(cfg *ContactGroup) (*ContactGroup, error)
- func (a *API) UpdateDashboard(cfg *Dashboard) (*Dashboard, error)
- func (a *API) UpdateGraph(cfg *Graph) (*Graph, error)
- func (a *API) UpdateMaintenanceWindow(cfg *Maintenance) (*Maintenance, error)
- func (a *API) UpdateMetric(cfg *Metric) (*Metric, error)
- func (a *API) UpdateMetricCluster(cfg *MetricCluster) (*MetricCluster, error)
- func (a *API) UpdateOutlierReport(cfg *OutlierReport) (*OutlierReport, error)
- func (a *API) UpdateProvisionBroker(cid CIDType, cfg *ProvisionBroker) (*ProvisionBroker, error)
- func (a *API) UpdateRuleSet(cfg *RuleSet) (*RuleSet, error)
- func (a *API) UpdateRuleSetGroup(cfg *RuleSetGroup) (*RuleSetGroup, error)
- func (a *API) UpdateUser(cfg *User) (*User, error)
- func (a *API) UpdateWorksheet(cfg *Worksheet) (*Worksheet, error)
- type Account
- type AccountInvite
- type AccountLimit
- type AccountUser
- type Acknowledgement
- type Alert
- type Annotation
- type Broker
- type BrokerDetail
- type BrokerStratcon
- type CIDType
- type ChartTextWidgetDatapoint
- type ChartWidgetDefinitionLegend
- type ChartWidgetWedgeLabels
- type ChartWidgetWedgeValues
- type ChartWidgtDefinition
- type Check
- type CheckBundle
- type CheckBundleConfig
- type CheckBundleMetric
- type CheckBundleMetrics
- type CheckDetails
- type Config
- type ContactGroup
- type ContactGroupAlertFormats
- type ContactGroupContacts
- type ContactGroupContactsExternal
- type ContactGroupContactsUser
- type ContactGroupEscalation
- type Dashboard
- type DashboardAccessConfig
- type DashboardGridLayout
- type DashboardOptions
- type DashboardWidget
- type DashboardWidgetSettings
- type ForecastGaugeWidgetThresholds
- type Graph
- type GraphAccessKey
- type GraphComposite
- type GraphDatapoint
- type GraphGuide
- type GraphMetricCluster
- type GraphOverlay
- type GraphOverlaySet
- type IDType
- type Maintenance
- type Metric
- type MetricCluster
- type MetricQuery
- type OutlierReport
- type OverlayDataOptions
- type OverlayUISpecs
- type ProvisionBroker
- type RuleSet
- type RuleSetGroup
- type RuleSetGroupCondition
- type RuleSetGroupFormula
- type RuleSetRule
- type SearchFilterType
- type SearchQueryType
- type StatusWidgetAgentStatusSettings
- type StatusWidgetHostStatusSettings
- type TagType
- type TokenAccountIDType
- type TokenAppType
- type TokenKeyType
- type URLType
- type User
- type UserContactInfo
- type Worksheet
- type WorksheetGraph
- type WorksheetSmartQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
API Circonus API
func (*API) CreateAcknowledgement ¶
func (a *API) CreateAcknowledgement(cfg *Acknowledgement) (*Acknowledgement, error)
CreateAcknowledgement creates a new acknowledgement.
func (*API) CreateAnnotation ¶
func (a *API) CreateAnnotation(cfg *Annotation) (*Annotation, error)
CreateAnnotation creates a new annotation.
func (*API) CreateCheckBundle ¶
func (a *API) CreateCheckBundle(cfg *CheckBundle) (*CheckBundle, error)
CreateCheckBundle creates a new check bundle (check).
func (*API) CreateContactGroup ¶
func (a *API) CreateContactGroup(cfg *ContactGroup) (*ContactGroup, error)
CreateContactGroup creates a new contact group.
func (*API) CreateDashboard ¶
CreateDashboard creates a new dashboard.
func (*API) CreateGraph ¶
CreateGraph creates a new graph.
func (*API) CreateMaintenanceWindow ¶
func (a *API) CreateMaintenanceWindow(cfg *Maintenance) (*Maintenance, error)
CreateMaintenanceWindow creates a new maintenance [window].
func (*API) CreateMetricCluster ¶
func (a *API) CreateMetricCluster(cfg *MetricCluster) (*MetricCluster, error)
CreateMetricCluster creates a new metric cluster.
func (*API) CreateOutlierReport ¶
func (a *API) CreateOutlierReport(cfg *OutlierReport) (*OutlierReport, error)
CreateOutlierReport creates a new outlier report.
func (*API) CreateProvisionBroker ¶
func (a *API) CreateProvisionBroker(cfg *ProvisionBroker) (*ProvisionBroker, error)
CreateProvisionBroker creates a new provison broker [request].
func (*API) CreateRuleSet ¶
CreateRuleSet creates a new rule set.
func (*API) CreateRuleSetGroup ¶
func (a *API) CreateRuleSetGroup(cfg *RuleSetGroup) (*RuleSetGroup, error)
CreateRuleSetGroup creates a new rule set group.
func (*API) CreateWorksheet ¶
CreateWorksheet creates a new worksheet.
func (*API) DeleteAnnotation ¶
func (a *API) DeleteAnnotation(cfg *Annotation) (bool, error)
DeleteAnnotation deletes passed annotation.
func (*API) DeleteAnnotationByCID ¶
DeleteAnnotationByCID deletes annotation with passed cid.
func (*API) DeleteCheckBundle ¶
func (a *API) DeleteCheckBundle(cfg *CheckBundle) (bool, error)
DeleteCheckBundle deletes passed check bundle.
func (*API) DeleteCheckBundleByCID ¶
DeleteCheckBundleByCID deletes check bundle with passed cid.
func (*API) DeleteContactGroup ¶
func (a *API) DeleteContactGroup(cfg *ContactGroup) (bool, error)
DeleteContactGroup deletes passed contact group.
func (*API) DeleteContactGroupByCID ¶
DeleteContactGroupByCID deletes contact group with passed cid.
func (*API) DeleteDashboard ¶
DeleteDashboard deletes passed dashboard.
func (*API) DeleteDashboardByCID ¶
DeleteDashboardByCID deletes dashboard with passed cid.
func (*API) DeleteGraph ¶
DeleteGraph deletes passed graph.
func (*API) DeleteGraphByCID ¶
DeleteGraphByCID deletes graph with passed cid.
func (*API) DeleteMaintenanceWindow ¶
func (a *API) DeleteMaintenanceWindow(cfg *Maintenance) (bool, error)
DeleteMaintenanceWindow deletes passed maintenance [window].
func (*API) DeleteMaintenanceWindowByCID ¶
DeleteMaintenanceWindowByCID deletes maintenance [window] with passed cid.
func (*API) DeleteMetricCluster ¶
func (a *API) DeleteMetricCluster(cfg *MetricCluster) (bool, error)
DeleteMetricCluster deletes passed metric cluster.
func (*API) DeleteMetricClusterByCID ¶
DeleteMetricClusterByCID deletes metric cluster with passed cid.
func (*API) DeleteOutlierReport ¶
func (a *API) DeleteOutlierReport(cfg *OutlierReport) (bool, error)
DeleteOutlierReport deletes passed outlier report.
func (*API) DeleteOutlierReportByCID ¶
DeleteOutlierReportByCID deletes outlier report with passed cid.
func (*API) DeleteRuleSet ¶
DeleteRuleSet deletes passed rule set.
func (*API) DeleteRuleSetByCID ¶
DeleteRuleSetByCID deletes rule set with passed cid.
func (*API) DeleteRuleSetGroup ¶
func (a *API) DeleteRuleSetGroup(cfg *RuleSetGroup) (bool, error)
DeleteRuleSetGroup deletes passed rule set group.
func (*API) DeleteRuleSetGroupByCID ¶
DeleteRuleSetGroupByCID deletes rule set group with passed cid.
func (*API) DeleteWorksheet ¶
DeleteWorksheet deletes passed worksheet.
func (*API) DeleteWorksheetByCID ¶
DeleteWorksheetByCID deletes worksheet with passed cid.
func (*API) DisableExponentialBackoff ¶
func (a *API) DisableExponentialBackoff()
DisableExponentialBackoff disables use of exponential backoff. If a request using exponential backoff is currently running, it will stop using exponential backoff on its next iteration (if needed).
func (*API) EnableExponentialBackoff ¶
func (a *API) EnableExponentialBackoff()
EnableExponentialBackoff enables use of exponential backoff for next API call(s) and use exponential backoff for all API calls until exponential backoff is disabled.
func (*API) FetchAccount ¶
FetchAccount retrieves account with passed cid. Pass nil for '/account/current'.
func (*API) FetchAccounts ¶
FetchAccounts retrieves all accounts available to the API Token.
func (*API) FetchAcknowledgement ¶
func (a *API) FetchAcknowledgement(cid CIDType) (*Acknowledgement, error)
FetchAcknowledgement retrieves acknowledgement with passed cid.
func (*API) FetchAcknowledgements ¶
func (a *API) FetchAcknowledgements() (*[]Acknowledgement, error)
FetchAcknowledgements retrieves all acknowledgements available to the API Token.
func (*API) FetchAlert ¶
FetchAlert retrieves alert with passed cid.
func (*API) FetchAlerts ¶
FetchAlerts retrieves all alerts available to the API Token.
func (*API) FetchAnnotation ¶
func (a *API) FetchAnnotation(cid CIDType) (*Annotation, error)
FetchAnnotation retrieves annotation with passed cid.
func (*API) FetchAnnotations ¶
func (a *API) FetchAnnotations() (*[]Annotation, error)
FetchAnnotations retrieves all annotations available to the API Token.
func (*API) FetchBroker ¶
FetchBroker retrieves broker with passed cid.
func (*API) FetchBrokers ¶
FetchBrokers returns all brokers available to the API Token.
func (*API) FetchCheck ¶
FetchCheck retrieves check with passed cid.
func (*API) FetchCheckBundle ¶
func (a *API) FetchCheckBundle(cid CIDType) (*CheckBundle, error)
FetchCheckBundle retrieves check bundle with passed cid.
func (*API) FetchCheckBundleMetrics ¶
func (a *API) FetchCheckBundleMetrics(cid CIDType) (*CheckBundleMetrics, error)
FetchCheckBundleMetrics retrieves metrics for the check bundle with passed cid.
func (*API) FetchCheckBundles ¶
func (a *API) FetchCheckBundles() (*[]CheckBundle, error)
FetchCheckBundles retrieves all check bundles available to the API Token.
func (*API) FetchChecks ¶
FetchChecks retrieves all checks available to the API Token.
func (*API) FetchContactGroup ¶
func (a *API) FetchContactGroup(cid CIDType) (*ContactGroup, error)
FetchContactGroup retrieves contact group with passed cid.
func (*API) FetchContactGroups ¶
func (a *API) FetchContactGroups() (*[]ContactGroup, error)
FetchContactGroups retrieves all contact groups available to the API Token.
func (*API) FetchDashboard ¶
FetchDashboard retrieves dashboard with passed cid.
func (*API) FetchDashboards ¶
FetchDashboards retrieves all dashboards available to the API Token.
func (*API) FetchGraph ¶
FetchGraph retrieves graph with passed cid.
func (*API) FetchGraphs ¶
FetchGraphs retrieves all graphs available to the API Token.
func (*API) FetchMaintenanceWindow ¶
func (a *API) FetchMaintenanceWindow(cid CIDType) (*Maintenance, error)
FetchMaintenanceWindow retrieves maintenance [window] with passed cid.
func (*API) FetchMaintenanceWindows ¶
func (a *API) FetchMaintenanceWindows() (*[]Maintenance, error)
FetchMaintenanceWindows retrieves all maintenance [windows] available to API Token.
func (*API) FetchMetric ¶
FetchMetric retrieves metric with passed cid.
func (*API) FetchMetricCluster ¶
func (a *API) FetchMetricCluster(cid CIDType, extras string) (*MetricCluster, error)
FetchMetricCluster retrieves metric cluster with passed cid.
func (*API) FetchMetricClusters ¶
func (a *API) FetchMetricClusters(extras string) (*[]MetricCluster, error)
FetchMetricClusters retrieves all metric clusters available to API Token.
func (*API) FetchMetrics ¶
FetchMetrics retrieves all metrics available to API Token.
func (*API) FetchOutlierReport ¶
func (a *API) FetchOutlierReport(cid CIDType) (*OutlierReport, error)
FetchOutlierReport retrieves outlier report with passed cid.
func (*API) FetchOutlierReports ¶
func (a *API) FetchOutlierReports() (*[]OutlierReport, error)
FetchOutlierReports retrieves all outlier reports available to API Token.
func (*API) FetchProvisionBroker ¶
func (a *API) FetchProvisionBroker(cid CIDType) (*ProvisionBroker, error)
FetchProvisionBroker retrieves provision broker [request] with passed cid.
func (*API) FetchRuleSet ¶
FetchRuleSet retrieves rule set with passed cid.
func (*API) FetchRuleSetGroup ¶
func (a *API) FetchRuleSetGroup(cid CIDType) (*RuleSetGroup, error)
FetchRuleSetGroup retrieves rule set group with passed cid.
func (*API) FetchRuleSetGroups ¶
func (a *API) FetchRuleSetGroups() (*[]RuleSetGroup, error)
FetchRuleSetGroups retrieves all rule set groups available to API Token.
func (*API) FetchRuleSets ¶
FetchRuleSets retrieves all rule sets available to API Token.
func (*API) FetchUsers ¶
FetchUsers retrieves all users available to API Token.
func (*API) FetchWorksheet ¶
FetchWorksheet retrieves worksheet with passed cid.
func (*API) FetchWorksheets ¶
FetchWorksheets retrieves all worksheets available to API Token.
func (*API) SearchAccounts ¶
func (a *API) SearchAccounts(filterCriteria *SearchFilterType) (*[]Account, error)
SearchAccounts returns accounts matching a filter (search queries are not suppoted by the account endpoint). Pass nil as filter for all accounts the API Token can access.
func (*API) SearchAcknowledgements ¶
func (a *API) SearchAcknowledgements(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Acknowledgement, error)
SearchAcknowledgements returns acknowledgements matching the specified search query and/or filter. If nil is passed for both parameters all acknowledgements will be returned.
func (*API) SearchAlerts ¶
func (a *API) SearchAlerts(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Alert, error)
SearchAlerts returns alerts matching the specified search query and/or filter. If nil is passed for both parameters all alerts will be returned.
func (*API) SearchAnnotations ¶
func (a *API) SearchAnnotations(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Annotation, error)
SearchAnnotations returns annotations matching the specified search query and/or filter. If nil is passed for both parameters all annotations will be returned.
func (*API) SearchBrokers ¶
func (a *API) SearchBrokers(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Broker, error)
SearchBrokers returns brokers matching the specified search query and/or filter. If nil is passed for both parameters all brokers will be returned.
func (*API) SearchCheckBundles ¶
func (a *API) SearchCheckBundles(searchCriteria *SearchQueryType, filterCriteria *map[string][]string) (*[]CheckBundle, error)
SearchCheckBundles returns check bundles matching the specified search query and/or filter. If nil is passed for both parameters all check bundles will be returned.
func (*API) SearchChecks ¶
func (a *API) SearchChecks(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Check, error)
SearchChecks returns checks matching the specified search query and/or filter. If nil is passed for both parameters all checks will be returned.
func (*API) SearchContactGroups ¶
func (a *API) SearchContactGroups(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]ContactGroup, error)
SearchContactGroups returns contact groups matching the specified search query and/or filter. If nil is passed for both parameters all contact groups will be returned.
func (*API) SearchDashboards ¶
func (a *API) SearchDashboards(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Dashboard, error)
SearchDashboards returns dashboards matching the specified search query and/or filter. If nil is passed for both parameters all dashboards will be returned.
func (*API) SearchGraphs ¶
func (a *API) SearchGraphs(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Graph, error)
SearchGraphs returns graphs matching the specified search query and/or filter. If nil is passed for both parameters all graphs will be returned.
func (*API) SearchMaintenanceWindows ¶
func (a *API) SearchMaintenanceWindows(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Maintenance, error)
SearchMaintenanceWindows returns maintenance [windows] matching the specified search query and/or filter. If nil is passed for both parameters all maintenance [windows] will be returned.
func (*API) SearchMetricClusters ¶
func (a *API) SearchMetricClusters(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]MetricCluster, error)
SearchMetricClusters returns metric clusters matching the specified search query and/or filter. If nil is passed for both parameters all metric clusters will be returned.
func (*API) SearchMetrics ¶
func (a *API) SearchMetrics(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Metric, error)
SearchMetrics returns metrics matching the specified search query and/or filter. If nil is passed for both parameters all metrics will be returned.
func (*API) SearchOutlierReports ¶
func (a *API) SearchOutlierReports(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]OutlierReport, error)
SearchOutlierReports returns outlier report matching the specified search query and/or filter. If nil is passed for both parameters all outlier report will be returned.
func (*API) SearchRuleSetGroups ¶
func (a *API) SearchRuleSetGroups(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]RuleSetGroup, error)
SearchRuleSetGroups returns rule set groups matching the specified search query and/or filter. If nil is passed for both parameters all rule set groups will be returned.
func (*API) SearchRuleSets ¶
func (a *API) SearchRuleSets(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]RuleSet, error)
SearchRuleSets returns rule sets matching the specified search query and/or filter. If nil is passed for both parameters all rule sets will be returned.
func (*API) SearchUsers ¶
func (a *API) SearchUsers(filterCriteria *SearchFilterType) (*[]User, error)
SearchUsers returns users matching a filter (search queries are not suppoted by the user endpoint). Pass nil as filter for all users available to the API Token.
func (*API) SearchWorksheets ¶
func (a *API) SearchWorksheets(searchCriteria *SearchQueryType, filterCriteria *SearchFilterType) (*[]Worksheet, error)
SearchWorksheets returns worksheets matching the specified search query and/or filter. If nil is passed for both parameters all worksheets will be returned.
func (*API) UpdateAccount ¶
UpdateAccount updates passed account.
func (*API) UpdateAcknowledgement ¶
func (a *API) UpdateAcknowledgement(cfg *Acknowledgement) (*Acknowledgement, error)
UpdateAcknowledgement updates passed acknowledgement.
func (*API) UpdateAnnotation ¶
func (a *API) UpdateAnnotation(cfg *Annotation) (*Annotation, error)
UpdateAnnotation updates passed annotation.
func (*API) UpdateCheckBundle ¶
func (a *API) UpdateCheckBundle(cfg *CheckBundle) (*CheckBundle, error)
UpdateCheckBundle updates passed check bundle.
func (*API) UpdateCheckBundleMetrics ¶
func (a *API) UpdateCheckBundleMetrics(cfg *CheckBundleMetrics) (*CheckBundleMetrics, error)
UpdateCheckBundleMetrics updates passed metrics.
func (*API) UpdateContactGroup ¶
func (a *API) UpdateContactGroup(cfg *ContactGroup) (*ContactGroup, error)
UpdateContactGroup updates passed contact group.
func (*API) UpdateDashboard ¶
UpdateDashboard updates passed dashboard.
func (*API) UpdateGraph ¶
UpdateGraph updates passed graph.
func (*API) UpdateMaintenanceWindow ¶
func (a *API) UpdateMaintenanceWindow(cfg *Maintenance) (*Maintenance, error)
UpdateMaintenanceWindow updates passed maintenance [window].
func (*API) UpdateMetric ¶
UpdateMetric updates passed metric.
func (*API) UpdateMetricCluster ¶
func (a *API) UpdateMetricCluster(cfg *MetricCluster) (*MetricCluster, error)
UpdateMetricCluster updates passed metric cluster.
func (*API) UpdateOutlierReport ¶
func (a *API) UpdateOutlierReport(cfg *OutlierReport) (*OutlierReport, error)
UpdateOutlierReport updates passed outlier report.
func (*API) UpdateProvisionBroker ¶
func (a *API) UpdateProvisionBroker(cid CIDType, cfg *ProvisionBroker) (*ProvisionBroker, error)
UpdateProvisionBroker updates a broker definition [request].
func (*API) UpdateRuleSet ¶
UpdateRuleSet updates passed rule set.
func (*API) UpdateRuleSetGroup ¶
func (a *API) UpdateRuleSetGroup(cfg *RuleSetGroup) (*RuleSetGroup, error)
UpdateRuleSetGroup updates passed rule set group.
func (*API) UpdateUser ¶
UpdateUser updates passed user.
type Account ¶
type Account struct { Address1 *string `json:"address1,omitempty"` // string or null Address2 *string `json:"address2,omitempty"` // string or null CCEmail *string `json:"cc_email,omitempty"` // string or null CID string `json:"_cid,omitempty"` // string City *string `json:"city,omitempty"` // string or null ContactGroups []string `json:"_contact_groups,omitempty"` // [] len >= 0 Country string `json:"country_code,omitempty"` // string Description *string `json:"description,omitempty"` // string or null Invites []AccountInvite `json:"invites,omitempty"` // [] len >= 0 Name string `json:"name,omitempty"` // string OwnerCID string `json:"_owner,omitempty"` // string StateProv *string `json:"state_prov,omitempty"` // string or null Timezone string `json:"timezone,omitempty"` // string UIBaseURL string `json:"_ui_base_url,omitempty"` // string Usage []AccountLimit `json:"_usage,omitempty"` // [] len >= 0 Users []AccountUser `json:"users,omitempty"` // [] len >= 0 }
Account defines an account. See https://login.circonus.com/resources/api/calls/account for more information.
type AccountInvite ¶
type AccountInvite struct { Email string `json:"email"` // string Role string `json:"role"` // string }
AccountInvite defines outstanding invites
type AccountLimit ¶
type AccountLimit struct { Limit uint `json:"_limit,omitempty"` // uint >=0 Type string `json:"_type,omitempty"` // string Used uint `json:"_used,omitempty"` // uint >=0 }
AccountLimit defines a usage limit imposed on account
type AccountUser ¶
type AccountUser struct { Role string `json:"role"` // string UserCID string `json:"user"` // string }
AccountUser defines current users
type Acknowledgement ¶
type Acknowledgement struct { AcknowledgedBy string `json:"_acknowledged_by,omitempty"` // string AcknowledgedOn uint `json:"_acknowledged_on,omitempty"` // uint AcknowledgedUntil interface{} `json:"acknowledged_until,omitempty"` // NOTE received as uint; can be set using string or uint Active bool `json:"_active,omitempty"` // bool AlertCID string `json:"alert,omitempty"` // string CID string `json:"_cid,omitempty"` // string LastModified uint `json:"_last_modified,omitempty"` // uint LastModifiedBy string `json:"_last_modified_by,omitempty"` // string Notes string `json:"notes,omitempty"` // string }
Acknowledgement defines a acknowledgement. See https://login.circonus.com/resources/api/calls/acknowledgement for more information.
func NewAcknowledgement ¶
func NewAcknowledgement() *Acknowledgement
NewAcknowledgement returns new Acknowledgement (with defaults, if applicable).
type Alert ¶
type Alert struct { AcknowledgementCID *string `json:"_acknowledgement,omitempty"` // string or null AlertURL string `json:"_alert_url,omitempty"` // string BrokerCID string `json:"_broker,omitempty"` // string CheckCID string `json:"_check,omitempty"` // string CheckName string `json:"_check_name,omitempty"` // string CID string `json:"_cid,omitempty"` // string ClearedOn *uint `json:"_cleared_on,omitempty"` // uint or null ClearedValue *string `json:"_cleared_value,omitempty"` // string or null Maintenance []string `json:"_maintenance,omitempty"` // [] len >= 0 MetricLinkURL *string `json:"_metric_link,omitempty"` // string or null MetricName string `json:"_metric_name,omitempty"` // string MetricNotes *string `json:"_metric_notes,omitempty"` // string or null OccurredOn uint `json:"_occurred_on,omitempty"` // uint RuleSetCID string `json:"_rule_set,omitempty"` // string Severity uint `json:"_severity,omitempty"` // uint Tags []string `json:"_tags,omitempty"` // [] len >= 0 Value string `json:"_value,omitempty"` // string }
Alert defines a alert. See https://login.circonus.com/resources/api/calls/alert for more information.
type Annotation ¶
type Annotation struct { Category string `json:"category"` // string CID string `json:"_cid,omitempty"` // string Created uint `json:"_created,omitempty"` // uint Description string `json:"description"` // string LastModified uint `json:"_last_modified,omitempty"` // uint LastModifiedBy string `json:"_last_modified_by,omitempty"` // string RelatedMetrics []string `json:"rel_metrics"` // [] len >= 0 Start uint `json:"start"` // uint Stop uint `json:"stop"` // uint Title string `json:"title"` // string }
Annotation defines a annotation. See https://login.circonus.com/resources/api/calls/annotation for more information.
func NewAnnotation ¶
func NewAnnotation() *Annotation
NewAnnotation returns a new Annotation (with defaults, if applicable)
type Broker ¶
type Broker struct { CID string `json:"_cid"` // string Details []BrokerDetail `json:"_details"` // [] len >= 1 Latitude *string `json:"_latitude"` // string or null Longitude *string `json:"_longitude"` // string or null Name string `json:"_name"` // string Tags []string `json:"_tags"` // [] len >= 0 Type string `json:"_type"` // string }
Broker defines a broker. See https://login.circonus.com/resources/api/calls/broker for more information.
type BrokerDetail ¶
type BrokerDetail struct { ClusterIP *string `json:"cluster_ip"` // string or null CN string `json:"cn"` // string ExternalHost *string `json:"external_host"` // string or null ExternalPort uint16 `json:"external_port"` // uint16 IP *string `json:"ipaddress"` // string or null MinVer uint `json:"minimum_version_required"` // uint Modules []string `json:"modules"` // [] len >= 0 Port *uint16 `json:"port"` // uint16 or null Skew *string `json:"skew"` // BUG doc: floating point number, api object: string or null Status string `json:"status"` // string Version *uint `json:"version"` // uint or null }
BrokerDetail defines instance attributes
type BrokerStratcon ¶
type BrokerStratcon struct { CN string `json:"cn,omitempty"` // string Host string `json:"host,omitempty"` // string Port string `json:"port,omitempty"` // string }
BrokerStratcon defines stratcons for broker
type ChartTextWidgetDatapoint ¶
type ChartTextWidgetDatapoint struct { AccountID string `json:"account_id,omitempty"` // metric cluster, metric CheckID uint `json:"_check_id,omitempty"` // metric ClusterID uint `json:"cluster_id,omitempty"` // metric cluster ClusterTitle string `json:"_cluster_title,omitempty"` // metric cluster Label string `json:"label,omitempty"` // metric Label2 string `json:"_label,omitempty"` // metric cluster Metric string `json:"metric,omitempty"` // metric MetricType string `json:"_metric_type,omitempty"` // metric NumericOnly bool `json:"numeric_only,omitempty"` // metric cluster }
ChartTextWidgetDatapoint defines datapoints for charts
type ChartWidgetDefinitionLegend ¶
type ChartWidgetDefinitionLegend struct { Show bool `json:"show,omitempty"` Type string `json:"type,omitempty"` }
ChartWidgetDefinitionLegend defines chart widget definition legend
type ChartWidgetWedgeLabels ¶
type ChartWidgetWedgeLabels struct { OnChart bool `json:"on_chart,omitempty"` ToolTips bool `json:"tooltips,omitempty"` }
ChartWidgetWedgeLabels defines chart widget wedge labels
type ChartWidgetWedgeValues ¶
type ChartWidgetWedgeValues struct { Angle string `json:"angle,omitempty"` Color string `json:"color,omitempty"` Show bool `json:"show,omitempty"` }
ChartWidgetWedgeValues defines chart widget wedge values
type ChartWidgtDefinition ¶
type ChartWidgtDefinition struct { Datasource string `json:"datasource,omitempty"` Derive string `json:"derive,omitempty"` DisableAutoformat bool `json:"disable_autoformat,omitempty"` Formula string `json:"formula,omitempty"` Legend ChartWidgetDefinitionLegend `json:"legend,omitempty"` Period uint `json:"period,omitempty"` PopOnHover bool `json:"pop_onhover,omitempty"` WedgeLabels ChartWidgetWedgeLabels `json:"wedge_labels,omitempty"` WedgeValues ChartWidgetWedgeValues `json:"wedge_values,omitempty"` }
ChartWidgtDefinition defines chart widget definition
type Check ¶
type Check struct { Active bool `json:"_active"` // bool BrokerCID string `json:"_broker"` // string CheckBundleCID string `json:"_check_bundle"` // string CheckUUID string `json:"_check_uuid"` // string CID string `json:"_cid"` // string Details CheckDetails `json:"_details"` // NOTE contents of details are check type specific, map len >= 0 }
Check defines a check. See https://login.circonus.com/resources/api/calls/check for more information.
type CheckBundle ¶
type CheckBundle struct { Brokers []string `json:"brokers"` // [] len >= 0 Checks []string `json:"_checks,omitempty"` // [] len >= 0 CheckUUIDs []string `json:"_check_uuids,omitempty"` // [] len >= 0 CID string `json:"_cid,omitempty"` // string Config CheckBundleConfig `json:"config"` // NOTE contents of config are check type specific, map len >= 0 Created uint `json:"_created,omitempty"` // uint DisplayName string `json:"display_name"` // string LastModifedBy string `json:"_last_modifed_by,omitempty"` // string LastModified uint `json:"_last_modified,omitempty"` // uint MetricLimit int `json:"metric_limit,omitempty"` // int Metrics []CheckBundleMetric `json:"metrics"` // [] >= 0 Notes *string `json:"notes,omitempty"` // string or null Period uint `json:"period,omitempty"` // uint ReverseConnectURLs []string `json:"_reverse_connection_urls,omitempty"` // [] len >= 0 Status string `json:"status,omitempty"` // string Tags []string `json:"tags,omitempty"` // [] len >= 0 Target string `json:"target"` // string Timeout float32 `json:"timeout,omitempty"` // float32 Type string `json:"type"` // string }
CheckBundle defines a check bundle. See https://login.circonus.com/resources/api/calls/check_bundle for more information.
func NewCheckBundle ¶
func NewCheckBundle() *CheckBundle
NewCheckBundle returns new CheckBundle (with defaults, if applicable)
type CheckBundleConfig ¶
CheckBundleConfig contains the check type specific configuration settings as k/v pairs (see https://login.circonus.com/resources/api/calls/check_bundle for the specific settings available for each distinct check type)
type CheckBundleMetric ¶
type CheckBundleMetric struct { Name string `json:"name"` // string Result *string `json:"result,omitempty"` // string or null, NOTE not settable - return/information value only Status string `json:"status,omitempty"` // string Tags []string `json:"tags"` // [] len >= 0 Type string `json:"type"` // string Units *string `json:"units,omitempty"` // string or null }
CheckBundleMetric individual metric configuration
type CheckBundleMetrics ¶
type CheckBundleMetrics struct { CID string `json:"_cid,omitempty"` // string Metrics []CheckBundleMetric `json:"metrics"` // See check_bundle.go for CheckBundleMetric definition }
CheckBundleMetrics defines metrics for a specific check bundle. See https://login.circonus.com/resources/api/calls/check_bundle_metrics for more information.
type CheckDetails ¶
CheckDetails contains [undocumented] check type specific information
type Config ¶
type Config struct { // URL defines the API URL - default https://api.circonus.com/v2/ URL string // TokenKey defines the key to use when communicating with the API TokenKey string // TokenApp defines the app to use when communicating with the API TokenApp string TokenAccountID string // CACert deprecating, use TLSConfig instead CACert *x509.CertPool // TLSConfig defines a custom tls configuration to use when communicating with the API TLSConfig *tls.Config Log *log.Logger Debug bool }
Config options for Circonus API
type ContactGroup ¶
type ContactGroup struct { AggregationWindow uint `json:"aggregation_window,omitempty"` // uint AlertFormats ContactGroupAlertFormats `json:"alert_formats,omitempty"` // ContactGroupAlertFormats CID string `json:"_cid,omitempty"` // string Contacts ContactGroupContacts `json:"contacts,omitempty"` // ContactGroupContacts Escalations []*ContactGroupEscalation `json:"escalations,omitempty"` // [] len == 5, elements: ContactGroupEscalation or null LastModified uint `json:"_last_modified,omitempty"` // uint LastModifiedBy string `json:"_last_modified_by,omitempty"` // string Name string `json:"name,omitempty"` // string Reminders []uint `json:"reminders,omitempty"` // [] len == 5 Tags []string `json:"tags,omitempty"` // [] len >= 0 }
ContactGroup defines a contact group. See https://login.circonus.com/resources/api/calls/contact_group for more information.
func NewContactGroup ¶
func NewContactGroup() *ContactGroup
NewContactGroup returns a ContactGroup (with defaults, if applicable)
type ContactGroupAlertFormats ¶
type ContactGroupAlertFormats struct { LongMessage *string `json:"long_message"` // string or null LongSubject *string `json:"long_subject"` // string or null LongSummary *string `json:"long_summary"` // string or null ShortMessage *string `json:"short_message"` // string or null ShortSummary *string `json:"short_summary"` // string or null }
ContactGroupAlertFormats define alert formats
type ContactGroupContacts ¶
type ContactGroupContacts struct { External []ContactGroupContactsExternal `json:"external"` // [] len >= 0 Users []ContactGroupContactsUser `json:"users"` // [] len >= 0 }
ContactGroupContacts list of contacts
type ContactGroupContactsExternal ¶
type ContactGroupContactsExternal struct { Info string `json:"contact_info"` // string Method string `json:"method"` // string }
ContactGroupContactsExternal external contacts
type ContactGroupContactsUser ¶
type ContactGroupContactsUser struct { Info string `json:"_contact_info,omitempty"` // string Method string `json:"method"` // string UserCID string `json:"user"` // string }
ContactGroupContactsUser user contacts
type ContactGroupEscalation ¶
type ContactGroupEscalation struct { After uint `json:"after"` // uint ContactGroupCID string `json:"contact_group"` // string }
ContactGroupEscalation defines escalations for severity levels
type Dashboard ¶
type Dashboard struct { AccountDefault bool `json:"account_default"` Active bool `json:"_active,omitempty"` CID string `json:"_cid,omitempty"` Created uint `json:"_created,omitempty"` CreatedBy string `json:"_created_by,omitempty"` GridLayout DashboardGridLayout `json:"grid_layout"` LastModified uint `json:"_last_modified,omitempty"` Options DashboardOptions `json:"options"` Title string `json:"title"` UUID string `json:"_dashboard_uuid,omitempty"` Widgets []DashboardWidget `json:"widgets"` }
Dashboard defines a dashboard. See https://login.circonus.com/resources/api/calls/dashboard for more information.
func NewDashboard ¶
func NewDashboard() *Dashboard
NewDashboard returns a new Dashboard (with defaults, if applicable)
type DashboardAccessConfig ¶
type DashboardAccessConfig struct { BlackDash bool `json:"black_dash"` Enabled bool `json:"enabled"` Fullscreen bool `json:"fullscreen"` FullscreenHideTitle bool `json:"fullscreen_hide_title"` Nickname string `json:"nickname"` ScaleText bool `json:"scale_text"` TextSize uint `json:"text_size"` }
DashboardAccessConfig defines access config
type DashboardGridLayout ¶
DashboardGridLayout defines layout
type DashboardOptions ¶
type DashboardOptions struct { AccessConfigs []DashboardAccessConfig `json:"access_configs"` FullscreenHideTitle bool `json:"fullscreen_hide_title"` HideGrid bool `json:"hide_grid"` Linkages [][]string `json:"linkages"` ScaleText bool `json:"scale_text"` TextSize uint `json:"text_size"` }
DashboardOptions defines options
type DashboardWidget ¶
type DashboardWidget struct { Active bool `json:"active"` Height uint `json:"height"` Name string `json:"name"` Origin string `json:"origin"` Settings DashboardWidgetSettings `json:"settings"` Type string `json:"type"` WidgetID string `json:"widget_id"` Width uint `json:"width"` }
DashboardWidget defines widget
type DashboardWidgetSettings ¶
type DashboardWidgetSettings struct { AccountID string `json:"account_id,omitempty"` // alerts, clusters, gauges, graphs, lists, status Acknowledged string `json:"acknowledged,omitempty"` // alerts AgentStatusSettings *StatusWidgetAgentStatusSettings `json:"agent_status_settings,omitempty"` // status Algorithm string `json:"algorithm,omitempty"` // clusters Autoformat bool `json:"autoformat,omitempty"` // text BodyFormat string `json:"body_format,omitempty"` // text ChartType string `json:"chart_type,omitempty"` // charts CheckUUID string `json:"check_uuid,omitempty"` // gauges Cleared string `json:"cleared,omitempty"` // alerts ClusterID uint `json:"cluster_id,omitempty"` // clusters ClusterName string `json:"cluster_name,omitempty"` // clusters ContactGroups []uint `json:"contact_groups,omitempty"` // alerts ContentType string `json:"content_type,omitempty"` // status Datapoints []ChartTextWidgetDatapoint `json:"datapoints,omitempty"` // charts, text DateWindow string `json:"date_window,omitempty"` // graphs Definition *ChartWidgtDefinition `json:"definition,omitempty"` // charts Dependents string `json:"dependents,omitempty"` // alerts DisableAutoformat bool `json:"disable_autoformat,omitempty"` // gauges Display string `json:"display,omitempty"` // alerts Format string `json:"format,omitempty"` // forecasts Formula string `json:"formula,omitempty"` // gauges GraphUUID string `json:"graph_id,omitempty"` // graphs HideXAxis bool `json:"hide_xaxis,omitempty"` // graphs HideYAxis bool `json:"hide_yaxis,omitempty"` // graphs HostStatusSettings *StatusWidgetHostStatusSettings `json:"host_status_settings,omitempty"` // status KeyInline bool `json:"key_inline,omitempty"` // graphs KeyLoc string `json:"key_loc,omitempty"` // graphs KeySize uint `json:"key_size,omitempty"` // graphs KeyWrap bool `json:"key_wrap,omitempty"` // graphs Label string `json:"label,omitempty"` // graphs Layout string `json:"layout,omitempty"` // clusters Limit uint `json:"limit,omitempty"` // lists Maintenance string `json:"maintenance,omitempty"` // alerts Markup string `json:"markup,omitempty"` // html MetricDisplayName string `json:"metric_display_name,omitempty"` // gauges MetricName string `json:"metric_name,omitempty"` // gauges MinAge string `json:"min_age,omitempty"` // alerts OffHours []uint `json:"off_hours,omitempty"` // alerts OverlaySetID string `json:"overlay_set_id,omitempty"` // graphs Period uint `json:"period,omitempty"` // gauges, text, graphs RangeHigh int `json:"range_high,omitempty"` // gauges RangeLow int `json:"range_low,omitempty"` // gauges Realtime bool `json:"realtime,omitempty"` // graphs ResourceLimit string `json:"resource_limit,omitempty"` // forecasts ResourceUsage string `json:"resource_usage,omitempty"` // forecasts Search string `json:"search,omitempty"` // alerts, lists Severity string `json:"severity,omitempty"` // alerts ShowFlags bool `json:"show_flags,omitempty"` // graphs Size string `json:"size,omitempty"` // clusters TagFilterSet []string `json:"tag_filter_set,omitempty"` // alerts Threshold float32 `json:"threshold,omitempty"` // clusters Thresholds *ForecastGaugeWidgetThresholds `json:"thresholds,omitempty"` // forecasts, gauges TimeWindow string `json:"time_window,omitempty"` // alerts Title string `json:"title,omitempty"` // alerts, charts, forecasts, gauges, html TitleFormat string `json:"title_format,omitempty"` // text Trend string `json:"trend,omitempty"` // forecasts Type string `json:"type,omitempty"` // gauges, lists UseDefault bool `json:"use_default,omitempty"` // text ValueType string `json:"value_type,omitempty"` // gauges, text WeekDays []string `json:"weekdays,omitempty"` // alerts }
DashboardWidgetSettings defines settings specific to widget Note: optional attributes which are structs need to be pointers so they will be omitted
type ForecastGaugeWidgetThresholds ¶
type ForecastGaugeWidgetThresholds struct { Colors []string `json:"colors,omitempty"` // forecasts, gauges Flip bool `json:"flip,omitempty"` // gauges Values []string `json:"values,omitempty"` // forecasts, gauges }
ForecastGaugeWidgetThresholds defines forecast widget thresholds
type Graph ¶
type Graph struct { AccessKeys []GraphAccessKey `json:"access_keys,omitempty"` // [] len >= 0 CID string `json:"_cid,omitempty"` // string Composites []GraphComposite `json:"composites,omitempty"` // [] len >= 0 Datapoints []GraphDatapoint `json:"datapoints,omitempt"` // [] len >= 0 Description string `json:"description,omitempty"` // string Guides []GraphGuide `json:"guides,omitempty"` // [] len >= 0 LineStyle *string `json:"line_style"` // string or null LogLeftY *int `json:"logarithmic_left_y,string,omitempty"` // int encoded as string or null BUG doc: number (not string) LogRightY *int `json:"logarithmic_right_y,string,omitempty"` // int encoded as string or null BUG doc: number (not string) MaxLeftY *float64 `json:"max_left_y,string,omitempty"` // float64 encoded as string or null BUG doc: number (not string) MaxRightY *float64 `json:"max_right_y,string,omitempty"` // float64 encoded as string or null BUG doc: number (not string) MetricClusters []GraphMetricCluster `json:"metric_clusters,omitempty"` // [] len >= 0 MinLeftY *float64 `json:"min_left_y,string,omitempty"` // float64 encoded as string or null BUG doc: number (not string) MinRightY *float64 `json:"min_right_y,string,omitempty"` // float64 encoded as string or null BUG doc: number (not string) Notes *string `json:"notes,omitempty"` // string or null OverlaySets *map[string]GraphOverlaySet `json:"overlay_sets,omitempty"` // GroupOverLaySets or null Style *string `json:"style"` // string or null Tags []string `json:"tags,omitempty"` // [] len >= 0 Title string `json:"title,omitempty"` // string }
Graph defines a graph. See https://login.circonus.com/resources/api/calls/graph for more information.
type GraphAccessKey ¶
type GraphAccessKey struct { Active bool `json:"active,omitempty"` // boolean Height uint `json:"height,omitempty"` // uint Key string `json:"key,omitempty"` // string Legend bool `json:"legend,omitempty"` // boolean LockDate bool `json:"lock_date,omitempty"` // boolean LockMode string `json:"lock_mode,omitempty"` // string LockRangeEnd uint `json:"lock_range_end,omitempty"` // uint LockRangeStart uint `json:"lock_range_start,omitempty"` // uint LockShowTimes bool `json:"lock_show_times,omitempty"` // boolean LockZoom string `json:"lock_zoom,omitempty"` // string Nickname string `json:"nickname,omitempty"` // string Title bool `json:"title,omitempty"` // boolean Width uint `json:"width,omitempty"` // uint XLabels bool `json:"x_labels,omitempty"` // boolean YLabels bool `json:"y_labels,omitempty"` // boolean }
GraphAccessKey defines an access key for a graph
type GraphComposite ¶
type GraphComposite struct { Axis string `json:"axis"` // string Color string `json:"color"` // string DataFormula *string `json:"data_formula"` // string or null Hidden bool `json:"hidden"` // boolean LegendFormula *string `json:"legend_formula"` // string or null Name string `json:"name"` // string Stack *uint `json:"stack"` // uint or null }
GraphComposite defines a composite
type GraphDatapoint ¶
type GraphDatapoint struct { Alpha *float64 `json:"alpha,string,omitempty"` // float64 Axis string `json:"axis,omitempty"` // string CAQL *string `json:"caql,omitempty"` // string or null CheckID uint `json:"check_id,omitempty"` // uint Color *string `json:"color,omitempty"` // string DataFormula *string `json:"data_formula"` // string or null Derive interface{} `json:"derive,omitempty"` // BUG doc: string, api: string or boolean(for caql statements) Hidden bool `json:"hidden"` // boolean LegendFormula *string `json:"legend_formula"` // string or null MetricName string `json:"metric_name,omitempty"` // string MetricType string `json:"metric_type,omitempty"` // string Name string `json:"name"` // string Search *string `json:"search"` // string or null Stack *uint `json:"stack"` // uint or null }
GraphDatapoint defines a datapoint
type GraphGuide ¶
type GraphGuide struct { Color string `json:"color"` // string DataFormula *string `json:"data_formula"` // string or null Hidden bool `json:"hidden"` // boolean LegendFormula *string `json:"legend_formula"` // string or null Name string `json:"name"` // string }
GraphGuide defines a guide
type GraphMetricCluster ¶
type GraphMetricCluster struct { AggregateFunc string `json:"aggregate_function,omitempty"` // string Axis string `json:"axis,omitempty"` // string Color *string `json:"color,omitempty"` // string DataFormula *string `json:"data_formula"` // string or null Hidden bool `json:"hidden"` // boolean LegendFormula *string `json:"legend_formula"` // string or null MetricCluster string `json:"metric_cluster,omitempty"` // string Name string `json:"name,omitempty"` // string Stack *uint `json:"stack"` // uint or null }
GraphMetricCluster defines a metric cluster
type GraphOverlay ¶
type GraphOverlay struct { DataOpts OverlayDataOptions `json:"data_opts,omitempty"` // OverlayDataOptions ID string `json:"id,omitempty"` // string Title string `json:"title,omitempty"` // string UISpecs OverlayUISpecs `json:"ui_specs,omitempty"` // OverlayUISpecs }
GraphOverlay defines a single overlay in an overlay set
type GraphOverlaySet ¶
type GraphOverlaySet struct { Overlays map[string]GraphOverlay `json:"overlays"` Title string `json:"title"` }
GraphOverlaySet defines an overlay set for a graph
type Maintenance ¶
type Maintenance struct { CID string `json:"_cid,omitempty"` // string Item string `json:"item,omitempty"` // string Notes string `json:"notes,omitempty"` // string Severities interface{} `json:"severities,omitempty"` // []string NOTE can be set with CSV string or []string Start uint `json:"start,omitempty"` // uint Stop uint `json:"stop,omitempty"` // uint Tags []string `json:"tags,omitempty"` // [] len >= 0 Type string `json:"type,omitempty"` // string }
Maintenance defines a maintenance window. See https://login.circonus.com/resources/api/calls/maintenance for more information.
func NewMaintenanceWindow ¶
func NewMaintenanceWindow() *Maintenance
NewMaintenanceWindow returns a new Maintenance window (with defaults, if applicable)
type Metric ¶
type Metric struct { Active bool `json:"_active,omitempty"` // boolean CheckActive bool `json:"_check_active,omitempty"` // boolean CheckBundleCID string `json:"_check_bundle,omitempty"` // string CheckCID string `json:"_check,omitempty"` // string CheckTags []string `json:"_check_tags,omitempty"` // [] len >= 0 CheckUUID string `json:"_check_uuid,omitempty"` // string CID string `json:"_cid,omitempty"` // string Histogram string `json:"_histogram,omitempty"` // string Link *string `json:"link,omitempty"` // string or null MetricName string `json:"_metric_name,omitempty"` // string MetricType string `json:"_metric_type,omitempty"` // string Notes *string `json:"notes,omitempty"` // string or null Tags []string `json:"tags,omitempty"` // [] len >= 0 Units *string `json:"units,omitempty"` // string or null }
Metric defines a metric. See https://login.circonus.com/resources/api/calls/metric for more information.
type MetricCluster ¶
type MetricCluster struct { CID string `json:"_cid,omitempty"` // string Description string `json:"description"` // string MatchingMetrics []string `json:"_matching_metrics,omitempty"` // [] len >= 1 (result info only, if query has extras - cannot be set) MatchingUUIDMetrics map[string][]string `json:"_matching_uuid_metrics,omitempty"` // [] len >= 1 (result info only, if query has extras - cannot be set) Name string `json:"name"` // string Queries []MetricQuery `json:"queries"` // [] len >= 1 Tags []string `json:"tags"` // [] len >= 0 }
MetricCluster defines a metric cluster. See https://login.circonus.com/resources/api/calls/metric_cluster for more information.
func NewMetricCluster ¶
func NewMetricCluster() *MetricCluster
NewMetricCluster returns a new MetricCluster (with defaults, if applicable)
type MetricQuery ¶
MetricQuery object
type OutlierReport ¶
type OutlierReport struct { CID string `json:"_cid,omitempty"` // string Config string `json:"config,omitempty"` // string Created uint `json:"_created,omitempty"` // uint CreatedBy string `json:"_created_by,omitempty"` // string LastModified uint `json:"_last_modified,omitempty"` // uint LastModifiedBy string `json:"_last_modified_by,omitempty"` // string MetricClusterCID string `json:"metric_cluster,omitempty"` // st ring Tags []string `json:"tags,omitempty"` // [] len >= 0 Title string `json:"title,omitempty"` // string }
OutlierReport defines a outlier report. See https://login.circonus.com/resources/api/calls/report for more information.
func NewOutlierReport ¶
func NewOutlierReport() *OutlierReport
NewOutlierReport returns a new OutlierReport (with defaults, if applicable)
type OverlayDataOptions ¶
type OverlayDataOptions struct { Alerts string `json:"alerts,omitempty"` // int encoded as string BUG doc: numeric, api: string ArrayOutput string `json:"array_output,omitempty"` // int encoded as string BUG doc: numeric, api: string BasePeriod string `json:"base_period,omitempty"` // int encoded as string BUG doc: numeric, api: string Delay string `json:"delay,omitempty"` // int encoded as string BUG doc: numeric, api: string Extension string `json:"extension,omitempty"` // string GraphTitle string `json:"graph_title,omitempty"` // string GraphUUID string `json:"graph_id,omitempty"` // string InPercent string `json:"in_percent,omitempty"` // boolean encoded as string BUG doc: boolean, api: string Inverse string `json:"inverse,omitempty"` // int encoded as string BUG doc: numeric, api: string Method string `json:"method,omitempty"` // string Model string `json:"model,omitempty"` // string ModelEnd string `json:"model_end,omitempty"` // string ModelPeriod string `json:"model_period,omitempty"` // string ModelRelative string `json:"model_relative,omitempty"` // int encoded as string BUG doc: numeric, api: string Out string `json:"out,omitempty"` // string Prequel string `json:"prequel,omitempty"` // int Presets string `json:"presets,omitempty"` // string Quantiles string `json:"quantiles,omitempty"` // string SeasonLength string `json:"season_length,omitempty"` // int encoded as string BUG doc: numeric, api: string Sensitivity string `json:"sensitivity,omitempty"` // int encoded as string BUG doc: numeric, api: string SingleValue string `json:"single_value,omitempty"` // int encoded as string BUG doc: numeric, api: string TargetPeriod string `json:"target_period,omitempty"` // string TimeOffset string `json:"time_offset,omitempty"` // string TimeShift string `json:"time_shift,omitempty"` // int encoded as string BUG doc: numeric, api: string Transform string `json:"transform,omitempty"` // string Version string `json:"version,omitempty"` // int encoded as string BUG doc: numeric, api: string Window string `json:"window,omitempty"` // int encoded as string BUG doc: numeric, api: string XShift string `json:"x_shift,omitempty"` // string }
OverlayDataOptions defines overlay options for data. Note, each overlay type requires a _subset_ of the options. See Graph API documentation (URL above) for details.
type OverlayUISpecs ¶
type OverlayUISpecs struct { Decouple bool `json:"decouple,omitempty"` // boolean ID string `json:"id,omitempty"` // string Label string `json:"label,omitempty"` // string Type string `json:"type,omitempty"` // string Z string `json:"z,omitempty"` // int encoded as string BUG doc: numeric, api: string }
OverlayUISpecs defines UI specs for overlay
type ProvisionBroker ¶
type ProvisionBroker struct { Cert string `json:"_cert,omitempty"` // string CID string `json:"_cid,omitempty"` // string CSR string `json:"_csr,omitempty"` // string ExternalHost string `json:"external_host,omitempty"` // string ExternalPort string `json:"external_port,omitempty"` // string IPAddress string `json:"ipaddress,omitempty"` // string Latitude string `json:"latitude,omitempty"` // string Longitude string `json:"longitude,omitempty"` // string Name string `json:"noit_name,omitempty"` // string Port string `json:"port,omitempty"` // string PreferReverseConnection bool `json:"prefer_reverse_connection,omitempty"` // boolean Rebuild bool `json:"rebuild,omitempty"` // boolean Stratcons []BrokerStratcon `json:"_stratcons,omitempty"` // [] len >= 1 Tags []string `json:"tags,omitempty"` // [] len >= 0 }
ProvisionBroker defines a provision broker [request]. See https://login.circonus.com/resources/api/calls/provision_broker for more details.
func NewProvisionBroker ¶
func NewProvisionBroker() *ProvisionBroker
NewProvisionBroker returns a new ProvisionBroker (with defaults, if applicable)
type RuleSet ¶
type RuleSet struct { CheckCID string `json:"check"` // string CID string `json:"_cid,omitempty"` // string ContactGroups map[uint8][]string `json:"contact_groups"` // [] len 5 Derive *string `json:"derive,omitempty"` // string or null Link *string `json:"link"` // string or null MetricName string `json:"metric_name"` // string MetricTags []string `json:"metric_tags"` // [] len >= 0 MetricType string `json:"metric_type"` // string Notes *string `json:"notes"` // string or null Parent *string `json:"parent,omitempty"` // string or null Rules []RuleSetRule `json:"rules"` // [] len >= 1 Tags []string `json:"tags"` // [] len >= 0 }
RuleSet defines a ruleset. See https://login.circonus.com/resources/api/calls/rule_set for more information.
func NewRuleSet ¶
func NewRuleSet() *RuleSet
NewRuleSet returns a new RuleSet (with defaults if applicable)
type RuleSetGroup ¶
type RuleSetGroup struct { CID string `json:"_cid,omitempty"` // string ContactGroups map[uint8][]string `json:"contact_groups"` // [] len == 5 Formulas []RuleSetGroupFormula `json:"formulas"` // [] len >= 0 Name string `json:"name"` // string RuleSetConditions []RuleSetGroupCondition `json:"rule_set_conditions"` // [] len >= 1 Tags []string `json:"tags"` // [] len >= 0 }
RuleSetGroup defines a ruleset group. See https://login.circonus.com/resources/api/calls/rule_set_group for more information.
func NewRuleSetGroup ¶
func NewRuleSetGroup() *RuleSetGroup
NewRuleSetGroup returns a new RuleSetGroup (with defaults, if applicable)
type RuleSetGroupCondition ¶
type RuleSetGroupCondition struct { MatchingSeverities []string `json:"matching_serverities"` // [] len >= 1 RuleSetCID string `json:"rule_set"` // string }
RuleSetGroupCondition defines conditions for raising alerts
type RuleSetGroupFormula ¶
type RuleSetGroupFormula struct { Expression interface{} `json:"expression"` // string or uint BUG doc: string, api: string or numeric RaiseSeverity uint `json:"raise_severity"` // uint Wait uint `json:"wait"` // uint }
RuleSetGroupFormula defines a formula for raising alerts
type RuleSetRule ¶
type RuleSetRule struct { Criteria string `json:"criteria"` // string Severity uint `json:"severity"` // uint Value interface{} `json:"value"` // BUG doc: string, api: actual type returned switches based on Criteria Wait uint `json:"wait"` // uint WindowingDuration uint `json:"windowing_duration,omitempty"` // uint WindowingFunction *string `json:"windowing_function,omitempty"` // string or null }
RuleSetRule defines a ruleset rule
type SearchFilterType ¶
SearchFilterType search filter (see: https://login.circonus.com/resources/api#filtering)
type SearchQueryType ¶
type SearchQueryType string
SearchQueryType search query (see: https://login.circonus.com/resources/api#searching)
type StatusWidgetAgentStatusSettings ¶
type StatusWidgetAgentStatusSettings struct { Search string `json:"search,omitempty"` ShowAgentTypes string `json:"show_agent_types,omitempty"` ShowContact bool `json:"show_contact,omitempty"` ShowFeeds bool `json:"show_feeds,omitempty"` ShowSetup bool `json:"show_setup,omitempty"` ShowSkew bool `json:"show_skew,omitempty"` ShowUpdates bool `json:"show_updates,omitempty"` }
StatusWidgetAgentStatusSettings defines agent status settings
type StatusWidgetHostStatusSettings ¶
type StatusWidgetHostStatusSettings struct { LayoutStyle string `json:"layout_style,omitempty"` Search string `json:"search,omitempty"` SortBy string `json:"sort_by,omitempty"` TagFilterSet []string `json:"tag_filter_set,omitempty"` }
StatusWidgetHostStatusSettings defines host status settings
type TokenAccountIDType ¶
type TokenAccountIDType string
TokenAccountIDType - Circonus API Token account id
type User ¶
type User struct { CID string `json:"_cid,omitempty"` // string ContactInfo UserContactInfo `json:"contact_info,omitempty"` // UserContactInfo Email string `json:"email"` // string Firstname string `json:"firstname"` // string Lastname string `json:"lastname"` // string }
User defines a user. See https://login.circonus.com/resources/api/calls/user for more information.
type UserContactInfo ¶
type UserContactInfo struct { SMS string `json:"sms,omitempty"` // string XMPP string `json:"xmpp,omitempty"` // string }
UserContactInfo defines known contact details
type Worksheet ¶
type Worksheet struct { CID string `json:"_cid,omitempty"` // string Description *string `json:"description"` // string or null Favorite bool `json:"favorite"` // boolean Graphs []WorksheetGraph `json:"graphs"` // [] len >= 0 Notes *string `json:"notes"` // string or null SmartQueries []WorksheetSmartQuery `json:"smart_queries,omitempty"` // [] len >= 0 Tags []string `json:"tags"` // [] len >= 0 Title string `json:"title"` // string }
Worksheet defines a worksheet. See https://login.circonus.com/resources/api/calls/worksheet for more information.
func NewWorksheet ¶
func NewWorksheet() *Worksheet
NewWorksheet returns a new Worksheet (with defaults, if applicable)
type WorksheetGraph ¶
type WorksheetGraph struct {
GraphCID string `json:"graph"` // string
}
WorksheetGraph defines a worksheet cid to be include in the worksheet
type WorksheetSmartQuery ¶
type WorksheetSmartQuery struct { Name string `json:"name"` Order []string `json:"order"` Query string `json:"query"` }
WorksheetSmartQuery defines a query to include multiple worksheets