aiai-bot commented on issue #3956: URL: https://github.com/apache/hertzbeat/issues/3956#issuecomment-3744187113
<!-- code-pr-reviewer --> Based on the repository analysis, your requirements can already be achieved through custom monitoring templates: **1. Dynamic app ID retrieval**: HertzBeat supports inter-metric parameter passing using `^o^field^o^` syntax. You can create a custom template with: - First metric group (priority 0): Call YARN REST API `/ws/v1/cluster/apps` and parse the app ID using `parseType: jsonPath` - Subsequent metric groups: Reference the extracted app ID via `^o^appId^o^` in Flink REST API calls Reference: `home/docs/advanced/extend-http-example-token.md` **2. form-urlencoded payload**: You can set `Content-Type: application/x-www-form-urlencoded` in the `headers` field. However, the `payload` requires manual URL encoding (e.g., `key1=value1&key2=value2`) - automatic JSON-to-form conversion is not currently supported. See: `hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/http/HttpCollectImpl.java:776-813` **Questions to clarify**: 1. Have you tried creating a custom template with `^o^field^o^` parameter passing? 2. What is your YARN REST API endpoint for querying apps by name, and what's the response structure? 3. For form-urlencoded, would manual payload encoding work for your use case? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
