当社の Magento ビジネス インサイト ダッシュボードは、Magento e コマース アプリケーションのパフォーマンスの包括的なビューを提供します。ダッシュボードを使用すると、収益のリスク、ダウンタイムによる注文のリスク、システム パフォーマンスの低下など、主要なビジネス指標を簡単に追跡できます。ダッシュボードを使用して、アプリのパフォーマンスの問題を診断し、コードを最適化することもできます。

当社の Magento ビジネス インサイト ダッシュボードでは、Magento アプリのデータを一元的に表示できます。
New Relic で Magento アプリの監視を開始するには、次の手順に従ってアプリ データを New Relic に送信し、Magento ビジネス インサイト ダッシュボードで表示します。
インフラストラクチャエージェントをインストールします
当社のインフラストラクチャ エージェントはホストを監視し、CPU 使用率、メモリ使用率、ストレージ使用率、ディスク使用率、ネットワーク トラフィックなどの指標を報告します。
エージェントをインストールするには、次のいずれかのインストール方法を選択します。
- ガイド付きインストール の手順に従って、迅速かつ簡単なインストール プロセスを実行してください。
- より高度なインストール プロセスを行うには、エージェントを手動でインストールします 。
PHPエージェントのインストール
当社の PHP エージェントは、AJAX パフォーマンス、エラー率、期間、コア Web バイタル、スループットなどのアプリケーションおよびブラウザー関連の指標をレポートします。
エージェントをインストールするには、次のいずれかのインストール方法を選択します。
- ガイド付きインストール の手順に従って、迅速かつ簡単なインストール プロセスを実行してください。
- より高度なインストール プロセスを行うには、エージェントを手動でインストールします 。
MySQL 統合をインストールする
当社の MySQL 統合は、データベースを監視し、ノードごとの最も遅いクエリやアクティブな接続など、データベースの使用状況と接続に関する指標を収集します。
統合をインストールするには:
one.newrelic.com > Integrations & Agentsに移動します。
MySQLを検索してクリックします。
アカウントを選択し、ガイド付きのインストール手順に従います。
別の方法でエージェントをインストールする必要がある場合は、 MySQL 監視統合 を参照してください。
Apache 統合をインストールする
当社の Apache 統合は、TCP 接続、DNS ルックアップ、HTTPS、SSL、およびサーバーとワーカーのステータスなどのネットワーク メトリックを収集します。
統合をインストールするには、 ガイド付きインストールの手順に従います。
別の方法で統合をインストールする必要がある場合は、 Apache 監視統合 を参照してください。
Elasticsearch 統合をインストールする
Elasticsearch の統合により、クラスターのステータスや現在のシャードなどのメトリックが収集されます。 Magento バージョン 2.4 以降を使用している場合は、Elasticsearch 統合をインストールする必要があります。
統合をインストールするには:
one.newrelic.com > Integrations & Agentsに移動します。
Elasticsearchを検索してクリックします。
アカウントを選択し、ガイド付きのインストール手順に従います。
別の方法で統合をインストールする必要がある場合は、 「 Elasticsearch モニタリング統合 」を参照してください。
シンセティック モニタリングのセットアップ
当社の合成モニターは、さまざまな場所でアプリをテストし、サーバーのダウンタイムをキャプチャします。このデータは、Magento ビジネス インサイト ダッシュボードで表示できます。
合成モニターをセットアップするには、 ガイド付きインストールの手順に従います。
Flex 統合を作成する
当社のカスタム Flex 統合により、アプリ データベースのクエリを通じてビジネス メトリックを取得できます。
Flex 統合を作成するには:
nri-flex構成ファイルを作成します。- 構成ファイルへのパス:
/etc/newrelic-infra/integrations.d/ - 構成ファイル名:
mysql-database-config.yml
- 構成ファイルへのパス:
次のコード スニペットを構成ファイルに追加します。
USERNAME、PASSWORD、および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: 30sconfig:name: MySQLDbFlexapis:- 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_NAMElogging:open: true# custom_attributes: # applies to all queries# host: CustomMagentoMySQL # custom host name atributedb_async: truedb_queries:- name: MYSQLSalesOrderDetailsrun: SELECT status AS 'status', entity_id AS 'order_id' FROM sales_order;- name: MySQLSalesOrderCumulativerun: 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: MySQLSalesOrderByStatusrun: 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: MYSQLSalesOrderByCustomerGrouprun: 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: MYSQLSalesOrderByProductrun: 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: MYSQLSalesOrderByCategoryrun: 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: MYSQLSalesOrderByRegionrun: 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: MySQLSalesOrderPaymentCountrun: SELECT count(*) as CountOfOrderByMethod, method as PaymentMethodType FROM `sales_order_payment` group by method;- name: MYSQLAbandonedCartsrun: 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: MYSQLCustomerEntityRegisteredUsersrun: SELECT count(*) AS 'Registered Accounts' FROM `customer_entity`;- name: MYSQLUnregisteredCustomersrun: SELECT customer_email FROM sales_order WHERE customer_is_guest = 1 GROUP BY customer_email;- name: MYSQLSalesOrderByUnregisteredCustomersSummaryrun: SELECT COUNT(entity_id) AS 'Total Order Ids', SUM(grand_total) AS 'Grand Total Sum' FROM sales_order WHERE customer_is_guest = 1;- name: MYSQLCustomerEntityActiveUsersrun: SELECT count(is_active) AS 'Active Users' FROM `customer_entity` WHERE is_active = 1;- name: MYSQLReturningCustomersrun: 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: MYSQLNewCustomersrun: SELECT COUNT(DISTINCT email) AS 'newCustomers' FROM customer_entity WHERE MONTH(created_at) >= MONTH(CURRENT_DATE() - INTERVAL 1 MONTH);- name: MYSQLBestSellersDailyrun: SELECT SUM(qty_ordered) as 'QuantityOrdered', product_name FROM sales_bestsellers_aggregated_daily GROUP BY product_id, product_name ORDER BY QuantityOrdered DESC;- name: MYSQLRevenuePerMonthAndYearrun: 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: MYSQLMostViewedProductsDailyrun: 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: MYSQLConversionRaterun: 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: MYSQLTopTenSalesOrdersByValuerun: 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: MYSQLOrdersAveragerun: 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: MYSQLWishlistProductsrun: 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: MYSQLProductPageViewWithNoInventoryrun: 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: MYSQLHighestRestockAlertsrun: 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: MYSQLSlowMovingProductsrun: 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: MYSQLAccountWithSmallTransactionrun: SELECT sum(grand_total) as Grand Total, customer_email FROM sales_order group by customer_email order by Grand Total ASC LIMIT 10;- name: MYSQLProfitableCustomersrun: select sum(grand_total) as Grand Total, customer_email from sales_order group by customer_email order by Grand Total desc LIMIT 10;- name: MYSQLRevenueLostDueToDiscountsrun: SELECT SUM(base_discount_amount) as 'Due to Discounts Revenue Loss' FROM `sales_order` WHERE `status` = 'complete';- name: MYSQLTotalSalesCountDueToDiscountsrun: SELECT count(base_discount_amount) as 'Due to Discounts Total Sales Count' FROM `sales_order` WHERE `status` = 'complete';- name: MYSQLProdCartAbandonmentrun: 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: MYSQLPaymentMethodChangedFrequentlyrun: 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: MYSQLCustomerAddressChangingrun: 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: MYSQLCustomerPurchaseSameProdrun: 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: MYSQLProductReturnedrun: 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;
インフラストラクチャエージェントを再起動します
データの読み取りを開始する前に、 インフラストラクチャ エージェントのドキュメント の手順に従ってインフラストラクチャ エージェントを再起動します。
Magento ビジネス インサイト ダッシュボードをインストールする
one.newrelic.com > Integrations & Agents > Dashboardsに移動します。
検索バーに「Magento ビジネス インサイト」と入力します。ダッシュボードが表示されます。
それをクリックしてインストールします。
Magento ダッシュボードはカスタムダッシュボードとみなされ、Dashboards UIで確認できます。 ダッシュボードの使用と編集については、ダッシュボードのドキュメントを参照してください。
Magento データをクエリする
Magento アプリ データのクエリに興味がありますか?以下は、Magento プラットフォームに登録されている顧客の総数を確認する NRQL クエリの例です。
SELECT LATEST(`Registered Accounts`) AS 'Registered Accounts' FROM MYSQLCustomerEntityRegisteredUsers次は何ですか?
データのクエリとカスタム ダッシュボードの作成について詳しくは、次のドキュメントをご覧ください。