forked from mackerelio/go-check-plugins
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mackerel-check_gen.go
130 lines (126 loc) · 3.22 KB
/
mackerel-check_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated by "tools/gen_mackerel_check.pl"; DO NOT EDIT
package main
import (
"fmt"
"github.com/mackerelio/go-check-plugins/check-aws-cloudwatch-logs/lib"
"github.com/mackerelio/go-check-plugins/check-aws-sqs-queue-size/lib"
"github.com/mackerelio/go-check-plugins/check-cert-file/lib"
"github.com/mackerelio/go-check-plugins/check-disk/lib"
"github.com/mackerelio/go-check-plugins/check-dns/lib"
"github.com/mackerelio/go-check-plugins/check-elasticsearch/lib"
"github.com/mackerelio/go-check-plugins/check-file-age/lib"
"github.com/mackerelio/go-check-plugins/check-file-size/lib"
"github.com/mackerelio/go-check-plugins/check-http/lib"
"github.com/mackerelio/go-check-plugins/check-jmx-jolokia/lib"
"github.com/mackerelio/go-check-plugins/check-ldap/lib"
"github.com/mackerelio/go-check-plugins/check-load/lib"
"github.com/mackerelio/go-check-plugins/check-log/lib"
"github.com/mackerelio/go-check-plugins/check-mailq/lib"
"github.com/mackerelio/go-check-plugins/check-masterha/lib"
"github.com/mackerelio/go-check-plugins/check-memcached/lib"
"github.com/mackerelio/go-check-plugins/check-mysql/lib"
"github.com/mackerelio/go-check-plugins/check-ntpoffset/lib"
"github.com/mackerelio/go-check-plugins/check-ping/lib"
"github.com/mackerelio/go-check-plugins/check-postgresql/lib"
"github.com/mackerelio/go-check-plugins/check-procs/lib"
"github.com/mackerelio/go-check-plugins/check-redis/lib"
"github.com/mackerelio/go-check-plugins/check-smtp/lib"
"github.com/mackerelio/go-check-plugins/check-solr/lib"
"github.com/mackerelio/go-check-plugins/check-ssh/lib"
"github.com/mackerelio/go-check-plugins/check-ssl-cert/lib"
"github.com/mackerelio/go-check-plugins/check-tcp/lib"
"github.com/mackerelio/go-check-plugins/check-uptime/lib"
)
func runPlugin(plug string) error {
switch plug {
case "aws-cloudwatch-logs":
checkawscloudwatchlogs.Do()
case "aws-sqs-queue-size":
checkawssqsqueuesize.Do()
case "cert-file":
checkcertfile.Do()
case "disk":
checkdisk.Do()
case "dns":
checkdns.Do()
case "elasticsearch":
checkelasticsearch.Do()
case "file-age":
checkfileage.Do()
case "file-size":
checkfilesize.Do()
case "http":
checkhttp.Do()
case "jmx-jolokia":
checkjmxjolokia.Do()
case "ldap":
checkldap.Do()
case "load":
checkload.Do()
case "log":
checklog.Do()
case "mailq":
checkmailq.Do()
case "masterha":
checkmasterha.Do()
case "memcached":
checkmemcached.Do()
case "mysql":
checkmysql.Do()
case "ntpoffset":
checkntpoffset.Do()
case "ping":
checkping.Do()
case "postgresql":
checkpostgresql.Do()
case "procs":
checkprocs.Do()
case "redis":
checkredis.Do()
case "smtp":
checksmtp.Do()
case "solr":
checksolr.Do()
case "ssh":
checkssh.Do()
case "ssl-cert":
checksslcert.Do()
case "tcp":
checktcp.Do()
case "uptime":
checkuptime.Do()
default:
return fmt.Errorf("unknown plugin: %q", plug)
}
return nil
}
var plugins = []string{
"aws-cloudwatch-logs",
"aws-sqs-queue-size",
"cert-file",
"disk",
"dns",
"elasticsearch",
"file-age",
"file-size",
"http",
"jmx-jolokia",
"ldap",
"load",
"log",
"mailq",
"masterha",
"memcached",
"mysql",
"ntpoffset",
"ping",
"postgresql",
"procs",
"redis",
"smtp",
"solr",
"ssh",
"ssl-cert",
"tcp",
"uptime",
}