• EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Esta tradução de máquina é fornecida para sua comodidade.

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

Criar um problema

Insights de negócios Magento

Nosso dashboard de insights de negócios Magento fornece uma visão abrangente do desempenho do seu aplicativo de comércio eletrônico Magento. Com o dashboard, você pode acompanhar facilmente as principais métricas de negócios, como receitas em risco, pedidos em risco devido a período de inatividade e baixo desempenho do sistema. Você também pode usar o dashboard para diagnosticar problemas no desempenho do seu aplicativo e otimizar seu código.

Nosso dashboard de insights de negócios Magento oferece uma visão central dos dados do seu aplicativo Magento.

Para iniciar o monitoramento do seu aplicativo Magento no New Relic, siga estas etapas para enviar os dados do seu aplicativo para o New Relic e visualizá-los no dashboard de insights de negócios do Magento.

Instalar o agente de infraestrutura

Nosso agente de infraestrutura monitora seu host e reporta métricas como uso de CPU, uso de memória, uso de armazenamento, uso de disco e tráfego de rede.

Para instalar o agente, escolha um destes métodos de instalação:

Instale o agente PHP

Nosso agente PHP relata métricas relacionadas ao aplicativo e ao browser, como desempenho AJAX, taxas de erros, duração, core web vitals e taxas de transferência.

Para instalar o agente, escolha um destes métodos de instalação:

Instale a integração MySQL

Nossa integração MySQL monitora seus bancos de dados e coleta métricas sobre a utilização e conexões do banco de dados, como consulta mais lenta e conexões ativas por nó.

Para instalar a integração:

  1. Vá para

    one.newrelic.com > Add data

    .

  2. Pesquise e clique em

    MySQL

    .

  3. Selecione uma conta e siga os passos da instalação guiada.

    Caso precise instalar o agente de uma forma diferente, veja Integração de monitoramento MySQL.

Instale a integração Apache

Nossa integração Apache coleta métricas de rede como conexões TCP, pesquisa de DNS, HTTPS, SSL e status de servidor e trabalhador.

Para instalar a integração, siga as etapas de nossa instalação guiada.

Caso precise instalar a integração de uma forma diferente, veja Integração de monitoramento do Apache.

Instale a integração do Elasticsearch

Nossa integração do Elasticsearch coleta métricas como status do cluster e fragmentos atuais. Se você estiver usando Magento versão 2.4 e superior, precisará instalar nossa integração Elasticsearch.

Para instalar a integração:

  1. Vá para

    one.newrelic.com > Add data

    .

  2. Pesquise e clique em

    Elasticsearch

    .

  3. Selecione uma conta e siga os passos da instalação guiada.

    Caso precise instalar a integração de uma forma diferente, consulte Integração de monitoramento do Elasticsearch.

Configurar monitoramento sintético

Nosso monitor Sintético testa seu aplicativo em diferentes locais e captura o período de inatividade do servidor. Você pode visualizar esses dados no dashboard de insights de negócios do Magento.

Para configurar o monitor Sintético, siga os passos de nossa instalação guiada.

Crie uma integração Flex

Nossa integração Flex customizada permite capturar métricas de negócios através da consulta ao banco de dados do seu aplicativo.

Para criar sua integração Flex:

  1. Crie um arquivo de configuração nri-flex :

    • Caminho para o arquivo de configuração: /etc/newrelic-infra/integrations.d/
    • Nome do arquivo de configuração: mysql-database-config.yml
  2. Adicione o seguinte trecho de código ao arquivo de configuração. Certifique-se de alterar a substituição USERNAME, PASSWORD, AND DATABASE_NAME:

    # NOTE: 'database' is an experimental API at this time
    # ref: https://github.com/newrelic/nri-flex/blob/master/docs/experimental/db.md
    ---
    integrations:
    - name: nri-flex
    # interval: 30s
    config:
    name: MySQLDbFlex
    apis:
    - database: mysql
    # connection string for an rds mysql instance. Be sure to use the writer endpoint here.
    # /sys is the default database. newrelic:Password is the user:pass.
    db_conn: USERNAME:PASSWORD@tcp(localhost:3306)/DATABASE_NAME
    logging:
    open: true
    # custom_attributes: # applies to all queries
    # host: CustomMagentoMySQL # custom host name atribute
    db_async: true
    db_queries:
    - name: MYSQLSalesOrderDetails
    run: SELECT status AS 'status', entity_id AS 'order_id' FROM sales_order;
    - name: MySQLSalesOrderCumulative
    run: SELECT AVG(grand_total) AS 'average_grand_total', SUM(grand_total) AS 'grand_total_sum', SUM(total_item_count) AS 'total_order_item_count' FROM sales_order;
    - name: MySQLSalesOrderByStatus
    run: SELECT status AS 'order_status', COUNT(increment_id) AS 'total_orders', (SUM(grand_total)) AS 'total_billed_amount_by_status' FROM sales_order GROUP BY status;
    - name: MYSQLSalesOrderByCustomerGroup
    run: SELECT AVG(salesOrder.grand_total) AS 'grand_total_average_of_all_orders', customerGroup.customer_group_code AS 'customer_group_code' FROM `sales_order` salesOrder JOIN `customer_group` customerGroup ON salesOrder.customer_group_id = customerGroup.customer_group_id GROUP BY salesOrder.customer_group_id;
    - name: MYSQLSalesOrderByProduct
    run: SELECT items.order_id AS 'Order ID', items.created_at AS 'Order Created Date', orders.status AS 'Order Status', items.name AS 'productName', items.sku AS ProductSearchcode, orders.total_item_count AS 'Order Quantity', orders.grand_total AS 'Grand Total' FROM sales_order AS orders JOIN sales_order_item AS items ON items.order_id = orders.entity_id;
    - name: MYSQLSalesOrderByCategory
    run: SELECT items.name AS 'Category', AVG(orders.grand_total) AS 'average_order_total' FROM sales_order AS orders JOIN sales_order_item AS items ON items.order_id = orders.entity_id GROUP BY items.name;
    - name: MYSQLSalesOrderByRegion
    run: SELECT soa.country_id, soa.region_id, dcrn.name 'Region Name', so.entity_id AS 'Order ID', so.grand_total FROM sales_order_address soa JOIN directory_country_region_name dcrn JOIN sales_order so WHERE soa.region_id = dcrn.region_id AND so.entity_id = soa.parent_id;
    - name: MySQLSalesOrderPaymentCount
    run: SELECT count(*) as CountOfOrderByMethod, method as PaymentMethodType FROM `sales_order_payment` group by method;
    - name: MYSQLAbandonedCarts
    run: SELECT customer_email, items_count AS 'Products', items_qty AS 'Quantity', subtotal FROM `quote` WHERE customer_email IS NOT NULL AND reserved_order_id IS NULL AND subtotal != 0.0000;
    - name: MYSQLCustomerEntityRegisteredUsers
    run: SELECT count(*) AS 'Registered Accounts' FROM `customer_entity`;
    - name: MYSQLUnregisteredCustomers
    run: SELECT customer_email FROM sales_order WHERE customer_is_guest = 1 GROUP BY customer_email;
    - name: MYSQLSalesOrderByUnregisteredCustomersSummary
    run: SELECT COUNT(entity_id) AS 'Total Order Ids', SUM(grand_total) AS 'Grand Total Sum' FROM sales_order WHERE customer_is_guest = 1;
    - name: MYSQLCustomerEntityActiveUsers
    run: SELECT count(is_active) AS 'Active Users' FROM `customer_entity` WHERE is_active = 1;
    - name: MYSQLReturningCustomers
    run: WITH ctel1 AS (SELECT COUNT(entity_id) AS 'numberOfOrders', customer_email AS 'customerEmail' FROM sales_order GROUP BY customer_email) SELECT count(*) AS 'returningCustomers' FROM ctel1 WHERE numberOfOrders > 1;
    - name: MYSQLNewCustomers
    run: SELECT COUNT(DISTINCT email) AS 'newCustomers' FROM customer_entity WHERE MONTH(created_at) >= MONTH(CURRENT_DATE() - INTERVAL 1 MONTH);
    - name: MYSQLBestSellersDaily
    run: SELECT SUM(qty_ordered) as 'QuantityOrdered', product_name FROM sales_bestsellers_aggregated_daily GROUP BY product_id, product_name ORDER BY QuantityOrdered DESC;
    - name: MYSQLRevenuePerMonthAndYear
    run: SELECT SUM(grand_total) AS 'Total Revenue', AVG(grand_total) AS 'Average Revenue', YEAR(created_at) AS 'Year', MONTH(created_at) AS 'Month' FROM sales_order WHERE status = 'complete' GROUP BY YEAR(created_at), MONTH(created_at);
    - name: MYSQLMostViewedProductsDaily
    run: SELECT SUM(views_num) as 'View Count', product_name, product_id FROM report_viewed_product_aggregated_daily GROUP BY product_name, product_id ORDER BY View Count DESC;
    - name: MYSQLConversionRate
    run: WITH cte1 AS (SELECT soi.product_id AS 'SalesProductId', soi.name AS 'ProductName', COUNT(soi.order_id) AS 'Total Orders' FROM `sales_order_item` soi group by soi.product_id, soi.name), cte2 AS (SELECT viewed.product_id AS 'ProductID', COUNT(viewed.product_id) AS 'Total Views' FROM `report_viewed_product_index` viewed group by viewed.product_id) SELECT SalesProductId as 'ProductID', ProductName, Total Views, Total Orders, Total Orders / Total Views * 100 as 'Conversion Rate In Percent' FROM cte1 JOIN cte2 WHERE cte1.SalesProductId = cte2.ProductID;
    - name: MYSQLTopTenSalesOrdersByValue
    run: SELECT entity_id AS 'Order ID', total_item_count AS 'Order Quantity', created_at AS 'Created Date', grand_total AS 'Grand Total' FROM sales_order ORDER BY grand_total DESC LIMIT 10;
    - name: MYSQLOrdersAverage
    run: SELECT AVG(order_count) AS 'Average Number Of Orders', Year AS 'Year' FROM (SELECT YEAR(created_at) AS 'Year', COUNT(DISTINCT order_id) AS order_count FROM sales_order_item GROUP BY MONTH(created_at), YEAR(created_at)) subquery GROUP BY Year;
    - name: MYSQLWishlistProducts
    run: SELECT w.product_id, p.value AS 'Product Name', SUM(w.qty) AS 'Wishlist Count' FROM wishlist_item as w LEFT JOIN catalog_product_entity_varchar as p ON p.entity_id = w.product_id WHERE attribute_id = 73 GROUP BY w.product_id, p.value ORDER BY 'Wishlist Count' DESC;
    - name: MYSQLProductPageViewWithNoInventory
    run: SELECT v.product_id, v.product_name, v.views_num AS 'Page Views', i.qty AS 'Inventory Quantity' FROM report_viewed_product_aggregated_daily AS v LEFT JOIN cataloginventory_stock_item i ON i.product_id = v.product_id WHERE i.qty = 0 ORDER BY v.views_num DESC;
    - name: MYSQLHighestRestockAlerts
    run: SELECT p.value as Product Name, p.entity_id as Product ID, count(a.alert_stock_id) as Restock Alert Count FROM `product_alert_stock` AS a, `catalog_product_entity_varchar` as p where a.product_id = p.value_id GROUP BY p.value, product_id order by 2 desc;
    - name: MYSQLSlowMovingProducts
    run: SELECT cpev.entity_id as Product ID, cpev.value as Product Name, sum(isi.quantity) as Quantity from inventory_source_item as isi join catalog_product_entity as cpe on isi.sku = cpe.sku join catalog_product_entity_varchar as cpev on cpe.entity_id = cpev.entity_id where cpev.attribute_id = 73 group by Product ID, Product Name order by Quantity desc;
    - name: MYSQLAccountWithSmallTransaction
    run: SELECT sum(grand_total) as Grand Total, customer_email FROM sales_order group by customer_email order by Grand Total ASC LIMIT 10;
    - name: MYSQLProfitableCustomers
    run: select sum(grand_total) as Grand Total, customer_email from sales_order group by customer_email order by Grand Total desc LIMIT 10;
    - name: MYSQLRevenueLostDueToDiscounts
    run: SELECT SUM(base_discount_amount) as 'Due to Discounts Revenue Loss' FROM `sales_order` WHERE `status` = 'complete';
    - name: MYSQLTotalSalesCountDueToDiscounts
    run: SELECT count(base_discount_amount) as 'Due to Discounts Total Sales Count' FROM `sales_order` WHERE `status` = 'complete';
    - name: MYSQLProdCartAbandonment
    run: Select c.value as Product Name, sum(q.items_count) as Abandoned Products Count from quote as q join catalog_product_entity_varchar as c on q.entity_id = c.entity_id WHERE customer_email IS NOT NULL AND reserved_order_id IS NULL AND subtotal != 0.0000 AND attribute_id = 73 group by Product Name order by Abandoned Products Count;
    - name: MYSQLPaymentMethodChangedFrequently
    run: SELECT o.customer_id, o.customer_email, o.customer_is_guest, COUNT(DISTINCT p.method) AS transaction_count FROM sales_order AS o JOIN sales_order_payment AS p ON o.entity_id = p.parent_id GROUP BY o.customer_id, o.customer_email, o.customer_is_guest HAVING COUNT(DISTINCT p.method) > 1 ORDER BY transaction_count DESC LIMIT 10;
    - name: MYSQLCustomerAddressChanging
    run: SELECT c.entity_id AS customer_id, c.email, COUNT(DISTINCT a.entity_id) AS address_count FROM customer_address_entity AS a JOIN customer_entity AS c ON a.parent_id = c.entity_id GROUP BY c.entity_id, c.email HAVING COUNT(DISTINCT a.entity_id) > 1 ORDER BY address_count DESC;
    - name: MYSQLCustomerPurchaseSameProd
    run: select COUNT(soi.product_id) AS purchase_count, soi.product_id, soi.name as 'Product Name', so.customer_email from sales_order_item as soi join sales_order as so on soi.order_id = so.entity_id group by so.customer_email, soi.product_id, soi.name HAVING COUNT(soi.product_id) > 1 ORDER BY purchase_count DESC;
    - name: MYSQLProductReturned
    run: SELECT soi.product_id, count(soi.product_id) as 'Returned Product Count' FROM `sales_order` as o join `sales_order_item` as soi ON o.entity_id = soi.order_id where o.status = 'closed' and o.total_refunded is not null GROUP BY soi.product_id HAVING COUNT(soi.product_id) > 1;

Reinicie o agente de infraestrutura

Antes de começar a ler seus dados, use as instruções em nossos documentos do agente de infraestrutura para reiniciar seu agente de infraestrutura.

Instale o dashboard de insights de negócios Magento

  1. Vá para

    one.newrelic.com > Add Data > Dashboards

    .

  2. Na barra de pesquisa, digite “Magento business insights”. O dashboard deve aparecer.

  3. Clique nele para instalar.

    Seu dashboard Magento é considerado um painel personalizado e pode ser encontrado na interface Dashboards. Para obter informações sobre como usar e editar o painel, consulte nossa documentação dashboard .

Consulte seus dados Magento

Interessado em consultar os dados do seu aplicativo Magento? Aqui está um exemplo de consulta NRQL verificando o total de clientes registrados em sua plataforma Magento:

SELECT LATEST(`Registered Accounts`) AS 'Registered Accounts' FROM MYSQLCustomerEntityRegisteredUsers

Qual é o próximo?

Para saber mais sobre como consultar seus dados e criar dashboards personalizados, confira estes documentos:

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.