Ozzzkar
Ozzzkar•2mo ago

Post auth log example not working

Hi, I tried to use the post auth log example here with Zitadel v4.0.0-rc.2 https://github.com/zitadel/actions/blob/main/examples/post_auth_log.js however nothing shows up in the logs. Tried with both text format and json, and enabled the debug level logging.
Log:
Formatter:
Format: text
Level: debug
Log:
Formatter:
Format: text
Level: debug
18 Replies
Ozzzkar
OzzzkarOP•2mo ago
or if there's another way to get useful audit logs when stuff is happening (other than just http request logs) I tried adding an action that uses zitadel/http, but it seems this doesn't run either, cause there was no http request received on the server side. Could it be that Zitadel v4 only enables Actions v2 and not v1 and my Actions added to the Actions tab in the top menu are v1? when I click Actions in the top menu, it says
Actions V2 a new, improved version of Actions is now available. The current version is still accessible, but our future development will focus on the new one, which will eventually replace the current version.
and when I click Default Settings in the upper right, then click Actions in the left menu, it says
You are currently using the new Actions V2, which is in beta. The previous Version 1 is still available but will be discontinued in the future. Please report any issues or feedback.
a bit confusing. Also I get [internal] An internal error occurred (QUERY-y2u7vctrha) when I open this Actions page from the left menu I looked through the options in the admin console but I couldn't find a way to switch between v1/v2 or enable/disable actions v1/v2. Also nothing in the config file: https://zitadel.com/docs/self-hosting/manage/configure
Rajat
Rajat•2mo ago
hey @Ozzzkar thnaks for raising this, checking
Rajat
Rajat•2mo ago
hey @Ozzzkar both v1 and v2 should be available for now, you can enable/disable actions v2 from feature flag 🙂
No description
Rajat
Rajat•2mo ago
Also I get [internal] An internal error occurred (QUERY-y2u7vctrha) when I open this Actions page from the left menu can you pls share the link?
Ozzzkar
OzzzkarOP•2mo ago
I can't see that option anywhere. Maybe it was moved in v4? I'm using v4.0.0-rc.3 right now using self-hosted Zitadel. https://my-zitadel-domain.example.com/ui/console/instance?id=actions still the same with the latest rc.4 and 4.0.0 GA version, actions aren't running and I still can't find this option anywhere, which page is it on? @Rajat
Rajat
Rajat•2mo ago
hey @Ozzzkar can I see some screenshots, what exactly ot running?. Is it action v2 pr v2? What did yoiu try? What did not work?
Ozzzkar
OzzzkarOP•2mo ago
No description
No description
No description
No description
Ozzzkar
OzzzkarOP•2mo ago
enabled those many actions, but no actions running and no logs
No description
Rajat
Rajat•2mo ago
hey @Ozzzkar thanks! looking into it
Ozzzkar
OzzzkarOP•2mo ago
thanksss, appreciated! i could also open an issue on github 🙂 but it kinda feels like it's something silly however I installed rc.2 from scratch a few days ago and now i'm at rc.4
Rajat
Rajat•2mo ago
ahh
Ozzzkar
OzzzkarOP•2mo ago
so i think it should work better out of the box
Rajat
Rajat•2mo ago
let me deploy v4rc4 and see can you pls share your docker compose with me(remove any sensitive info/domains)
Rajat
Rajat•2mo ago
I just deployed it on my docker-compose
Ozzzkar
OzzzkarOP•2mo ago
let's take it here 😄 the other thread was an issue reported by another person @Rajat i'm now able to see logs from action runs (written to stdout). I think it was basically because I was searching for the wrong keywords in the logs before. I now search for took because that's the only way to filter out all other warnings about missing translations (for English!?) that are written to stdout. Probably something that should be fixed. Anyway here's an example:
2025-07-30 19:38:07.683
{"logDate":"2025-07-30T11:38:07.68369996Z","took":1267859,"message":"action run succeeded","logLevel":"info","instanceId":"329851880840626827"}

2025-07-30 19:38:07.683
{"logDate":"2025-07-30T11:38:07.683631852Z","took":0,"message":"successful login: username/redacted, timestamp/2025-07-30 11:38:04.611190808 +0000 UTC, appID/329851884011717259, remoteAddr/10.0.12.25:21698, request/{\"method\":\"GET\",\"url\":\"/login/externalidp/callback?iss=https%3A%2F%2Fcustomer.example.com%2F%7E\u0026code=VgKG8nT9mkqHTMwBTi3LNkS1hg8hL8Fl\u0026state=331147820113330508\",\"proto\":\"HTTP/1.1\",\"contentLength\":0,\"host\":\"zitadel-domain.example.com\",\"form\":{\"iss\":[\"https://customer.example.com/~\"],\"code\":[\"VgKG8nT9mkqHTMwBTi3LNkS1hg8hL8Fl\"],\"state\":[\"331147820113330508\"]},\"postForm\":{},\"remoteAddr\":\"10.0.12.25:21698\",\"headers\":{\
[..]
"Referer\":[\"https://customer.example.com/\"],\"Sec-Fetch-Mode\":[\"","logLevel":"info","instanceId":"329851880840626827"}

2025-07-30 19:38:07.682
{"logDate":"2025-07-30T11:38:07.682432123Z","took":0,"message":"action run started","logLevel":"info","instanceId":"329851880840626827"}
2025-07-30 19:38:07.683
{"logDate":"2025-07-30T11:38:07.68369996Z","took":1267859,"message":"action run succeeded","logLevel":"info","instanceId":"329851880840626827"}

2025-07-30 19:38:07.683
{"logDate":"2025-07-30T11:38:07.683631852Z","took":0,"message":"successful login: username/redacted, timestamp/2025-07-30 11:38:04.611190808 +0000 UTC, appID/329851884011717259, remoteAddr/10.0.12.25:21698, request/{\"method\":\"GET\",\"url\":\"/login/externalidp/callback?iss=https%3A%2F%2Fcustomer.example.com%2F%7E\u0026code=VgKG8nT9mkqHTMwBTi3LNkS1hg8hL8Fl\u0026state=331147820113330508\",\"proto\":\"HTTP/1.1\",\"contentLength\":0,\"host\":\"zitadel-domain.example.com\",\"form\":{\"iss\":[\"https://customer.example.com/~\"],\"code\":[\"VgKG8nT9mkqHTMwBTi3LNkS1hg8hL8Fl\"],\"state\":[\"331147820113330508\"]},\"postForm\":{},\"remoteAddr\":\"10.0.12.25:21698\",\"headers\":{\
[..]
"Referer\":[\"https://customer.example.com/\"],\"Sec-Fetch-Mode\":[\"","logLevel":"info","instanceId":"329851880840626827"}

2025-07-30 19:38:07.682
{"logDate":"2025-07-30T11:38:07.682432123Z","took":0,"message":"action run started","logLevel":"info","instanceId":"329851880840626827"}
Rajat
Rajat•2mo ago
hey @Ozzzkar glad it worked out 🙂
Gigi the Giraffe (Zitadel)
🎉 Looks like you just helped out another community member! Thanks for being so helpful <@158253511513997312>! You're now one step closer to leveling up—keep up the amazing peer support! 🚀

Did you find this page helpful?