github.com/peterbale/terraform@v0.9.0-beta2.0.20170315142748-5723acd55547/builtin/providers/circonus/consts.go (about)

     1  package circonus
     2  
     3  const (
     4  	// Provider-level constants
     5  
     6  	// defaultAutoTag determines the default behavior of circonus.auto_tag.
     7  	defaultAutoTag = false
     8  
     9  	// When auto_tag is enabled, the default tag category and value will be set to
    10  	// the following value unless overriden.
    11  	defaultCirconusTag circonusTag = "author:terraform"
    12  
    13  	// When hashing a Set, default to a buffer this size
    14  	defaultHashBufSize = 512
    15  
    16  	providerAPIURLAttr  = "api_url"
    17  	providerAutoTagAttr = "auto_tag"
    18  	providerKeyAttr     = "key"
    19  
    20  	defaultCheckJSONMethod  = "GET"
    21  	defaultCheckJSONPort    = "443"
    22  	defaultCheckJSONVersion = "1.1"
    23  
    24  	defaultCheckICMPPingAvailability = 100.0
    25  	defaultCheckICMPPingCount        = 5
    26  	defaultCheckICMPPingInterval     = "2s"
    27  
    28  	defaultCheckCAQLTarget = "q._caql"
    29  
    30  	defaultCheckHTTPCodeRegexp = `^200$`
    31  	defaultCheckHTTPMethod     = "GET"
    32  	defaultCheckHTTPVersion    = "1.1"
    33  
    34  	defaultCheckHTTPTrapAsync = false
    35  
    36  	defaultCheckCloudWatchVersion = "2010-08-01"
    37  
    38  	defaultCollectorDetailAttrs = 10
    39  
    40  	defaultGraphDatapoints = 8
    41  	defaultGraphLineStyle  = "stepped"
    42  	defaultGraphStyle      = "line"
    43  	defaultGraphFunction   = "gauge"
    44  
    45  	metricUnit       = ""
    46  	metricUnitRegexp = `^.*$`
    47  
    48  	defaultRuleSetLast       = "300s"
    49  	defaultRuleSetMetricType = "numeric"
    50  	defaultRuleSetRuleLen    = 4
    51  	defaultAlertSeverity     = 1
    52  	defaultRuleSetWindowFunc = "average"
    53  	ruleSetAbsentMin         = "70s"
    54  )
    55  
    56  // Consts and their close relative, Go pseudo-consts.
    57  
    58  // validMetricTypes: See `type`: https://login.circonus.com/resources/api/calls/check_bundle
    59  var validMetricTypes = validStringValues{
    60  	`caql`,
    61  	`composite`,
    62  	`histogram`,
    63  	`numeric`,
    64  	`text`,
    65  }
    66  
    67  // validAggregateFuncs: See `aggregate_function`: https://login.circonus.com/resources/api/calls/graph
    68  var validAggregateFuncs = validStringValues{
    69  	`none`,
    70  	`min`,
    71  	`max`,
    72  	`sum`,
    73  	`mean`,
    74  	`geometric_mean`,
    75  }
    76  
    77  // validGraphLineStyles: See `line_style`: https://login.circonus.com/resources/api/calls/graph
    78  var validGraphLineStyles = validStringValues{
    79  	`stepped`,
    80  	`interpolated`,
    81  }
    82  
    83  // validGraphStyles: See `style`: https://login.circonus.com/resources/api/calls/graph
    84  var validGraphStyles = validStringValues{
    85  	`area`,
    86  	`line`,
    87  }
    88  
    89  // validAxisAttrs: See `line_style`: https://login.circonus.com/resources/api/calls/graph
    90  var validAxisAttrs = validStringValues{
    91  	`left`,
    92  	`right`,
    93  }
    94  
    95  // validGraphFunctionValues: See `derive`: https://login.circonus.com/resources/api/calls/graph
    96  var validGraphFunctionValues = validStringValues{
    97  	`counter`,
    98  	`derive`,
    99  	`gauge`,
   100  }
   101  
   102  // validRuleSetWindowFuncs: See `derive` or `windowing_func`: https://login.circonus.com/resources/api/calls/rule_set
   103  var validRuleSetWindowFuncs = validStringValues{
   104  	`average`,
   105  	`stddev`,
   106  	`derive`,
   107  	`derive_stddev`,
   108  	`counter`,
   109  	`counter_stddev`,
   110  	`derive_2`,
   111  	`derive_2_stddev`,
   112  	`counter_2`,
   113  	`counter_2_stddev`,
   114  }
   115  
   116  const (
   117  	// Supported circonus_trigger.metric_types.  See `metric_type`:
   118  	// https://login.circonus.com/resources/api/calls/rule_set
   119  	ruleSetMetricTypeNumeric = "numeric"
   120  	ruleSetMetricTypeText    = "text"
   121  )
   122  
   123  // validRuleSetMetricTypes: See `metric_type`: https://login.circonus.com/resources/api/calls/rule_set
   124  var validRuleSetMetricTypes = validStringValues{
   125  	ruleSetMetricTypeNumeric,
   126  	ruleSetMetricTypeText,
   127  }