Closed igordeveloper closed 1 year ago
Could you please help me if i'm missing some configuration?
Thank you.
Hi @igordeveloper, sorry for the delay - I've been on vacation.
Yes, you'll need to add an alias as it's trying to match the route on the class name.
Hi @igordeveloper, sorry for the delay - I've been on vacation.
Yes, you'll need to add an alias as it's trying to match the route on the class name.
Hi @kbond , no worries.
I add a alias as below, and now i have 2 entries 'Custom check' http://localhost:8000/monitor/health
monitor.check.custom:
class: App\Diagnostics\Check\CustomCheck
arguments:
- [ xhprof, apc, memcache ]
tags:
- { name: liip_monitor.check, alias: custom}
One of them gives an error because the route is created with 'monitor.check.mercure' and the another works.
Is there any other way to fix this, besides inserting autoconfigure: false for this service? Because my app's _defaults is set to true.
Thank you again!
Is there any other way to fix this, besides inserting autoconfigure: false for this service
I don't think so. Some work needs to be done with how checks are auto-configured.
Is there any other way to fix this, besides inserting autoconfigure: false for this service
I don't think so. Some work needs to be done with how checks are auto-configured.
Sorry, needs to be done in my configuration or bundle side?
Right now, you'll need to add autoconfigure: false
to your config to avoid 2 instances being registered:
monitor.check.custom:
class: App\Diagnostics\Check\CustomCheck
autoconfigure: false
arguments:
- [ xhprof, apc, memcache ]
tags:
- { name: liip_monitor.check, alias: custom}
The bundle needs some work to avoid needing this.
Right now, you'll need to add
autoconfigure: false
to your config to avoid 2 instances being registered:monitor.check.custom: class: App\Diagnostics\Check\CustomCheck autoconfigure: false arguments: - [ xhprof, apc, memcache ] tags: - { name: liip_monitor.check, alias: custom}
The bundle needs some work to avoid needing this.
ok, perfect.
thank you for the help, right now, i'll use with autoconfigure:false .
Hi @kbond .
do you have a estimate for this work in the bundle? Can i help with a pull request suggest for this? thanks.
I'm not immediately seeing a great path to a solution. The following is true:
liip_monitor.check
tags (to add to multiple groups).CheckInterface
's auto added to the default group (and we don't use the api).Of course, I'm open to ideas but autoconfigure: false
feels like the simplest solution to me.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed. Feel free to re-open if it is still relevant.
Hi guys.
I'm using the configuration autoconfigure:true in my app, and the 'liip_monitor.check''check is being tagged automatically. When I' run the Health check page the check works fine, but, when i try repeat a individual custom check in the button GO the app receives the error below with route not found.
No route found for "POST http://localhost:8000/monitor/health/run/App/Diagnostics/Check/CustomCheck" (from "http://localhost:8000/monitor/health/")
My configurations:
Custom check class