orangeCatDeveloper opened a new issue, #4313:
URL: https://github.com/apache/hertzbeat/issues/4313

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   The `Push Style Monitor` (`app-push.yml`) can be created but every collect 
cycle fails: its collector posts to `/api/push`, an endpoint that no longer 
exists — #3204 replaced the push module's custom endpoint with the Prometheus 
pushgateway style API (`/api/push/prometheus/**`) and deleted 
`PushController`/`PushService`, but the monitor template, `PushProtocol`'s 
default uri and the `extend-push` docs were left pointing at the removed 
endpoint.
   
   Verified on current master:
   
   ```
   $ curl -X POST http://localhost:1157/api/push -d '{}' -H 'Content-Type: 
application/json'
   HTTP 404
   
   collector log after adding a push monitor:
   [1000000000-push-metrics] INFO MetricsCollect - [Collect Failed, Run 203ms] 
Reason: StatusCode 404
   ```
   
   References still pointing at the removed endpoint:
   
   - `hertzbeat-manager/src/main/resources/define/app-push.yml` (`uri: 
/api/push`)
   - `hertzbeat-common-core/.../job/protocol/PushProtocol.java` (`private 
String uri = "/api/push"`)
   - `home/docs/advanced/extend-push.md` (+ zh-CN/ja-JP i18n copies)
   - `app-push` entry in the help-docs task list #1795
   
   ### Expected Behavior
   
   Either the template works, or it is removed. Two options:
   
   1. **Remove the leftovers**: drop `app-push.yml`, `PushProtocol`, 
`PushCollectImpl` and the `extend-push` docs, since the Prometheus pushgateway 
API is the supported push path now. Simple, but loses the UI flow where users 
define custom metric fields for a push monitor.
   2. **Rewire the template** to the new `/api/push/prometheus/{job}` endpoint 
so the push-style monitor works again on top of the pushgateway implementation.
   
   I'm happy to submit a PR for whichever direction the community prefers. cc 
@tomsun28
   
   ### Steps To Reproduce
   
   1. Start HertzBeat from current master
   2. Add a `Push Style Monitor` (host: 127.0.0.1, port: 1157, any metrics 
fields)
   3. Watch the collect logs / metrics page: every cycle fails with `StatusCode 
404`
   
   ### Environment
   
   ```markdown
   HertzBeat version(s): master (2.0-SNAPSHOT)
   ```
   


-- 
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]

Reply via email to