prometheus_exporter 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f90837db285b202f06d0f7360fe0260435a51457361cfbe505e473b573367fc6
|
4
|
+
data.tar.gz: 9ab075f33187b5cc7563e1236572870d8ce98b421fec46d989b7b00d968ef241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b34b7b622d684ea9b25f4e8b223cd69b11df7686834a72b0e7f899a1b90bc691194a6bf7695ac0778dd88dba860245981977c67f10b214a9b5f9dcfbf0f31c7
|
7
|
+
data.tar.gz: 2ecc3d186fa4de3bce308b87f5cab0b1c95f336efc72819e08e6cd1258f2b5ef5b381d8347d686e85eb1a18ac8890d4230479e3f9234889d0631ec4034beab2a
|
@@ -158,6 +158,7 @@ class PrometheusExporter::Client
|
|
158
158
|
@socket = TCPSocket.new @host, @port
|
159
159
|
@socket.write("POST /send-metrics HTTP/1.1\r\n")
|
160
160
|
@socket.write("Transfer-Encoding: chunked\r\n")
|
161
|
+
@socket.write("Host: #{@host}\r\n")
|
161
162
|
@socket.write("Connection: Close\r\n")
|
162
163
|
@socket.write("Content-Type: application/octet-stream\r\n")
|
163
164
|
@socket.write("\r\n")
|
@@ -23,19 +23,23 @@ module PrometheusExporter::Server
|
|
23
23
|
@total_sessions.observe(0)
|
24
24
|
@total_bad_metrics.observe(0)
|
25
25
|
|
26
|
-
access_log =
|
26
|
+
access_log, logger = nil
|
27
|
+
|
27
28
|
if verbose
|
28
29
|
access_log = [
|
29
30
|
[$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT],
|
30
31
|
[$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT],
|
31
32
|
]
|
32
33
|
logger = WEBrick::Log.new($stderr)
|
34
|
+
else
|
35
|
+
access_log = []
|
36
|
+
logger = WEBrick::Log.new("/dev/null")
|
33
37
|
end
|
34
38
|
|
35
39
|
@server = WEBrick::HTTPServer.new(
|
36
40
|
Port: port,
|
37
41
|
Logger: logger,
|
38
|
-
AccessLog: access_log
|
42
|
+
AccessLog: access_log,
|
39
43
|
)
|
40
44
|
|
41
45
|
@collector = collector || Collector.new
|