apiclient

package module
v0.7.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2023 License: BSD-3-Clause Imports: 24 Imported by: 11

README

Circonus API Client Go package

Full documentation (for using this package) is available at godoc.org. Links in the lists below go directly to the generic Circonus API documentation for the endpoint.

NOTE: This package is a replacement for github.com/circonus-labs/circonus-gometrics/api (which should now be considered DEPRECATED)

Examples

There are rudimentary examples in the examples directory for basic Fetch* calls.

Configuration

  • Config.TokenKey required Circonus API Token key
  • Config.TokenApp Circonus API Token application name (default: circonus-goapiclient)
  • Config.URL the Circonus API URL (default: https://api.circonus.com/v2)
  • Config.TLSConfig a *tls.Config for contacting the API URL when it is not using a public SSL certificate (default: none)
  • Config.Log a *log.Logger instance where log messages should be sent (default: discard log messages)
  • Config.Debug turn on debugging messages (default: false)

Minimal example:

package main

import (
    "fmt"

    api "github.com/circonus-labs/go-apiclient"
)

func main() {
    client, err := api.New(&api.Config{TokenKey: "..."})
    if err != nil {
        panic(err)
    }
    user, err := client.FetchUser(nil)    
    if err != nil {
        panic(err)
    }
    fmt.Printf("%#v\n", user)
}

Straight [raw] API access

  • Get
  • Post (for creates)
  • Put (for updates)
  • Delete

Helpers for currently supported API endpoints

Note, these interfaces are still being actively developed. For example, many of the New* methods only return an empty struct; sensible defaults will be added going forward. Other, common helper methods for the various endpoints may be added as use cases emerge. The organization of the API may change if common use contexts would benefit significantly.

  • Account
    • FetchAccount
    • FetchAccounts
    • UpdateAccount
    • SearchAccounts
  • Acknowledgement
    • NewAcknowledgement
    • FetchAcknowledgement
    • FetchAcknowledgements
    • UpdateAcknowledgement
    • CreateAcknowledgement
    • DeleteAcknowledgement
    • DeleteAcknowledgementByCID
    • SearchAcknowledgements
  • Alert
    • FetchAlert
    • FetchAlerts
    • SearchAlerts
  • Annotation
    • NewAnnotation
    • FetchAnnotation
    • FetchAnnotations
    • UpdateAnnotation
    • CreateAnnotation
    • DeleteAnnotation
    • DeleteAnnotationByCID
    • SearchAnnotations
  • Broker
    • FetchBroker
    • FetchBrokers
    • SearchBrokers
  • Check Bundle
    • NewCheckBundle
    • FetchCheckBundle
    • FetchCheckBundles
    • UpdateCheckBundle
    • CreateCheckBundle
    • DeleteCheckBundle
    • DeleteCheckBundleByCID
    • SearchCheckBundles
  • Check Bundle Metrics
    • FetchCheckBundleMetrics
    • UpdateCheckBundleMetrics
  • Check
    • FetchCheck
    • FetchChecks
    • SearchChecks
  • Contact Group
    • NewContactGroup
    • FetchContactGroup
    • FetchContactGroups
    • UpdateContactGroup
    • CreateContactGroup
    • DeleteContactGroup
    • DeleteContactGroupByCID
    • SearchContactGroups
  • Dashboard -- note, this is a work in progress, the methods/types may still change
    • NewDashboard
    • FetchDashboard
    • FetchDashboards
    • UpdateDashboard
    • CreateDashboard
    • DeleteDashboard
    • DeleteDashboardByCID
    • SearchDashboards
  • Graph
    • NewGraph
    • FetchGraph
    • FetchGraphs
    • UpdateGraph
    • CreateGraph
    • DeleteGraph
    • DeleteGraphByCID
    • SearchGraphs
  • Metric Cluster
    • NewMetricCluster
    • FetchMetricCluster
    • FetchMetricClusters
    • UpdateMetricCluster
    • CreateMetricCluster
    • DeleteMetricCluster
    • DeleteMetricClusterByCID
    • SearchMetricClusters
  • Metric
    • FetchMetric
    • FetchMetrics
    • UpdateMetric
    • SearchMetrics
  • Maintenance window
    • NewMaintenanceWindow
    • FetchMaintenanceWindow
    • FetchMaintenanceWindows
    • UpdateMaintenanceWindow
    • CreateMaintenanceWindow
    • DeleteMaintenanceWindow
    • DeleteMaintenanceWindowByCID
    • SearchMaintenanceWindows
  • Outlier Report
    • NewOutlierReport
    • FetchOutlierReport
    • FetchOutlierReports
    • UpdateOutlierReport
    • CreateOutlierReport
    • DeleteOutlierReport
    • DeleteOutlierReportByCID
    • SearchOutlierReports
  • Provision Broker
    • NewProvisionBroker
    • FetchProvisionBroker
    • UpdateProvisionBroker
    • CreateProvisionBroker
  • Rule Set
    • NewRuleset
    • FetchRuleset
    • FetchRulesets
    • UpdateRuleset
    • CreateRuleset
    • DeleteRuleset
    • DeleteRulesetByCID
    • SearchRulesets
  • Rule Set Group
    • NewRulesetGroup
    • FetchRulesetGroup
    • FetchRulesetGroups
    • UpdateRulesetGroup
    • CreateRulesetGroup
    • DeleteRulesetGroup
    • DeleteRulesetGroupByCID
    • SearchRulesetGroups
  • User
    • FetchUser
    • FetchUsers
    • UpdateUser
    • SearchUsers
  • Worksheet
    • NewWorksheet
    • FetchWorksheet
    • FetchWorksheets
    • UpdateWorksheet
    • CreateWorksheet
    • DeleteWorksheet
    • DeleteWorksheetByCID
    • SearchWorksheets

Unless otherwise noted, the source files are distributed under the BSD-style license found in the LICENSE file.

Documentation

Overview

Package apiclient 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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Log Logger

	Debug bool
	// contains filtered or unexported fields
}

API Circonus API

func New

func New(ac *Config) (*API, error)

New returns a new Circonus API

func NewAPI

func NewAPI(ac *Config) (*API, error)

NewAPI returns a new Circonus API (alias for New)

func NewClient

func NewClient(ac *Config) (*API, error)

NewClient returns a new Circonus API (alias for New)

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

func (a *API) CreateDashboard(cfg *Dashboard) (*Dashboard, error)

CreateDashboard creates a new dashboard.

func (*API) CreateGraph

func (a *API) CreateGraph(cfg *Graph) (*Graph, error)

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

func (a *API) CreateRuleSet(cfg *RuleSet) (*RuleSet, error)

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

func (a *API) CreateWorksheet(cfg *Worksheet) (*Worksheet, error)

CreateWorksheet creates a new worksheet.

func (*API) Delete

func (a *API) Delete(reqPath string) ([]byte, error)

Delete API request

func (*API) DeleteAnnotation

func (a *API) DeleteAnnotation(cfg *Annotation) (bool, error)

DeleteAnnotation deletes passed annotation.

func (*API) DeleteAnnotationByCID

func (a *API) DeleteAnnotationByCID(cid CIDType) (bool, error)

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

func (a *API) DeleteCheckBundleByCID(cid CIDType) (bool, error)

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

func (a *API) DeleteContactGroupByCID(cid CIDType) (bool, error)

DeleteContactGroupByCID deletes contact group with passed cid.

func (*API) DeleteDashboard

func (a *API) DeleteDashboard(cfg *Dashboard) (bool, error)

DeleteDashboard deletes passed dashboard.

func (*API) DeleteDashboardByCID

func (a *API) DeleteDashboardByCID(cid CIDType) (bool, error)

DeleteDashboardByCID deletes dashboard with passed cid.

func (*API) DeleteGraph

func (a *API) DeleteGraph(cfg *Graph) (bool, error)

DeleteGraph deletes passed graph.

func (*API) DeleteGraphByCID

func (a *API) DeleteGraphByCID(cid CIDType) (bool, error)

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

func (a *API) DeleteMaintenanceWindowByCID(cid CIDType) (bool, error)

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

func (a *API) DeleteMetricClusterByCID(cid CIDType) (bool, error)

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

func (a *API) DeleteOutlierReportByCID(cid CIDType) (bool, error)

DeleteOutlierReportByCID deletes outlier report with passed cid.

func (*API) DeleteRuleSet

func (a *API) DeleteRuleSet(cfg *RuleSet) (bool, error)

DeleteRuleSet deletes passed rule set.

func (*API) DeleteRuleSetByCID

func (a *API) DeleteRuleSetByCID(cid CIDType) (bool, error)

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

func (a *API) DeleteRuleSetGroupByCID(cid CIDType) (bool, error)

DeleteRuleSetGroupByCID deletes rule set group with passed cid.

func (*API) DeleteWorksheet

func (a *API) DeleteWorksheet(cfg *Worksheet) (bool, error)

DeleteWorksheet deletes passed worksheet.

func (*API) DeleteWorksheetByCID

func (a *API) DeleteWorksheetByCID(cid CIDType) (bool, error)

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

func (a *API) FetchAccount(cid CIDType) (*Account, error)

FetchAccount retrieves account with passed cid. Pass nil for '/account/current'.

func (*API) FetchAccounts

func (a *API) FetchAccounts() (*[]Account, error)

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

func (a *API) FetchAlert(cid CIDType) (*Alert, error)

FetchAlert retrieves alert with passed cid.

func (*API) FetchAlerts

func (a *API) FetchAlerts() (*[]Alert, error)

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

func (a *API) FetchBroker(cid CIDType) (*Broker, error)

FetchBroker retrieves broker with passed cid.

func (*API) FetchBrokers

func (a *API) FetchBrokers() (*[]Broker, error)

FetchBrokers returns all brokers available to the API Token.

func (*API) FetchCheck

func (a *API) FetchCheck(cid CIDType) (*Check, error)

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

func (a *API) FetchChecks() (*[]Check, error)

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

func (a *API) FetchDashboard(cid CIDType) (*Dashboard, error)

FetchDashboard retrieves dashboard with passed cid.

func (*API) FetchDashboards

func (a *API) FetchDashboards() (*[]Dashboard, error)

FetchDashboards retrieves all dashboards available to the API Token.

func (*API) FetchGraph

func (a *API) FetchGraph(cid CIDType) (*Graph, error)

FetchGraph retrieves graph with passed cid.

func (*API) FetchGraphs

func (a *API) FetchGraphs() (*[]Graph, error)

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

func (a *API) FetchMetric(cid CIDType) (*Metric, error)

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

func (a *API) FetchMetrics() (*[]Metric, error)

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

func (a *API) FetchRuleSet(cid CIDType) (*RuleSet, error)

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

func (a *API) FetchRuleSets() (*[]RuleSet, error)

FetchRuleSets retrieves all rule sets available to API Token.

func (*API) FetchUser

func (a *API) FetchUser(cid CIDType) (*User, error)

FetchUser retrieves user with passed cid. Pass nil for '/user/current'.

func (*API) FetchUsers

func (a *API) FetchUsers() (*[]User, error)

FetchUsers retrieves all users available to API Token.

func (*API) FetchWorksheet

func (a *API) FetchWorksheet(cid CIDType) (*Worksheet, error)

FetchWorksheet retrieves worksheet with passed cid.

func (*API) FetchWorksheets

func (a *API) FetchWorksheets() (*[]Worksheet, error)

FetchWorksheets retrieves all worksheets available to API Token.

func (*API) Get

func (a *API) Get(reqPath string) ([]byte, error)

Get API request

func (*API) Post

func (a *API) Post(reqPath string, data []byte) ([]byte, error)

Post API request

func (*API) Put

func (a *API) Put(reqPath string, data []byte) ([]byte, error)

Put API request

func (*API) SearchAccounts

func (a *API) SearchAccounts(filterCriteria *SearchFilterType) (*[]Account, error)

SearchAccounts returns accounts matching a filter (search queries are not supported 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 *SearchFilterType) (*[]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 supported 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

func (a *API) UpdateAccount(cfg *Account) (*Account, error)

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

func (a *API) UpdateDashboard(cfg *Dashboard) (*Dashboard, error)

UpdateDashboard updates passed dashboard.

func (*API) UpdateGraph

func (a *API) UpdateGraph(cfg *Graph) (*Graph, error)

UpdateGraph updates passed graph.

func (*API) UpdateMaintenanceWindow

func (a *API) UpdateMaintenanceWindow(cfg *Maintenance) (*Maintenance, error)

UpdateMaintenanceWindow updates passed maintenance [window].

func (*API) UpdateMetric

func (a *API) UpdateMetric(cfg *Metric) (*Metric, error)

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

func (a *API) UpdateRuleSet(cfg *RuleSet) (*RuleSet, error)

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

func (a *API) UpdateUser(cfg *User) (*User, error)

UpdateUser updates passed user.

func (*API) UpdateWorksheet

func (a *API) UpdateWorksheet(cfg *Worksheet) (*Worksheet, error)

UpdateWorksheet updates passed worksheet.

type Account

type Account struct {
	CID                  string          `json:"_cid,omitempty"` // string
	AccountUUID          string          `json:"_account_uuid,omitempty"`
	Country              string          `json:"country_code,omitempty"`           // string
	Name                 string          `json:"name,omitempty"`                   // string
	OwnerCID             string          `json:"_owner,omitempty"`                 // string
	Timezone             string          `json:"timezone,omitempty"`               // string
	UIBaseURL            string          `json:"_ui_base_url,omitempty"`           // string
	PrivateC3DataURL     string          `json:"_c3_data_url,omitempty"`           // string
	C3DataURL            string          `json:"c3_data_url,omitempty"`            // string
	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
	City                 *string         `json:"city,omitempty"`                   // string or null
	DefaultDashboardUUID *string         `json:"default_dashboard_uuid,omitempty"` // string or null
	DefaultDashboardType *string         `json:"default_dashboard_type,omitempty"` // string or null
	Description          *string         `json:"description,omitempty"`            // string or null
	StateProv            *string         `json:"state_prov,omitempty"`             // string or null
	ContactGroups        []string        `json:"_contact_groups,omitempty"`        // [] len >= 0
	Invites              []AccountInvite `json:"invites,omitempty"`                // [] len >= 0
	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 {
	Type  string `json:"_type,omitempty"`  // string
	Limit uint   `json:"_limit,omitempty"` // uint >=0
	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 {
	AcknowledgedUntil interface{} `json:"acknowledged_until,omitempty"` // NOTE received as uint; can be set using string or uint
	AlertCID          string      `json:"alert,omitempty"`              // string
	CID               string      `json:"_cid,omitempty"`               // string
	LastModifiedBy    string      `json:"_last_modified_by,omitempty"`  // string
	Notes             string      `json:"notes,omitempty"`              // string
	AcknowledgedBy    string      `json:"_acknowledged_by,omitempty"`   // string
	AcknowledgedOn    uint        `json:"_acknowledged_on,omitempty"`   // uint
	LastModified      uint        `json:"_last_modified,omitempty"`     // uint
	Active            bool        `json:"_active,omitempty"`            // bool
}

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 {
	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
	Value              string   `json:"_value,omitempty"`           // string
	MetricName         string   `json:"_metric_name,omitempty"`     // string
	RuleSetCID         string   `json:"_rule_set,omitempty"`        // string
	AcknowledgementCID *string  `json:"_acknowledgement,omitempty"` // string or null
	ClearedValue       *string  `json:"_cleared_value,omitempty"`   // string or null
	MetricLinkURL      *string  `json:"_metric_link,omitempty"`     // string or null
	MetricNotes        *string  `json:"_metric_notes,omitempty"`    // string or null
	ClearedOn          *uint    `json:"_cleared_on,omitempty"`      // uint or null
	Maintenance        []string `json:"_maintenance,omitempty"`     // [] len >= 0
	Tags               []string `json:"_tags,omitempty"`            // [] len >= 0
	OccurredOn         uint     `json:"_occurred_on,omitempty"`     // uint
	Severity           uint     `json:"_severity,omitempty"`        // uint
}

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
	Description    string   `json:"description"`                 // string
	LastModifiedBy string   `json:"_last_modified_by,omitempty"` // string
	Title          string   `json:"title"`                       // string
	RelatedMetrics []string `json:"rel_metrics"`                 // [] len >= 0
	LastModified   uint     `json:"_last_modified,omitempty"`    // uint
	Created        uint     `json:"_created,omitempty"`          // uint
	Start          uint     `json:"start"`                       // uint
	Stop           uint     `json:"stop"`                        // uint
}

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
	Name      string         `json:"_name"`      // string
	Type      string         `json:"_type"`      // string
	Latitude  *string        `json:"_latitude"`  // string or null
	Longitude *string        `json:"_longitude"` // string or null
	Tags      []string       `json:"_tags"`      // [] len >= 0
	Details   []BrokerDetail `json:"_details"`   // [] len >= 1
}

Broker defines a broker. See https://login.circonus.com/resources/api/calls/broker for more information.

type BrokerDetail

type BrokerDetail struct {
	CN           string   `json:"cn"`                       // string
	Status       string   `json:"status"`                   // string
	ClusterIP    *string  `json:"cluster_ip"`               // string or null
	ExternalHost *string  `json:"external_host"`            // string or null
	IP           *string  `json:"ipaddress"`                // string or null
	Skew         *string  `json:"skew"`                     // BUG doc: floating point number, api object: string or null
	Port         *uint16  `json:"port"`                     // uint16 or null
	Version      *uint    `json:"version"`                  // uint or null
	Modules      []string `json:"modules"`                  // [] len >= 0
	ExternalPort uint16   `json:"external_port"`            // uint16
	MinVer       uint     `json:"minimum_version_required"` // uint
}

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 CIDType

type CIDType *string

CIDType Circonus object cid

type ChartTextWidgetDatapoint

type ChartTextWidgetDatapoint struct {
	AccountID    string `json:"account_id,omitempty"`     // metric cluster, metric
	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
	CheckID      uint   `json:"_check_id,omitempty"`      // metric
	ClusterID    uint   `json:"cluster_id,omitempty"`     // metric cluster
	NumericOnly  bool   `json:"numeric_only,omitempty"`   // metric cluster
}

ChartTextWidgetDatapoint defines datapoints for charts

type ChartWidgetDefinitionLegend

type ChartWidgetDefinitionLegend struct {
	Type string `json:"type,omitempty"`
	Show bool   `json:"show,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"`
	Formula           string                      `json:"formula,omitempty"`
	WedgeValues       ChartWidgetWedgeValues      `json:"wedge_values,omitempty"`
	Legend            ChartWidgetDefinitionLegend `json:"legend,omitempty"`
	Period            uint                        `json:"period,omitempty"`
	WedgeLabels       ChartWidgetWedgeLabels      `json:"wedge_labels,omitempty"`
	DisableAutoformat bool                        `json:"disable_autoformat,omitempty"`
	PopOnHover        bool                        `json:"pop_onhover,omitempty"`
}

ChartWidgtDefinition defines chart widget definition

type Check

type Check struct {
	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
	ReverseURLs    []string     `json:"_reverse_urls"` // []string list of reverse urls (one per broker in cluster)
	Active         bool         `json:"_active"`       // bool
}

Check defines a check. See https://login.circonus.com/resources/api/calls/check for more information.

type CheckBundle

type CheckBundle struct {
	CID                string              `json:"_cid,omitempty"`                     // string
	Status             string              `json:"status,omitempty"`                   // string
	DisplayName        string              `json:"display_name"`                       // string
	LastModifedBy      string              `json:"_last_modifed_by,omitempty"`         // string
	Target             string              `json:"target"`                             // string
	Type               string              `json:"type"`                               // string
	Notes              *string             `json:"notes,omitempty"`                    // string or null
	Config             CheckBundleConfig   `json:"config"`                             // NOTE contents of config are check type specific, map len >= 0
	Brokers            []string            `json:"brokers"`                            // [] len >= 0
	Checks             []string            `json:"_checks,omitempty"`                  // [] len >= 0
	CheckUUIDs         []string            `json:"_check_uuids,omitempty"`             // [] len >= 0
	ReverseConnectURLs []string            `json:"_reverse_connection_urls,omitempty"` // [] len >= 0
	Tags               []string            `json:"tags,omitempty"`                     // [] len >= 0
	MetricFilters      [][]string          `json:"metric_filters,omitempty"`           // [][type,rule_regx,comment]
	Metrics            []CheckBundleMetric `json:"metrics"`                            // [] >= 0
	Timeout            float32             `json:"timeout,omitempty"`                  // float32
	Period             uint                `json:"period,omitempty"`                   // uint
	Created            uint                `json:"_created,omitempty"`                 // uint
	LastModified       uint                `json:"_last_modified,omitempty"`           // uint
	MetricLimit        int                 `json:"metric_limit,omitempty"`             // int
}

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

type CheckBundleConfig map[config.Key]string

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
	Type   string   `json:"type"`             // string
	Status string   `json:"status,omitempty"` // string
	Result *string  `json:"result,omitempty"` // string or null, NOTE not settable - return/information value only
	Units  *string  `json:"units,omitempty"`  // string or null
	Tags   []string `json:"tags"`             // [] len >= 0
}

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

type CheckDetails map[config.Key]string

CheckDetails contains [undocumented] check type specific information

type Config

type Config struct {
	Log Logger
	// TLSConfig defines a custom tls configuration to use when communicating with the API
	TLSConfig *tls.Config
	// CACert deprecating, use TLSConfig instead
	CACert *x509.CertPool
	// 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
	MinRetryDelay  string
	MaxRetryDelay  string
	MaxRetries     uint
	DisableRetries bool
	Debug          bool
}

Config options for Circonus API

type ContactGroup

type ContactGroup struct {
	CID               string                    `json:"_cid,omitempty"`               // string
	LastModifiedBy    string                    `json:"_last_modified_by,omitempty"`  // string
	Name              string                    `json:"name,omitempty"`               // string
	GroupType         string                    `json:"group_type,omitempty"`         // string - new 2019-10-09
	AlertFormats      ContactGroupAlertFormats  `json:"alert_formats,omitempty"`      // ContactGroupAlertFormats
	Contacts          ContactGroupContacts      `json:"contacts,omitempty"`           // ContactGroupContacts
	Escalations       []*ContactGroupEscalation `json:"escalations,omitempty"`        // [] len == 5, elements: ContactGroupEscalation or null
	Reminders         []uint                    `json:"reminders,omitempty"`          // [] len == 5
	Tags              []string                  `json:"tags,omitempty"`               // [] len >= 0
	LastModified      uint                      `json:"_last_modified,omitempty"`     // uint
	AggregationWindow uint                      `json:"aggregation_window,omitempty"` // uint
	AlwaysSendClear   bool                      `json:"always_send_clear,omitempty"`  // bool - new 2019-10-09
}

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,omitempty"`  // string - 2019-10-09 null no longer accepted, must be omitted if not set
	LongSubject  *string `json:"long_subject,omitempty"`  // string - 2019-10-09 null no longer accepted, must be omitted if not set
	LongSummary  *string `json:"long_summary,omitempty"`  // string - 2019-10-09 null no longer accepted, must be omitted if not set
	ShortMessage *string `json:"short_message,omitempty"` // string - 2019-10-09 null no longer accepted, must be omitted if not set
	ShortSummary *string `json:"short_summary,omitempty"` // string - 2019-10-09 null no longer accepted, must be omitted if not set
}

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 {
	ContactGroupCID string `json:"contact_group"` // string
	After           uint   `json:"after"`         // uint
}

ContactGroupEscalation defines escalations for severity levels

type Dashboard

type Dashboard struct {
	CID          string              `json:"_cid,omitempty"`
	CreatedBy    string              `json:"_created_by,omitempty"`
	Title        string              `json:"title"`
	UUID         string              `json:"_dashboard_uuid,omitempty"`
	Widgets      []DashboardWidget   `json:"widgets"`
	Options      DashboardOptions    `json:"options"`
	GridLayout   DashboardGridLayout `json:"grid_layout"`
	Created      uint                `json:"_created,omitempty"`
	LastModified uint                `json:"_last_modified,omitempty"`
	Active       bool                `json:"_active,omitempty"`
	Shared       bool                `json:"shared"`
}

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 {
	Nickname            string `json:"nickname"`
	SharedID            string `json:"shared_id"`
	TextSize            uint   `json:"text_size"`
	BlackDash           bool   `json:"black_dash"`
	Enabled             bool   `json:"enabled"`
	Fullscreen          bool   `json:"fullscreen"`
	FullscreenHideTitle bool   `json:"fullscreen_hide_title"`
	ScaleText           bool   `json:"scale_text"`
}

DashboardAccessConfig defines access config

type DashboardGridLayout

type DashboardGridLayout struct {
	Height uint `json:"height"`
	Width  uint `json:"width"`
}

DashboardGridLayout defines layout

type DashboardOptions

type DashboardOptions struct {
	AccessConfigs       []DashboardAccessConfig `json:"access_configs"`
	Linkages            [][]string              `json:"linkages"`
	TextSize            uint                    `json:"text_size"`
	FullscreenHideTitle bool                    `json:"fullscreen_hide_title"`
	HideGrid            bool                    `json:"hide_grid"`
	ScaleText           bool                    `json:"scale_text"`
}

DashboardOptions defines options

type DashboardWidget

type DashboardWidget struct {
	Name     string                  `json:"name"`
	Origin   string                  `json:"origin"`
	Type     string                  `json:"type"`
	WidgetID string                  `json:"widget_id"`
	Settings DashboardWidgetSettings `json:"settings"`
	Height   uint                    `json:"height"`
	Width    uint                    `json:"width"`
	Active   bool                    `json:"active"`
}

DashboardWidget defines widget

type DashboardWidgetSettings

type DashboardWidgetSettings struct {
	Definition          *ChartWidgtDefinition            `json:"definition,omitempty"`            // charts
	AgentStatusSettings *StatusWidgetAgentStatusSettings `json:"agent_status_settings,omitempty"` // status
	HostStatusSettings  *StatusWidgetHostStatusSettings  `json:"host_status_settings,omitempty"`  // status
	Thresholds          *ForecastGaugeWidgetThresholds   `json:"thresholds,omitempty"`            // forecasts, gauges
	RangeHigh           *int                             `json:"range_high,omitempty"`            // gauges 2019-11-01 switch to pointer for 0 ranges
	RangeLow            *int                             `json:"range_low,omitempty"`             // gauges 2019-11-01 switch to pointer for 0 ranges
	ShowValue           *bool                            `json:"show_value,omitempty"`            // state
	AccountID           string                           `json:"account_id,omitempty"`            // alerts, clusters, gauges, graphs, lists, state, status
	Acknowledged        string                           `json:"acknowledged,omitempty"`          // alerts
	Algorithm           string                           `json:"algorithm,omitempty"`             // clusters
	BodyFormat          string                           `json:"body_format,omitempty"`           // text
	Caql                string                           `json:"caql,omitempty"`                  // state
	ChartType           string                           `json:"chart_type,omitempty"`            // charts
	CheckUUID           string                           `json:"check_uuid,omitempty"`            // gauges, state
	Cleared             string                           `json:"cleared,omitempty"`               // alerts
	ClusterName         string                           `json:"cluster_name,omitempty"`          // clusters
	ContentType         string                           `json:"content_type,omitempty"`          // status
	DateWindow          string                           `json:"date_window,omitempty"`           // graphs
	Dependents          string                           `json:"dependents,omitempty"`            // alerts
	Display             string                           `json:"display,omitempty"`               // alerts
	DisplayMarkup       string                           `json:"display_markup,omitempty"`        // state
	Format              string                           `json:"format,omitempty"`                // forecasts
	Formula             string                           `json:"formula,omitempty"`               // gauges
	GoodColor           string                           `json:"good_color,omitempty"`            // state
	GraphUUID           string                           `json:"graph_id,omitempty"`              // graphs
	KeyLoc              string                           `json:"key_loc,omitempty"`               // graphs
	Label               string                           `json:"label,omitempty"`                 // graphs
	Layout              string                           `json:"layout,omitempty"`                // clusters
	LayoutStyle         string                           `json:"layout_style,omitempty"`          // state
	LinkURL             string                           `json:"link_url,omitempty"`              // state
	Maintenance         string                           `json:"maintenance,omitempty"`           // alerts
	Markup              string                           `json:"markup,omitempty"`                // html
	MetricDisplayName   string                           `json:"metric_display_name,omitempty"`   // gauges, state
	MetricName          string                           `json:"metric_name,omitempty"`           // gauges, state
	MetricType          string                           `json:"metric_type,omitempty"`           // state
	MinAge              string                           `json:"min_age,omitempty"`               // alerts
	OverlaySetID        string                           `json:"overlay_set_id,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
	Size                string                           `json:"size,omitempty"`                  // clusters
	TextAlign           string                           `json:"text_align,omitempty"`            // state
	TimeWindow          string                           `json:"time_window,omitempty"`           // alerts
	Title               string                           `json:"title,omitempty"`                 // alerts, charts, forecasts, gauges, html, state
	TitleFormat         string                           `json:"title_format,omitempty"`          // text
	Trend               string                           `json:"trend,omitempty"`                 // forecasts
	Type                string                           `json:"type,omitempty"`                  // gauges, lists
	ValueType           string                           `json:"value_type,omitempty"`            // gauges, text
	TagFilterSet        []string                         `json:"tag_filter_set,omitempty"`        // alerts
	WeekDays            []string                         `json:"weekdays,omitempty"`              // alerts
	BadRules            []StateWidgetBadRulesSettings    `json:"bad_rules,omitempty"`             // state
	Datapoints          []ChartTextWidgetDatapoint       `json:"datapoints,omitempty"`            // charts, text
	ContactGroups       []uint                           `json:"contact_groups,omitempty"`        // alerts
	OffHours            []uint                           `json:"off_hours,omitempty"`             // alerts
	KeySize             uint                             `json:"key_size,omitempty"`              // graphs
	Limit               uint                             `json:"limit,omitempty"`                 // lists
	Period              uint                             `json:"period,omitempty"`                // gauges, text, graphs
	ClusterID           uint                             `json:"cluster_id,omitempty"`            // clusters
	Threshold           float32                          `json:"threshold,omitempty"`             // clusters
	KeyWrap             bool                             `json:"key_wrap,omitempty"`              // graphs
	KeyInline           bool                             `json:"key_inline,omitempty"`            // graphs
	DisableAutoformat   bool                             `json:"disable_autoformat,omitempty"`    // gauges
	HideXAxis           bool                             `json:"hide_xaxis,omitempty"`            // graphs
	HideYAxis           bool                             `json:"hide_yaxis,omitempty"`            // graphs
	Realtime            bool                             `json:"realtime,omitempty"`              // graphs
	ShowFlags           bool                             `json:"show_flags,omitempty"`            // graphs
	UseDefault          bool                             `json:"use_default,omitempty"`           // text
	Autoformat          bool                             `json:"autoformat,omitempty"`            // text
}

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
	Values []string `json:"values,omitempty"` // forecasts, gauges
	Flip   bool     `json:"flip"`             // gauges 2019-11-01, flip is required
}

ForecastGaugeWidgetThresholds defines forecast widget thresholds

type Graph

type Graph struct {
	LineStyle      *string                     `json:"line_style"`          // string or null
	Style          *string                     `json:"style"`               // string or null
	Notes          *string                     `json:"notes"`               // string or null
	OverlaySets    *map[string]GraphOverlaySet `json:"overlay_sets"`        // GroupOverLaySets or null
	CID            string                      `json:"_cid"`                // string
	Description    string                      `json:"description"`         // string
	Title          string                      `json:"title"`               // string
	LogLeftY       interface{}                 `json:"logarithmic_left_y"`  // string that must parse to an int, empty string "", or null BUG doc: number (not string)
	LogRightY      interface{}                 `json:"logarithmic_right_y"` // string that must parse to a float, empty string "", or null BUG doc: number (not string)
	MaxLeftY       interface{}                 `json:"max_left_y"`          // string that must parse to a float, empty string "", or null BUG doc: number (not string)
	MaxRightY      interface{}                 `json:"max_right_y"`         // string that must parse to a float, empty string "", or null BUG doc: number (not string)
	MinLeftY       interface{}                 `json:"min_left_y"`          // string that must parse to a float, empty string "", or null BUG doc: number (not string)
	MinRightY      interface{}                 `json:"min_right_y"`         // string that must parse to a float, empty string "", or null BUG doc: number (not string)
	Tags           []string                    `json:"tags"`                // [] len >= 0
	AccessKeys     []GraphAccessKey            `json:"access_keys"`         // [] len >= 0
	Composites     []GraphComposite            `json:"composites"`          // [] len >= 0
	Datapoints     []GraphDatapoint            `json:"datapoints"`          // [] len >= 0
	Guides         []GraphGuide                `json:"guides"`              // [] len >= 0
	MetricClusters []GraphMetricCluster        `json:"metric_clusters"`     // [] len >= 0
}

Graph defines a graph. See https://login.circonus.com/resources/api/calls/graph for more information.

func NewGraph

func NewGraph() *Graph

NewGraph returns a Graph (with defaults, if applicable)

type GraphAccessKey

type GraphAccessKey struct {
	Key            string `json:"key,omitempty"`              // string
	LockMode       string `json:"lock_mode,omitempty"`        // string
	LockZoom       string `json:"lock_zoom,omitempty"`        // string
	Nickname       string `json:"nickname,omitempty"`         // string
	Height         uint   `json:"height,omitempty"`           // uint
	LockRangeEnd   uint   `json:"lock_range_end,omitempty"`   // uint
	LockRangeStart uint   `json:"lock_range_start,omitempty"` // uint
	Width          uint   `json:"width,omitempty"`            // uint
	Active         bool   `json:"active,omitempty"`           // boolean
	Legend         bool   `json:"legend,omitempty"`           // boolean
	LockDate       bool   `json:"lock_date,omitempty"`        // boolean
	LockShowTimes  bool   `json:"lock_show_times,omitempty"`  // boolean
	Title          bool   `json:"title,omitempty"`            // boolean
	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 {
	Stack         *uint   `json:"stack"`          // uint or null
	DataFormula   *string `json:"data_formula"`   // string or null
	LegendFormula *string `json:"legend_formula"` // string or null
	Axis          string  `json:"axis"`           // string
	Color         string  `json:"color"`          // string
	Name          string  `json:"name"`           // string
	Hidden        bool    `json:"hidden"`         // boolean
}

GraphComposite defines a composite

type GraphDatapoint

type GraphDatapoint struct {
	Derive        interface{} `json:"derive,omitempty"`      // BUG doc: string, api: string or boolean(for caql statements)
	Search        *string     `json:"search"`                // string or null
	Alpha         *string     `json:"alpha,omitempty"`       // BUG: doc: floating point number, api: string
	CAQL          *string     `json:"caql,omitempty"`        // string or null
	Color         *string     `json:"color,omitempty"`       // string
	DataFormula   *string     `json:"data_formula"`          // string or null
	LegendFormula *string     `json:"legend_formula"`        // string or null
	Stack         *uint       `json:"stack"`                 // uint or null
	Axis          string      `json:"axis,omitempty"`        // string
	MetricName    string      `json:"metric_name,omitempty"` // string
	MetricType    string      `json:"metric_type,omitempty"` // string
	Name          string      `json:"name"`                  // string
	CheckID       uint        `json:"check_id,omitempty"`    // uint
	Hidden        bool        `json:"hidden"`                // boolean
}

GraphDatapoint defines a datapoint

type GraphGuide

type GraphGuide struct {
	DataFormula   *string `json:"data_formula"`   // string or null
	LegendFormula *string `json:"legend_formula"` // string or null
	Color         string  `json:"color"`          // string
	Name          string  `json:"name"`           // string
	Hidden        bool    `json:"hidden"`         // boolean
}

GraphGuide defines a guide

type GraphMetricCluster

type GraphMetricCluster struct {
	Color         *string `json:"color,omitempty"`              // string
	DataFormula   *string `json:"data_formula"`                 // string or null
	LegendFormula *string `json:"legend_formula"`               // string or null
	Stack         *uint   `json:"stack"`                        // uint or null
	MetricCluster string  `json:"metric_cluster,omitempty"`     // string
	Name          string  `json:"name,omitempty"`               // string
	AggregateFunc string  `json:"aggregate_function,omitempty"` // string
	Axis          string  `json:"axis,omitempty"`               // string
	Hidden        bool    `json:"hidden"`                       // boolean
}

GraphMetricCluster defines a metric cluster

type GraphOverlay added in v0.6.0

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"`
}

OverlaySet defines an overlay set for a graph

type IDType

type IDType int

IDType Circonus object id

type Logger added in v0.5.2

type Logger interface {
	Printf(string, ...interface{})
}

Logger facilitates use of any logger supporting the required methods rather than just standard log package log.Logger

type Maintenance

type Maintenance struct {
	Severities interface{} `json:"severities,omitempty"` // []string NOTE can be set with CSV string or []string
	CID        string      `json:"_cid,omitempty"`       // string
	Item       string      `json:"item,omitempty"`       // string
	Notes      string      `json:"notes,omitempty"`      // string
	Type       string      `json:"type,omitempty"`       // string
	Tags       []string    `json:"tags,omitempty"`       // [] len >= 0
	Start      uint        `json:"start,omitempty"`      // uint
	Stop       uint        `json:"stop,omitempty"`       // uint
}

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 {
	Notes          *string  `json:"notes,omitempty"`         // string or null
	Link           *string  `json:"link,omitempty"`          // string or null
	CheckBundleCID string   `json:"_check_bundle,omitempty"` // string
	CheckCID       string   `json:"_check,omitempty"`        // string
	CheckUUID      string   `json:"_check_uuid,omitempty"`   // string
	CID            string   `json:"_cid,omitempty"`          // string
	Histogram      string   `json:"_histogram,omitempty"`    // string
	MetricName     string   `json:"_metric_name,omitempty"`  // string
	MetricType     string   `json:"_metric_type,omitempty"`  // string
	CheckTags      []string `json:"_check_tags,omitempty"`   // [] len >= 0
	Active         bool     `json:"_active,omitempty"`       // boolean
	CheckActive    bool     `json:"_check_active,omitempty"` // boolean

}

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

type MetricQuery struct {
	Query string `json:"query"`
	Type  string `json:"type"`
}

MetricQuery object

type OutlierReport

type OutlierReport struct {
	CID              string   `json:"_cid,omitempty"`              // string
	Config           string   `json:"config,omitempty"`            // string
	CreatedBy        string   `json:"_created_by,omitempty"`       // string
	LastModifiedBy   string   `json:"_last_modified_by,omitempty"` // string
	MetricClusterCID string   `json:"metric_cluster,omitempty"`    // st ring
	Title            string   `json:"title,omitempty"`             // string
	Tags             []string `json:"tags,omitempty"`              // [] len >= 0
	Created          uint     `json:"_created,omitempty"`          // uint
	LastModified     uint     `json:"_last_modified,omitempty"`    // uint
}

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 {
	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
	Decouple bool   `json:"decouple,omitempty"` // boolean
}

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
	Stratcons               []BrokerStratcon `json:"_stratcons,omitempty"`                // [] len >= 1
	Tags                    []string         `json:"tags,omitempty"`                      // [] len >= 0
	PreferReverseConnection bool             `json:"prefer_reverse_connection,omitempty"` // boolean
	Rebuild                 bool             `json:"rebuild,omitempty"`                   // boolean
}

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 {
	CID           string             `json:"_cid,omitempty"`           // string
	Host          string             `json:"_host,omitempty"`          // string
	CheckCID      string             `json:"check"`                    // string
	ContactGroups map[uint8][]string `json:"contact_groups"`           // [] len 5
	Filter        string             `json:"filter,omitempty"`         // string
	Link          *string            `json:"link"`                     // string or null
	LookupKey     *string            `json:"lookup_key"`               // string or null
	MetricName    string             `json:"metric_name,omitempty"`    // string (name or pattern)
	MetricPattern string             `json:"metric_pattern,omitempty"` // string (name or pattern)
	MetricTags    []string           `json:"metric_tags"`              // [] len >= 0
	MetricType    string             `json:"metric_type"`              // string
	Name          string             `json:"name,omitempty"`           // string
	Notes         *string            `json:"notes"`                    // string or null
	UserJSON      json.RawMessage    `json:"user_json,omitempty"`      // // abitrary json the ruleset creator supplies.. this is opaque and only has to be parseable JSON <= 4096 chars
	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
	Name              string                  `json:"name"`                // string
	Tags              []string                `json:"tags"`                // [] len >= 0
	ContactGroups     map[uint8][]string      `json:"contact_groups"`      // [] len == 5
	Formulas          []RuleSetGroupFormula   `json:"formulas"`            // [] len >= 0
	RuleSetConditions []RuleSetGroupCondition `json:"rule_set_conditions"` // [] len >= 1
}

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 {
	RuleSetCID         string   `json:"rule_set"`            // string
	MatchingSeverities []string `json:"matching_severities"` // [] len >= 1
}

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 interface{} `json:"raise_severity"` // string or uint BUG doc: numeric, api: string or numeric
	Wait          uint        `json:"wait"`           // uint
}

RuleSetGroupFormula defines a formula for raising alerts

type RuleSetRule

type RuleSetRule struct {
	Value                interface{} `json:"value"`                            // BUG doc: string, api: actual type returned switches based on Criteria
	WindowingFunction    *string     `json:"windowing_function,omitempty"`     // string or null
	Criteria             string      `json:"criteria"`                         // string
	Severity             uint        `json:"severity"`                         // uint
	Wait                 uint        `json:"wait"`                             // uint
	WindowingDuration    uint        `json:"windowing_duration,omitempty"`     // uint
	WindowingMinDuration uint        `json:"windowing_min_duration,omitempty"` // uint
}

RuleSetRule defines a ruleset rule

type SearchFilterType

type SearchFilterType map[string][]string

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 StateWidgetBadRulesSettings added in v0.7.3

type StateWidgetBadRulesSettings struct {
	Value     string `json:"value,omitempty"`
	Criterion string `json:"criterion,omitempty"`
	Color     string `json:"color,omitempty"`
}

StatusWidgetAgentStatusSettings defines agent status settings

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 TagType

type TagType []string

TagType search/select/custom tag(s) type

type TokenAccountIDType

type TokenAccountIDType string

TokenAccountIDType - Circonus API Token account id

type TokenAppType

type TokenAppType string

TokenAppType - Circonus API Token app name

type TokenKeyType

type TokenKeyType string

TokenKeyType - Circonus API Token key

type URLType

type URLType string

URLType submission url type

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 {
	Notes        *string               `json:"notes"`                   // string or null
	Description  *string               `json:"description"`             // string or null
	CID          string                `json:"_cid,omitempty"`          // string
	Title        string                `json:"title"`                   // string
	Tags         []string              `json:"tags"`                    // [] len >= 0
	Graphs       []WorksheetGraph      `json:"graphs"`                  // [] len >= 0
	SmartQueries []WorksheetSmartQuery `json:"smart_queries,omitempty"` // [] len >= 0
	Favorite     bool                  `json:"favorite"`                // boolean
}

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"`
	Query string   `json:"query"`
	Order []string `json:"order"`
}

WorksheetSmartQuery defines a query to include multiple worksheets

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL