koality/shopwareplugin

此插件用于通过koality.io监控商店的业务指标。

安装: 1

依赖: 0

建议者: 0

安全: 0

星级: 9

关注者: 3

分支: 4

开放问题: 1

类型:shopware-platform-plugin

1.1.0 2021-08-11 11:15 UTC

This package is not auto-updated.

Last update: 2024-09-21 00:44:27 UTC


README

Scrutinizer Code Quality

您可以在Shopware插件商店下载此插件。

koality.io Shopware6 插件

此插件可用于持续监控Shopware商店的业务指标。我们关于如何监控Shopware商店的想法可以在我们的杂志中找到。如何监控Shopware商店

布局 (koality.io / 抽象)

Orders per hour

Updatable plugins

指标

以下指标已实现

  • 每小时最低订单数 - 如果过去一小时内的订单数量低于给定的阈值,则此检查失败。该检查提供两个时间间隔:高峰时间和正常购物时间。这是为了最小化误报。

  • 最大打开购物车数 - 如果打开的购物车太多,则检查失败。这通常发生在支付失败,客户无法完成购买过程时。

  • 最低活跃产品数 - 如果应该中的活跃产品不足,则此检查失败。这有助于找到导入错误。

  • 最大需要更新的插件数 - 如果需要更新的插件太多,则此检查失败。这有助于找到安全问题。

插件工作原理

该插件为Shopware前端提供了受秘密令牌保护的JSON端点。端点返回商店的健康状态。健康状态是“每小时订单数”等业务指标和“设备上的空间”等服务器指标的组合。

示例

{
    "status": "fail",
    "output": "Some Shopware6 health metrics failed: ",
    "checks": {
        "carts.open.too_many": {
            "status": "fail",
            "output": "There are too many open carts at the moment.",
            "limit": 30,
            "limitType": "max",
            "observedValue": 60,
            "observedUnit": "carts",
            "metricType": "time_series_numeric"
        },
        "products.active": {
            "status": "pass",
            "output": "There are enough active products in your shop.",
            "limit": 0,
            "limitType": "min",
            "observedValue": 1,
            "observedUnit": "products",
            "metricType": "time_series_numeric"
        },
        "plugins.updatable": {
            "status": "pass",
            "output": "Not too many plugins need to be updated.",
            "limit": 0,
            "limitType": "max",
            "observedValue": 0,
            "observedUnit": "plugins",
            "metricType": "time_series_numeric"
        },
        "orders.too_few": {
            "status": "fail",
            "output": "There were too few orders within the last hour.",
            "limit": 20,
            "limitType": "min",
            "observedValue": 0,
            "observedUnit": "orders",
            "metricType": "time_series_numeric"
        }
    },
    "info": {
        "creator": "koality.io Shopware Plugin",
        "version": "1.0.0",
        "plugin_url": "https:\/\/www.koality.io\/plugins\/shopware"
    }
}

koality.io可以解释此格式,如果检查失败,则发出警报。目前,需要由Shopware后端做出失败或通过的决定。在未来的版本中,这可以在koality.io中完成。

安装后,API端点可在此处找到

https://myshop.com/_koality/sales/metrics/<api_key>

Shopware健康端点的格式正在实现此标准(仍为RFC)

https://tools.ietf.org/html/draft-inadarei-api-health-check-05

配置

对于配置,我们使用Shopware 6 config.xml文件

待办事项

目前,此插件只是一个概念验证。如果Shopware 6专家将其重构为最喜爱的电子商务解决方案的最佳监控插件,我们将感到非常高兴。

  • 检查Shopware是否需要更新

  • 将插件上传到Shopware市场。

  • 仅收集状态,不收集元数据。这可能需要在数据高度机密的情况下使用。

  • 将待办事项移动到GitHub问题

  • I18n:插件应存在德语和英语版本。

  • 检查插件是否需要更新

  • 结果JSON必须与IETF健康检查格式100%兼容。

  • 完成config.xml文件中的描述

  • 添加许可证

常见问题解答

  • 此插件也适用于Leankoala吗? 是的,它将生成与IETF兼容的健康检查输出,Leankoala也可以读取。

  • 也会有Shopware5插件吗? 是的,但首先我们将实现当前版本在最受欢迎的商店框架上。

  • 我可以自己实现插件吗? 当然,只需给我们打电话,我们将为您提供所需的所有信息。