forked from mackerelio/go-check-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mackerel-check_gen.go
106 lines (102 loc) · 2.58 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
// Code generated by "tools/gen_mackerel_check.pl"; DO NOT EDIT
package main
import (
"fmt"
"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-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-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-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-solr/lib"
"github.com/mackerelio/go-check-plugins/check-ssh/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-sqs-queue-size":
checkawssqsqueuesize.Do()
case "cert-file":
checkcertfile.Do()
case "disk":
checkdisk.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 "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 "postgresql":
checkpostgresql.Do()
case "procs":
checkprocs.Do()
case "redis":
checkredis.Do()
case "solr":
checksolr.Do()
case "ssh":
checkssh.Do()
case "tcp":
checktcp.Do()
case "uptime":
checkuptime.Do()
default:
return fmt.Errorf("unknown plugin: %q", plug)
}
return nil
}
var plugins = []string{
"aws-sqs-queue-size",
"cert-file",
"disk",
"elasticsearch",
"file-age",
"file-size",
"http",
"jmx-jolokia",
"load",
"log",
"mailq",
"masterha",
"memcached",
"mysql",
"ntpoffset",
"postgresql",
"procs",
"redis",
"solr",
"ssh",
"tcp",
"uptime",
}