Closed BLACK4585 closed 5 months ago
Update:
I changed the HAKA_REMOTE_WRITE_URL
to a numerical IP, so just the IP of the machine and now I'm getting this:
ts=2023-08-31T21:42:08.8857236Z level=Info host=80eb58f7ad13 msg=received 1 heartbeats
VanillaHttpException (HttpExceptionRequest Request {
host = "192.168.178.216"
port = 3000
secure = False
requestHeaders = [("Authorization","<REDACTED>"),("X-Machine-Name","JonathanPC"),("Content-Type","application/json; charset=utf-8")]
path = "/api"
queryString = ""
method = "POST"
proxy = Nothing
rawBody = False
responseTimeout = ResponseTimeoutDefault
redirectCount = 10
requestVersion = HTTP/1.1
proxySecureMode = ProxySecureWithConnect
}
(StatusCodeException (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("Content-Type","text/plain; charset=utf-8"),("X-Content-Type-Options","nosniff"),("Date","Thu, 31 Aug 2023 21:42:08 GMT"),("Content-Length","19")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose, responseOriginalRequest = Request {
}) "404 page not found\n"))
192.168.178.207 - - [31/Aug/2023:21:42:08 +0000] "POST /api/v1/users/current/heartbeats.bulk HTTP/1.1" 202 - "" "wakatime/v1.78.0 (windows-10.0.22621.2215-unknown) go1.21.0 Unknown/0"
Is this now an error by Wakapi? Normally the API should be the same, shouldn't it?
Did you get to the bottom of this @BLACK4585? I'm trying to do the same thing but doesn't work for me either.
Nope sadly not..
Sorry for the delay on this folks. This seems to be a compatibility issue between the Wakatime server and Wakapi.
@BLACK4585 Could you confirm that you're able to forward the heartbeats to the Wakatime server? If yes then relevant endpoint is not the same between wakapi and wakatime.
I solved it now by changing HAKA_REMOTE_WRITE_URL
to https://wakapi.domain.tld/api/compat/wakatime/v1/users/current/heartbeats.bulk
.
Maybe you can add this to the Readme.
I solved it now by changing
HAKA_REMOTE_WRITE_URL
tohttps://wakapi.domain.tld/api/compat/wakatime/v1/users/current/heartbeats.bulk
. Maybe you can add this to the Readme.
Thanks for the update, I'm going to try it later today, did you need to set a token too?
It works great and of course it needs the token!
Thanks a lot @BLACK4585 for the find. I've added this on the README.
Hey, I'm trying to forward all received heartbeats to wakapi. For this, I set
HAKA_REMOTE_WRITE_URL
first tohttp://localhost:3000/api
, then tohttp://localhost:3000/api/compat/wakatime/v1
after the first option didn't work. Also, I added theHAKA_REMOTE_WRITE_TOKEN
. But when I send heartbeats to hakatime, I get this error in the console:All containers are in the
bridge
network.Maybe somebody can help me, thank you!