diff options
Diffstat (limited to 'collector/ganglia/format.go')
-rw-r--r-- | collector/ganglia/format.go | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/collector/ganglia/format.go b/collector/ganglia/format.go deleted file mode 100644 index 89ec044..0000000 --- a/collector/ganglia/format.go +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | // Copyright 2015 The Prometheus Authors | ||
2 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
3 | // you may not use this file except in compliance with the License. | ||
4 | // You may obtain a copy of the License at | ||
5 | // | ||
6 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
7 | // | ||
8 | // Unless required by applicable law or agreed to in writing, software | ||
9 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
11 | // See the License for the specific language governing permissions and | ||
12 | // limitations under the License. | ||
13 | |||
14 | // Package ganglia provides types for unmarshalling gmond's XML output. | ||
15 | // | ||
16 | // Not used elements in gmond's XML output are commented. | ||
17 | // In case you want to use them, please change the names so that one | ||
18 | // can understand without needing to know what the acronym stands for. | ||
19 | package ganglia | ||
20 | |||
21 | import "encoding/xml" | ||
22 | |||
23 | // ExtraElement describes EXTRA_ELEMENT elements. | ||
24 | type ExtraElement struct { | ||
25 | Name string `xml:"NAME,attr"` | ||
26 | Val string `xml:"VAL,attr"` | ||
27 | } | ||
28 | |||
29 | // ExtraData describes EXTRA_DATA elements. | ||
30 | type ExtraData struct { | ||
31 | ExtraElements []ExtraElement `xml:"EXTRA_ELEMENT"` | ||
32 | } | ||
33 | |||
34 | // Metric describes METRIC elements. | ||
35 | type Metric struct { | ||
36 | Name string `xml:"NAME,attr"` | ||
37 | Value float64 `xml:"VAL,attr"` | ||
38 | /* | ||
39 | Unit string `xml:"UNITS,attr"` | ||
40 | Slope string `xml:"SLOPE,attr"` | ||
41 | Tn int `xml:"TN,attr"` | ||
42 | Tmax int `xml:"TMAX,attr"` | ||
43 | Dmax int `xml:"DMAX,attr"` | ||
44 | */ | ||
45 | ExtraData ExtraData `xml:"EXTRA_DATA"` | ||
46 | } | ||
47 | |||
48 | // Host describes HOST elements. | ||
49 | type Host struct { | ||
50 | Name string `xml:"NAME,attr"` | ||
51 | /* | ||
52 | Ip string `xml:"IP,attr"` | ||
53 | Tags string `xml:"TAGS,attr"` | ||
54 | Reported int `xml:"REPORTED,attr"` | ||
55 | Tn int `xml:"TN,attr"` | ||
56 | Tmax int `xml:"TMAX,attr"` | ||
57 | Dmax int `xml:"DMAX,attr"` | ||
58 | Location string `xml:"LOCATION,attr"` | ||
59 | GmondStarted int `xml:"GMOND_STARTED",attr"` | ||
60 | */ | ||
61 | Metrics []Metric `xml:"METRIC"` | ||
62 | } | ||
63 | |||
64 | // Cluster describes CLUSTER elements. | ||
65 | type Cluster struct { | ||
66 | Name string `xml:"NAME,attr"` | ||
67 | /* | ||
68 | Owner string `xml:"OWNER,attr"` | ||
69 | LatLong string `xml:"LATLONG,attr"` | ||
70 | Url string `xml:"URL,attr"` | ||
71 | Localtime int `xml:"LOCALTIME,attr"` | ||
72 | */ | ||
73 | Hosts []Host `xml:"HOST"` | ||
74 | } | ||
75 | |||
76 | // Ganglia describes the top-level XML structure. | ||
77 | type Ganglia struct { | ||
78 | XMLNAME xml.Name `xml:"GANGLIA_XML"` | ||
79 | Clusters []Cluster `xml:"CLUSTER"` | ||
80 | } | ||