-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathall.go
93 lines (75 loc) · 1.51 KB
/
all.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
package main
import (
"time"
)
func InitAllInputs() {
AddInput("cpu", func() Input {
return &CPUStats{
PerCPU: true,
TotalCPU: true,
ps: nil,
}
})
AddInput("mem", func() Input {
return &MemStats{ps: nil}
})
AddInput("disk", func() Input {
return &DiskStats{ps: nil}
})
AddInput("http_response", func() Input {
return &HTTPResponse{}
})
AddInput("apache", func() Input {
return &Apache{}
})
AddInput("ping", func() Input {
return &Ping{
pingHost: hostPinger,
PingInterval: 1.0,
Count: 1,
Timeout: 1.0,
}
})
AddInput("net_response", func() Input {
return &NetResponse{}
})
AddInput("tomcat", func() Input {
return &Tomcat{
URL: "http://127.0.0.1:8080/manager/status/all?XML=true",
Username: "tomcat",
Password: "s3cret",
Timeout: Duration{Duration: 5 * time.Second},
}
})
AddInput("jboss", func() Input {
return &JBoss{
client: &RealHTTPClient{},
}
})
AddInput("jboss4", func() Input {
return &JBoss4{
client: &RealHTTPClient{},
}
})
AddInput("system", func() Input {
return &SystemStats{}
})
AddInput("netstat_connections", func() Input {
return &NetStatConnections{}
})
AddInput("processes", func() Input {
return &Processes{}
})
AddInput("diskio", func() Input {
return &DiskIOStats{}
})
AddInput("net", func() Input {
return &NetIOStats{}
})
AddInput("swap", func() Input {
return &SwapStats{}
})
}
func InitAllOutputs() {
AddOutput("influxdb", func() Output { return newInflux() })
}