1package config
2
3// Key for CheckBundleConfig options and CheckDetails info
4type Key string
5
6// Constants per type as defined in
7// https://login.circonus.com/resources/api/calls/check_bundle
8const (
9	//
10	// default settings for api.NewCheckBundle()
11	//
12	DefaultCheckBundleMetricLimit = -1 // unlimited
13	DefaultCheckBundleStatus      = "active"
14	DefaultCheckBundlePeriod      = 60
15	DefaultCheckBundleTimeout     = 10
16	DefaultConfigOptionsSize      = 20
17
18	//
19	// common (apply to more than one check type)
20	//
21	AsyncMetrics       = Key("asynch_metrics")
22	AuthMethod         = Key("auth_method")
23	AuthPassword       = Key("auth_password")
24	AuthUser           = Key("auth_user")
25	BaseURL            = Key("base_url")
26	CAChain            = Key("ca_chain")
27	CertFile           = Key("certificate_file")
28	Ciphers            = Key("ciphers")
29	Command            = Key("command")
30	DSN                = Key("dsn")
31	HeaderPrefix       = Key("header_")
32	HTTPVersion        = Key("http_version")
33	KeyFile            = Key("key_file")
34	Method             = Key("method")
35	Password           = Key("password")
36	Payload            = Key("payload")
37	Port               = Key("port")
38	Query              = Key("query")
39	ReadLimit          = Key("read_limit")
40	Secret             = Key("secret")
41	SQL                = Key("sql")
42	URI                = Key("uri")
43	URL                = Key("url")
44	Username           = Key("username")
45	UseSSL             = Key("use_ssl")
46	User               = Key("user")
47	SASLAuthentication = Key("sasl_authentication")
48	SASLUser           = Key("sasl_user")
49	SecurityLevel      = Key("security_level")
50	Version            = Key("version")
51	AppendColumnName   = Key("append_column_name")
52	Database           = Key("database")
53	JDBCPrefix         = Key("jdbc_")
54
55	//
56	// CAQL check
57	//
58	// Common items:
59	// Query
60
61	//
62	// Circonus Windows Agent
63	//
64	// Common items:
65	// AuthPassword
66	// AuthUser
67	// Port
68	// URL
69	Calculated = Key("calculated")
70	Category   = Key("category")
71
72	//
73	// Cloudwatch
74	//
75	// Notes:
76	// DimPrefix is special because the actual key is dynamic and matches: `dim_(.+)`
77	// Common items:
78	// URL
79	// Version
80	APIKey            = Key("api_key")
81	APISecret         = Key("api_secret")
82	CloudwatchMetrics = Key("cloudwatch_metrics")
83	DimPrefix         = Key("dim_")
84	Granularity       = Key("granularity")
85	Namespace         = Key("namespace")
86	Statistics        = Key("statistics")
87
88	//
89	// Collectd
90	//
91	// Common items:
92	// AsyncMetrics
93	// Username
94	// Secret
95	// SecurityLevel
96
97	//
98	// Composite
99	//
100	CompositeMetricName = Key("composite_metric_name")
101	Formula             = Key("formula")
102
103	//
104	// DHCP
105	//
106	HardwareAddress = Key("hardware_addr")
107	HostIP          = Key("host_ip")
108	RequestType     = Key("request_type")
109	SendPort        = Key("send_port")
110
111	//
112	// DNS
113	//
114	// Common items:
115	// Query
116	CType      = Key("ctype")
117	Nameserver = Key("nameserver")
118	RType      = Key("rtype")
119
120	//
121	// EC Console
122	//
123	// Common items:
124	// Command
125	// Port
126	// SASLAuthentication
127	// SASLUser
128	Objects = Key("objects")
129	XPath   = Key("xpath")
130
131	//
132	// Elastic Search
133	//
134	// Common items:
135	// Port
136	// URL
137
138	//
139	// Ganglia
140	//
141	// Common items:
142	// AsyncMetrics
143
144	//
145	// Google Analytics
146	//
147	// Common items:
148	// Password
149	// Username
150	OAuthToken       = Key("oauth_token")
151	OAuthTokenSecret = Key("oauth_token_secret")
152	OAuthVersion     = Key("oauth_version")
153	TableID          = Key("table_id")
154	UseOAuth         = Key("use_oauth")
155
156	//
157	// HA Proxy
158	//
159	// Common items:
160	// AuthPassword
161	// AuthUser
162	// Port
163	// UseSSL
164	Host   = Key("host")
165	Select = Key("select")
166
167	//
168	// HTTP
169	//
170	// Notes:
171	// HeaderPrefix is special because the actual key is dynamic and matches: `header_(\S+)`
172	// Common items:
173	// AuthMethod
174	// AuthPassword
175	// AuthUser
176	// CAChain
177	// CertFile
178	// Ciphers
179	// KeyFile
180	// URL
181	// HeaderPrefix
182	// HTTPVersion
183	// Method
184	// Payload
185	// ReadLimit
186	Body      = Key("body")
187	Code      = Key("code")
188	Extract   = Key("extract")
189	Redirects = Key("redirects")
190
191	//
192	// HTTPTRAP
193	//
194	// Common items:
195	// AsyncMetrics
196	// Secret
197
198	//
199	// IMAP
200	//
201	// Common items:
202	// AuthPassword
203	// AuthUser
204	// CAChain
205	// CertFile
206	// Ciphers
207	// KeyFile
208	// Port
209	// UseSSL
210	Fetch      = Key("fetch")
211	Folder     = Key("folder")
212	HeaderHost = Key("header_Host")
213	Search     = Key("search")
214
215	//
216	// JMX
217	//
218	// Common items:
219	// Password
220	// Port
221	// URI
222	// Username
223	MbeanDomains = Key("mbean_domains")
224
225	//
226	// JSON
227	//
228	// Common items:
229	// AuthMethod
230	// AuthPassword
231	// AuthUser
232	// CAChain
233	// CertFile
234	// Ciphers
235	// HeaderPrefix
236	// HTTPVersion
237	// KeyFile
238	// Method
239	// Payload
240	// Port
241	// ReadLimit
242	// URL
243
244	//
245	// Keynote
246	//
247	// Notes:
248	// SlotAliasPrefix is special because the actual key is dynamic and matches: `slot_alias_(\d+)`
249	// Common items:
250	// APIKey
251	// BaseURL
252	PageComponent   = Key("pagecomponent")
253	SlotAliasPrefix = Key("slot_alias_")
254	SlotIDList      = Key("slot_id_list")
255	TransPageList   = Key("transpagelist")
256
257	//
258	// Keynote Pulse
259	//
260	// Common items:
261	// BaseURL
262	// Password
263	// User
264	AgreementID = Key("agreement_id")
265
266	//
267	// LDAP
268	//
269	// Common items:
270	// Password
271	// Port
272	AuthType          = Key("authtype")
273	DN                = Key("dn")
274	SecurityPrincipal = Key("security_principal")
275
276	//
277	// Memcached
278	//
279	// Common items:
280	// Port
281
282	//
283	// MongoDB
284	//
285	// Common items:
286	// Command
287	// Password
288	// Port
289	// Username
290	DBName = Key("dbname")
291
292	//
293	// Munin
294	//
295	// Note: no configuration options
296
297	//
298	// MySQL
299	//
300	// Common items:
301	// DSN
302	// SQL
303
304	//
305	// Newrelic rpm
306	//
307	// Common items:
308	// APIKey
309	AccountID     = Key("acct_id")
310	ApplicationID = Key("application_id")
311	LicenseKey    = Key("license_key")
312
313	//
314	// Nginx
315	//
316	// Common items:
317	// CAChain
318	// CertFile
319	// Ciphers
320	// KeyFile
321	// URL
322
323	//
324	// NRPE
325	//
326	// Common items:
327	// Command
328	// Port
329	// UseSSL
330	AppendUnits = Key("append_uom")
331
332	//
333	// NTP
334	//
335	// Common items:
336	// Port
337	Control = Key("control")
338
339	//
340	// Oracle
341	//
342	// Notes:
343	// JDBCPrefix is special because the actual key is dynamic and matches: `jdbc_(\S+)`
344	// Common items:
345	// AppendColumnName
346	// Database
347	// JDBCPrefix
348	// Password
349	// Port
350	// SQL
351	// User
352
353	//
354	// Ping ICMP
355	//
356	AvailNeeded = Key("avail_needed")
357	Count       = Key("count")
358	Interval    = Key("interval")
359
360	//
361	// PostgreSQL
362	//
363	// Common items:
364	// DSN
365	// SQL
366
367	//
368	// Redis
369	//
370	// Common items:
371	// Command
372	// Password
373	// Port
374	DBIndex = Key("dbindex")
375
376	//
377	// Resmon
378	//
379	// Notes:
380	// HeaderPrefix is special because the actual key is dynamic and matches: `header_(\S+)`
381	// Common items:
382	// AuthMethod
383	// AuthPassword
384	// AuthUser
385	// CAChain
386	// CertFile
387	// Ciphers
388	// HeaderPrefix
389	// HTTPVersion
390	// KeyFile
391	// Method
392	// Payload
393	// Port
394	// ReadLimit
395	// URL
396
397	//
398	// SMTP
399	//
400	// Common items:
401	// Payload
402	// Port
403	// SASLAuthentication
404	// SASLUser
405	EHLO         = Key("ehlo")
406	From         = Key("from")
407	SASLAuthID   = Key("sasl_auth_id")
408	SASLPassword = Key("sasl_password")
409	StartTLS     = Key("starttls")
410	To           = Key("to")
411
412	//
413	// SNMP
414	//
415	// Notes:
416	// OIDPrefix is special because the actual key is dynamic and matches: `oid_(.+)`
417	// TypePrefix is special because the actual key is dynamic and matches: `type_(.+)`
418	// Common items:
419	// Port
420	// SecurityLevel
421	// Version
422	AuthPassphrase    = Key("auth_passphrase")
423	AuthProtocol      = Key("auth_protocol")
424	Community         = Key("community")
425	ContextEngine     = Key("context_engine")
426	ContextName       = Key("context_name")
427	OIDPrefix         = Key("oid_")
428	PrivacyPassphrase = Key("privacy_passphrase")
429	PrivacyProtocol   = Key("privacy_protocol")
430	SecurityEngine    = Key("security_engine")
431	SecurityName      = Key("security_name")
432	SeparateQueries   = Key("separate_queries")
433	TypePrefix        = Key("type_")
434
435	//
436	// SQLServer
437	//
438	// Notes:
439	// JDBCPrefix is special because the actual key is dynamic and matches: `jdbc_(\S+)`
440	// Common items:
441	// AppendColumnName
442	// Database
443	// JDBCPrefix
444	// Password
445	// Port
446	// SQL
447	// User
448
449	//
450	// SSH v2
451	//
452	// Common items:
453	// Port
454	MethodCompCS      = Key("method_comp_cs")
455	MethodCompSC      = Key("method_comp_sc")
456	MethodCryptCS     = Key("method_crypt_cs")
457	MethodCryptSC     = Key("method_crypt_sc")
458	MethodHostKey     = Key("method_hostkey")
459	MethodKeyExchange = Key("method_kex")
460	MethodMacCS       = Key("method_mac_cs")
461	MethodMacSC       = Key("method_mac_sc")
462
463	//
464	// StatsD
465	//
466	// Note: no configuration options
467
468	//
469	// TCP
470	//
471	// Common items:
472	// CAChain
473	// CertFile
474	// Ciphers
475	// KeyFile
476	// Port
477	// UseSSL
478	BannerMatch = Key("banner_match")
479
480	//
481	// Varnish
482	//
483	// Note: no configuration options
484
485	//
486	// reserved - config option(s) can't actually be set - here for r/o access
487	//
488	ReverseSecretKey = Key("reverse:secret_key")
489	SubmissionURL    = Key("submission_url")
490
491	//
492	// Endpoint prefix & cid regex
493	//
494	DefaultCIDRegex            = "[0-9]+"
495	DefaultUUIDRegex           = "[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}"
496	AccountPrefix              = "/account"
497	AccountCIDRegex            = "^(" + AccountPrefix + "/(" + DefaultCIDRegex + "|current))$"
498	AcknowledgementPrefix      = "/acknowledgement"
499	AcknowledgementCIDRegex    = "^(" + AcknowledgementPrefix + "/(" + DefaultCIDRegex + "))$"
500	AlertPrefix                = "/alert"
501	AlertCIDRegex              = "^(" + AlertPrefix + "/(" + DefaultCIDRegex + "))$"
502	AnnotationPrefix           = "/annotation"
503	AnnotationCIDRegex         = "^(" + AnnotationPrefix + "/(" + DefaultCIDRegex + "))$"
504	BrokerPrefix               = "/broker"
505	BrokerCIDRegex             = "^(" + BrokerPrefix + "/(" + DefaultCIDRegex + "))$"
506	CheckBundleMetricsPrefix   = "/check_bundle_metrics"
507	CheckBundleMetricsCIDRegex = "^(" + CheckBundleMetricsPrefix + "/(" + DefaultCIDRegex + "))$"
508	CheckBundlePrefix          = "/check_bundle"
509	CheckBundleCIDRegex        = "^(" + CheckBundlePrefix + "/(" + DefaultCIDRegex + "))$"
510	CheckPrefix                = "/check"
511	CheckCIDRegex              = "^(" + CheckPrefix + "/(" + DefaultCIDRegex + "))$"
512	ContactGroupPrefix         = "/contact_group"
513	ContactGroupCIDRegex       = "^(" + ContactGroupPrefix + "/(" + DefaultCIDRegex + "))$"
514	DashboardPrefix            = "/dashboard"
515	DashboardCIDRegex          = "^(" + DashboardPrefix + "/(" + DefaultCIDRegex + "))$"
516	GraphPrefix                = "/graph"
517	GraphCIDRegex              = "^(" + GraphPrefix + "/(" + DefaultUUIDRegex + "))$"
518	MaintenancePrefix          = "/maintenance"
519	MaintenanceCIDRegex        = "^(" + MaintenancePrefix + "/(" + DefaultCIDRegex + "))$"
520	MetricClusterPrefix        = "/metric_cluster"
521	MetricClusterCIDRegex      = "^(" + MetricClusterPrefix + "/(" + DefaultCIDRegex + "))$"
522	MetricPrefix               = "/metric"
523	MetricCIDRegex             = "^(" + MetricPrefix + "/((" + DefaultCIDRegex + ")_([^[:space:]]+)))$"
524	OutlierReportPrefix        = "/outlier_report"
525	OutlierReportCIDRegex      = "^(" + OutlierReportPrefix + "/(" + DefaultCIDRegex + "))$"
526	ProvisionBrokerPrefix      = "/provision_broker"
527	ProvisionBrokerCIDRegex    = "^(" + ProvisionBrokerPrefix + "/([a-z0-9]+-[a-z0-9]+))$"
528	RuleSetGroupPrefix         = "/rule_set_group"
529	RuleSetGroupCIDRegex       = "^(" + RuleSetGroupPrefix + "/(" + DefaultCIDRegex + "))$"
530	RuleSetPrefix              = "/rule_set"
531	RuleSetCIDRegex            = "^(" + RuleSetPrefix + "/((" + DefaultCIDRegex + ")_([^[:space:]]+)))$"
532	UserPrefix                 = "/user"
533	UserCIDRegex               = "^(" + UserPrefix + "/(" + DefaultCIDRegex + "|current))$"
534	WorksheetPrefix            = "/worksheet"
535	WorksheetCIDRegex          = "^(" + WorksheetPrefix + "/(" + DefaultUUIDRegex + "))$"
536	// contact group serverity levels
537	NumSeverityLevels = 5
538)
539