diff options
| author | Baitinq <[email protected]> | 2024-05-30 23:16:03 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2024-05-30 23:16:03 +0200 |
| commit | 91549ef7fa6c4525c8b44a4e65eb97708d1f853f (patch) | |
| tree | 612d94d7bad54108b98c8620bbf738fdb44e8d9e | |
| parent | fs-tracer: send requests to new intake with api key (diff) | |
| download | fs-tracer-91549ef7fa6c4525c8b44a4e65eb97708d1f853f.tar.gz fs-tracer-91549ef7fa6c4525c8b44a4e65eb97708d1f853f.tar.bz2 fs-tracer-91549ef7fa6c4525c8b44a4e65eb97708d1f853f.zip | |
fs-tracer: change api endpoint
| -rw-r--r-- | fs-tracer/src/main.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs-tracer/src/main.rs b/fs-tracer/src/main.rs index d126771..d974d66 100644 --- a/fs-tracer/src/main.rs +++ b/fs-tracer/src/main.rs @@ -18,7 +18,7 @@ async fn main() -> Result<(), anyhow::Error> { env::var("FS_TRACER_SERVER_HOST").expect("FS_TRACER_SERVER_HOST must be set"); let fs_tracer_api_key = env::var("FS_TRACER_API_KEY").expect("FS_TRACER_API_KEY must be set"); - let url = format!("http://{fs_tracer_server_host}:9999/file/"); + let url = format!("http://{fs_tracer_server_host}:9999/api/v1/file/"); // Bump the memlock rlimit. This is needed for older kernels that don't use the // new memcg based accounting, see https://lwn.net/Articles/837122/ @@ -101,11 +101,13 @@ async fn main() -> Result<(), anyhow::Error> { .set("API_KEY", &thread_api_key) .send_string(&format!( r#" -{{ - "timestamp": "{}", - "absolute_path": "/tmp/test.txt", - "contents": "Hello, world!" -}} +[ + {{ + "timestamp": "{}", + "absolute_path": "/tmp/test.txt", + "contents": "Hello, world!" + }} +] "#, chrono::Utc::now().to_rfc3339() )) |