-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot install 3.0 with new Symfony project #300
Comments
I think the recipe for 2.x is being used: https://github.com/symfony/recipes-contrib/tree/main/liip/monitor-bundle/2.6 You'll have to remove the adjustments the recipe made and manually enable. (new bundle class is |
Thanks. The recipe system is one of the weakest parts of the Symfony ecosystem. It seems like it'd be so much easier for bundle developers to configure the recipe within their bundle, and when it's published to packagist that Symfony automatically takes care of it. |
I have opened a PR to update the recipe for 3.0: symfony/recipes-contrib#1605 |
Thanks! How about adding the routing and a small config file that at least has a basic health check working that is installed with the recipe? Should I be following the instructions in 3.0 or in master? 3.0 has a lot of details, but doesn't have routing instructions. The default config listed in the 3.0 instructions has nulls for integers, which fail. I'm adding this here because I think adding the package and routing config to the recipe would be very helpful. |
I removed the routing from v3. There is an OhDear base controller that can be extended and configure routing for. At this point, no generic health check controller. I may revisit adding later. |
I'm still not quite following how to integrate it with OhDear. Doesn't OhDear need an API endpoint to check? If I need something like https://packagist.org/packages/bitbirddev/oh-dear-bundle, could you add it to suggests? The CLI is working (YAY!), but I miss the /monitor/health route that was in Version 2. Can you document how to re-add it? @xabbuh thanks for updating the recipe! What do you think of adding /config/packages/liip_monitor.yaml as well, with something like this? # config/packages/liip_monitor.yaml
liip_monitor:
checks:
system_memory_usage: true # warn @ 70%, fail @ 90%
system_disk_usage: true # warn @ 70%, fail @ 90%
# requires configuration
system_free_disk_space:
warning: 20GB
critical: 10GB
system_reboot: true
system_load_average:
1_minute: true # warn @ 70%, fail @ 90%
5_minute: true # warn @ 70%, fail @ 90%
15_minute: true # warn @ 70%, fail @ 90%
apcu_memory_usage: true # warn @ 70%, fail @ 90%
apcu_fragmentation: true # warn @ 70%, fail @ 90%
opcache_memory_usage: true # warn @ 70%, fail @ 90%
php_version: true
composer_audit: true
symfony_version: true
dbal_connection: true # auto creates a check for each dbal connection
# dbal_connection: default # use specific dbal connection
# dbal_connection: [default, alternate] # use specific dbal connections Then we can update the installation demo to something similar to the commands in the first message of this thread. |
https://github.com/liip/LiipMonitorBundle/tree/3.x?tab=readme-ov-file#ohdear-application-monitoring shows how to add this endpoint. This appears to be an alternative to this bundle (that is ohdear specific)
I'd be ok with this but we should comment everything out to let users uncomment if they want to enable a specific feature. For instance, system reboot only works on certain linux servers.
Yes, that's a good idea. |
Thanks! It appears that OhDear only offers paid plans (after a free trial). Are there other integrations for open source projects that are free? I'll follow the OhDear instructions regardless. |
@tacman OhDear is totally worth the money. |
I have lots of demo sites, sometimes just to prove that a bundle is installable. (You'd be amazed how many aren't!) For example, https://barcode-demo.survos.com/ is a trivial site that uses a barcode bundle I wrote (that wraps someone else's barcode library). So I don't want to pay to monitor this. For commercial sites, I'll check out OhDear. I'm doing PWA's more now, and I often want to know if the site is up and if not, to disable things like form submits and logins. While there's a mechanism to check for a network, that's not the same as checking that the server is working. My plan is to regularly monitor the site and dispatch an event that let's the user know that the server part of the site isn't available. Like seeing "offline", but you might be online but not be able to see the server. This bundle has many more tests, there's a much simpler bundle but it doesn't work with postgres. |
Installing shows this error:
Enabling assets in framework and setting enabled to true in monitor.yaml does not change the error, so I didn't include them in the instructions.
The text was updated successfully, but these errors were encountered: