-
Notifications
You must be signed in to change notification settings - Fork 151
/
mackerel-plugin_gen.go
226 lines (222 loc) · 6.68 KB
/
mackerel-plugin_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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// Code generated by "tool/gen_mackerel_plugin.pl"; DO NOT EDIT
package main
import (
"fmt"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-accesslog/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-apache2/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-cloudfront/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-dynamodb/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-ec2-cpucredit/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-ec2-ebs/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-elasticache/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-elasticsearch/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-elb/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-kinesis-streams/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-lambda/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-rds/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-s3-requests/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-aws-ses/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-conntrack/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-docker/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-elasticsearch/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-fluentd/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-gostats/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-h2o/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-haproxy/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-inode/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-jmx-jolokia/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-jvm/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-linux/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-mailq/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-memcached/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-multicore/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-munin/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-nginx/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-openldap/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-php-apc/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-php-fpm/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-php-opcache/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-plack/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-postgres/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-proc-fd/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-rabbitmq/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-redis/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-sidekiq/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-snmp/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-solr/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-squid/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-td-table-count/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-trafficserver/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-twemproxy/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-unicorn/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-uptime/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-uwsgi-vassal/lib"
"github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-varnish/lib"
"github.com/mackerelio/mackerel-plugin-mongodb/lib"
"github.com/mackerelio/mackerel-plugin-mysql/lib"
)
func runPlugin(plug string) error {
switch plug {
case "accesslog":
mpaccesslog.Do()
case "apache2":
mpapache2.Do()
case "aws-cloudfront":
mpawscloudfront.Do()
case "aws-dynamodb":
mpawsdynamodb.Do()
case "aws-ec2-cpucredit":
mpawsec2cpucredit.Do()
case "aws-ec2-ebs":
mpawsec2ebs.Do()
case "aws-elasticache":
mpawselasticache.Do()
case "aws-elasticsearch":
mpawselasticsearch.Do()
case "aws-elb":
mpawselb.Do()
case "aws-kinesis-streams":
mpawskinesisstreams.Do()
case "aws-lambda":
mpawslambda.Do()
case "aws-rds":
mpawsrds.Do()
case "aws-s3-requests":
mpawss3requests.Do()
case "aws-ses":
mpawsses.Do()
case "conntrack":
mpconntrack.Do()
case "docker":
mpdocker.Do()
case "elasticsearch":
mpelasticsearch.Do()
case "fluentd":
mpfluentd.Do()
case "gostats":
mpgostats.Do()
case "h2o":
mph2o.Do()
case "haproxy":
mphaproxy.Do()
case "inode":
mpinode.Do()
case "jmx-jolokia":
mpjmxjolokia.Do()
case "jvm":
mpjvm.Do()
case "linux":
mplinux.Do()
case "mailq":
mpmailq.Do()
case "memcached":
mpmemcached.Do()
case "multicore":
mpmulticore.Do()
case "munin":
mpmunin.Do()
case "nginx":
mpnginx.Do()
case "openldap":
mpopenldap.Do()
case "php-apc":
mpphpapc.Do()
case "php-fpm":
mpphpfpm.Do()
case "php-opcache":
mpphpopcache.Do()
case "plack":
mpplack.Do()
case "postgres":
mppostgres.Do()
case "proc-fd":
mpprocfd.Do()
case "rabbitmq":
mprabbitmq.Do()
case "redis":
mpredis.Do()
case "sidekiq":
mpsidekiq.Do()
case "snmp":
mpsnmp.Do()
case "solr":
mpsolr.Do()
case "squid":
mpsquid.Do()
case "td-table-count":
mptdtablecount.Do()
case "trafficserver":
mptrafficserver.Do()
case "twemproxy":
mptwemproxy.Do()
case "unicorn":
mpunicorn.Do()
case "uptime":
mpuptime.Do()
case "uwsgi-vassal":
mpuwsgivassal.Do()
case "varnish":
mpvarnish.Do()
case "mongodb":
mpmongodb.Do()
case "mysql":
mpmysql.Do()
default:
return fmt.Errorf("unknown plugin: %q", plug)
}
return nil
}
var plugins = []string{
"accesslog",
"apache2",
"aws-cloudfront",
"aws-dynamodb",
"aws-ec2-cpucredit",
"aws-ec2-ebs",
"aws-elasticache",
"aws-elasticsearch",
"aws-elb",
"aws-kinesis-streams",
"aws-lambda",
"aws-rds",
"aws-s3-requests",
"aws-ses",
"conntrack",
"docker",
"elasticsearch",
"fluentd",
"gostats",
"h2o",
"haproxy",
"inode",
"jmx-jolokia",
"jvm",
"linux",
"mailq",
"memcached",
"multicore",
"munin",
"nginx",
"openldap",
"php-apc",
"php-fpm",
"php-opcache",
"plack",
"postgres",
"proc-fd",
"rabbitmq",
"redis",
"sidekiq",
"snmp",
"solr",
"squid",
"td-table-count",
"trafficserver",
"twemproxy",
"unicorn",
"uptime",
"uwsgi-vassal",
"varnish",
"mongodb",
"mysql",
}