Skip to content

Commit fa463e4

Browse files
author
Mina Naguib
committed
Improved on some README goodness
1 parent b758f28 commit fa463e4

1 file changed

Lines changed: 76 additions & 4 deletions

File tree

README.md

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,81 @@ A config file example:
3939
user: chuck
4040
source: proxy
4141

42-
Using the example config above, the following request:
4342

44-
GET /metrics?service=service-a"
43+
### Usage
44+
#### /
4545

46-
will fetch the metrics from the endpoint defined by ** service-a ** (http://localhost:9100/metrics),
47-
and apply the labels (user="mina", source="proxy") to each metric in the respons
46+
Returns the build information of the service
47+
48+
49+
** Example **
50+
51+
Request
52+
53+
HTTP GET /
54+
55+
Response
56+
57+
{
58+
branch: "master",
59+
buildDate: "20151216-14:01:45",
60+
buildUser: "@outbrain-nix",
61+
goVersion: "1.5.1",
62+
revision: "b758f28",
63+
version: "0.1"
64+
}
65+
66+
#### /metrics
67+
Accept Headers: application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.7, text/plain
68+
69+
Endpoint responsible for scraping the configured services
70+
71+
72+
###### Query Parameters
73+
| parameter | required | description | e.g |
74+
|-----------|----------|:--------------------|-----|
75+
| service | yes |service name for the configured endpoint in the config file | service-a |
76+
| labels | no |delimited k/value label-set for ad-hoc application | user|mina,manager|gil |
77+
78+
*labels BNF:*
79+
80+
<label> ::= <key"|"value>
81+
<labels> ::= <label>{"," <label> }
82+
83+
84+
** Example **
85+
86+
Request
87+
88+
HTTP GET /metrics/service=service-a
89+
90+
91+
Response
92+
93+
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
94+
# TYPE go_gc_duration_seconds summary
95+
go_gc_duration_seconds{quantile="0"} 0.000223927
96+
go_gc_duration_seconds{quantile="0.25"} 0.00033225800000000004
97+
go_gc_duration_seconds{quantile="0.5"} 0.00043606200000000003
98+
go_gc_duration_seconds{quantile="0.75"} 0.000620278
99+
go_gc_duration_seconds{quantile="1"} 0.007438669
100+
go_gc_duration_seconds_sum 0.06762654900000001
101+
go_gc_duration_seconds_count 109
102+
103+
104+
Request
105+
106+
HTTP GET /metrics/service=service-a&labels=user|mina
107+
108+
109+
Response
110+
111+
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
112+
# TYPE go_gc_duration_seconds summary
113+
go_gc_duration_seconds{quantile="0",user="mina"} 0.000223927
114+
go_gc_duration_seconds{quantile="0.25",user="mina"} 0.00033225800000000004
115+
go_gc_duration_seconds{quantile="0.5",user="mina"} 0.00043606200000000003
116+
go_gc_duration_seconds{quantile="0.75",user="mina"} 0.000620278
117+
go_gc_duration_seconds{quantile="1",user="mina"} 0.007438669
118+
go_gc_duration_seconds_sum 0.06762654900000001
119+
go_gc_duration_seconds_count 109

0 commit comments

Comments
 (0)