À partir de la version 1.24.0 de l'agent, vous pouvez activer l'auto-instrumentation de l'agent et monitorer les performances de l'agent à l'aide de New Relic APM. Cela vous permettra d'avoir une meilleure vision du comportement de l'agent, de l'utilisation des files d'attente et des frais d'intégration, entre autres, facilitant ainsi sa configuration et son dépannage.
Important
L'auto-instrumentation de l'agent d'infrastructure est une fonctionnalité expérimentale. L'instrumenté télémétrie peut changer (métriques, transactions, événement personnalisé). Nous vous recommandons de l'activer uniquement pour les scénarios de dépannage complexes. La tarification standard pour l'ingestion de données s'applique.
L'auto-instrumentation est désactivée par défaut. Pour l'activer, utilisez l'option de configuration self_instrumentation:
self_instrumentation: "newrelic"
Une fois self_instrumentation
activé, l'agent signalera des métriques sur lui-même et une nouvelle application New Relic infrastructure agent
apparaîtra dans l'UI d'APM de New Relic.

En accédant à l'application New Relic infrastructure agent
vous verrez les données pour :
- Go Runtime (processeur, mémoire...)
- Transactions (samplers, intégration, https post...)

Pour voir les mesures personnalisées sur l'événement interne de l'agent, l'utilisation de la file d'attente et les frais d'intégration, vous pouvez importer le dashboard suivant.
Conseil
Remplacez l'espace réservé ACCOUNT_ID
par votre numéro de compte dans la charge utile JSON ci-dessous. Plus d'informations sur l'importation du dashboard
{ "name": "New Relic infrastructure agent instrumentation", "description": "Overview of New Relic infrastructure agent", "permissions": "PUBLIC_READ_WRITE", "pages": [ { "name": "Overview", "description": null, "widgets": [ { "title": "Goroutines", "layout": { "column": 1, "row": 1, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "facet": { "showOtherSeries": false }, "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "SELECT average(newrelic.timeslice.value) AS `Go/Runtime/Goroutines` FROM Metric WHERE metricTimesliceName = 'Go/Runtime/Goroutines' AND appName = 'New Relic Infrastructure Agent' TIMESERIES" } ], "yAxisLeft": { "zero": true } } }, { "title": "Agent Used Memory", "layout": { "column": 5, "row": 1, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "facet": { "showOtherSeries": false }, "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM Metric SELECT average(apm.service.memory.physical) WHERE appName = 'New Relic Infrastructure agent' TIMESERIES" } ], "yAxisLeft": { "zero": true } } }, { "title": "Integrations Payload Size", "layout": { "column": 9, "row": 1, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.stacked-bar" }, "rawConfiguration": { "facet": { "showOtherSeries": false }, "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM Transaction SELECT average(payload_size) facet name,integration_hostname,integration_port LIMIT MAX TIMESERIES" } ] } }, { "title": "Queue Event utilization", "layout": { "column": 1, "row": 4, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM Metric SELECT percentile(agent.eventQueueUtilization,99,95,50) TIMESERIES " } ], "yAxisLeft": { "zero": true } } }, { "title": "Queue Capacity", "layout": { "column": 5, "row": 4, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM Metric SELECT max(agent.eventQueueCapacity) TIMESERIES" } ], "yAxisLeft": { "zero": true } } }, { "title": "postEventsNum", "layout": { "column": 9, "row": 4, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM Metric SELECT max(agent.postEventsNum) TIMESERIES" } ], "yAxisLeft": { "zero": true } } }, { "title": "Transactions", "layout": { "column": 1, "row": 7, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "facet": { "showOtherSeries": false }, "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM Transaction SELECT average(duration) WHERE appName = 'New Relic Infrastructure agent' FACET name TIMESERIES " } ], "yAxisLeft": { "zero": true } } }, { "title": "Transaction Errors", "layout": { "column": 5, "row": 7, "width": 4, "height": 3 }, "linkedEntityGuids": null, "visualization": { "id": "viz.line" }, "rawConfiguration": { "legend": { "enabled": true }, "nrqlQueries": [ { "accountId": ACCOUNT_ID, "query": "FROM TransactionError SELECT count(*) TIMESERIES" } ], "yAxisLeft": { "zero": true } } } ] } ]}