Open cooperlees opened 2 days ago
Making a tiny-http hello world server I get Context-Type
:
+ let server = Server::http("0.0.0.0:8000").unwrap();
+
+ for request in server.incoming_requests() {
+ println!(
+ "received request! method: {:?}, url: {:?}, headers: {:?}",
+ request.method(),
+ request.url(),
+ request.headers()
+ );
+
+ let response = Response::from_string("hello world");
+ request.respond(response)?;
+ }
+
Ok(())
}
crl-m1:~ cooper$ curl -v http://127.0.0.1:8000/
* Trying 127.0.0.1:8000...
* Connected to 127.0.0.1 (127.0.0.1) port 8000
> GET / HTTP/1.1
> Host: 127.0.0.1:8000
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Server: tiny-http (Rust)
< Date: Tue, 19 Nov 2024 03:43:03 GMT
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 11
<
* Connection #0 to host 127.0.0.1 left intact
hello world
So might have to open an issue and read the code for prometheus_exporter ...
Workaround: Add a fallback_scrape_protocol
- job_name: 'monitord-exporter'
scrape_interval: 120s
+ fallback_scrape_protocol: 'PrometheusText0.0.4'
static_configs:
- targets:
- auv6:1
Have logged a bug with prometheues_exporter crate here: https://github.com/AlexanderThaller/prometheus_exporter/issues/44
Will see if we can work on a fix ...
Need to workout and fix - Probably need to investigate
prometheus_exporter
crate here ...Working vs. Non Working: