diff --git a/.github/workflows/add-slugs-to-translate-queue.yml b/.github/workflows/add-slugs-to-translate-queue.yml index 1a8c111be030..687f850aa2d8 100644 --- a/.github/workflows/add-slugs-to-translate-queue.yml +++ b/.github/workflows/add-slugs-to-translate-queue.yml @@ -9,6 +9,10 @@ on: paths: - '**.mdx' +permissions: + contents: read + pull-requests: read + env: DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }} HUMAN_TRANSLATION_PROJECT_ID: ${{ secrets.TRANSLATION_VENDOR_PROJECT }} # human project id diff --git a/.github/workflows/add-untranslated-files-to-translation-queue.yml b/.github/workflows/add-untranslated-files-to-translation-queue.yml index 70347563115a..05b122f3b633 100644 --- a/.github/workflows/add-untranslated-files-to-translation-queue.yml +++ b/.github/workflows/add-untranslated-files-to-translation-queue.yml @@ -16,6 +16,9 @@ on: required: false type: string +permissions: + contents: read + env: DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }} HUMAN_TRANSLATION_PROJECT_ID: ${{ secrets.TRANSLATION_VENDOR_PROJECT }} # human project id diff --git a/.github/workflows/agent-release-notes.yml b/.github/workflows/agent-release-notes.yml index 7b1e0c992788..2e2d93d950d2 100644 --- a/.github/workflows/agent-release-notes.yml +++ b/.github/workflows/agent-release-notes.yml @@ -8,6 +8,9 @@ on: paths: - 'src/content/docs/release-notes/**' +permissions: + contents: read + jobs: generate-json: name: Generate JSON diff --git a/.github/workflows/auto-assign-reviewer.yml b/.github/workflows/auto-assign-reviewer.yml index 0f8d5684a361..07a14f176a39 100644 --- a/.github/workflows/auto-assign-reviewer.yml +++ b/.github/workflows/auto-assign-reviewer.yml @@ -3,6 +3,9 @@ on: pull_request: types: [opened, ready_for_review] +permissions: + pull-requests: write + jobs: add-reviews: runs-on: ubuntu-latest diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml index 57fc560f73cb..d58493e8687b 100644 --- a/.github/workflows/auto-comment.yml +++ b/.github/workflows/auto-comment.yml @@ -1,5 +1,8 @@ name: Auto Comment on: [issues, pull_request_target] +permissions: + issues: write + pull-requests: write jobs: run: runs-on: ubuntu-latest diff --git a/.github/workflows/build-notification.yml b/.github/workflows/build-notification.yml index 7ba61dccf2d7..857ba746f4a2 100644 --- a/.github/workflows/build-notification.yml +++ b/.github/workflows/build-notification.yml @@ -26,6 +26,10 @@ on: description: SHA hash of the commit built required: true +permissions: + statuses: write + pull-requests: write + jobs: deploy-preview: runs-on: ubuntu-latest diff --git a/.github/workflows/check-for-broken-links.yml b/.github/workflows/check-for-broken-links.yml index ad595797f37e..727898263d4f 100644 --- a/.github/workflows/check-for-broken-links.yml +++ b/.github/workflows/check-for-broken-links.yml @@ -5,6 +5,10 @@ on: schedule: - cron: '0 17 * * 0' # 9AM PST (5PM UTC) on Sunday mornings +permissions: + contents: read + issues: write + env: BOT_NAME: svc-docs-eng-opensource-bot BOT_EMAIL: svc-docs-eng-opensource-bot@newrelic.com diff --git a/.github/workflows/check-for-keys.yml b/.github/workflows/check-for-keys.yml index 3f8174ba6ed1..7ada5341c4c0 100644 --- a/.github/workflows/check-for-keys.yml +++ b/.github/workflows/check-for-keys.yml @@ -7,6 +7,9 @@ on: branches: - develop +permissions: + contents: read + jobs: check-for-keys: name: Check for keys in files and commit history diff --git a/.github/workflows/check-images.yml b/.github/workflows/check-images.yml index de73c52a5785..54af856aab31 100644 --- a/.github/workflows/check-images.yml +++ b/.github/workflows/check-images.yml @@ -5,6 +5,9 @@ on: schedule: - cron: '0 17 * * 2' # 9AM PST (5PM UTC) on Tuesday mornings +permissions: + contents: read + env: BOT_NAME: svc-docs-eng-opensource-bot BOT_EMAIL: svc-docs-eng-opensource-bot@newrelic.com diff --git a/.github/workflows/check-translations-and-deserialize.yml b/.github/workflows/check-translations-and-deserialize.yml index eec6c0365b8f..fb8a13e9fa1f 100644 --- a/.github/workflows/check-translations-and-deserialize.yml +++ b/.github/workflows/check-translations-and-deserialize.yml @@ -6,6 +6,9 @@ on: # 12pm every day - cron: '0 12 * * *' +permissions: + contents: read + env: TRANSLATION_VENDOR_API_URL: ${{ secrets.TRANSLATION_VENDOR_API_URL }} DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }} diff --git a/.github/workflows/final-manual-deploy-comment.yml b/.github/workflows/final-manual-deploy-comment.yml index 1b7b7dfdfa80..67dfd61f266e 100644 --- a/.github/workflows/final-manual-deploy-comment.yml +++ b/.github/workflows/final-manual-deploy-comment.yml @@ -4,6 +4,10 @@ on: issue_comment: types: [created] +permissions: + pull-requests: write + issues: write + jobs: deploy-preview: # when a contributor comments 'netlify build', diff --git a/.github/workflows/gaurab-manual-preview-deploy.yml b/.github/workflows/gaurab-manual-preview-deploy.yml index eb5232953351..aa75429626d0 100644 --- a/.github/workflows/gaurab-manual-preview-deploy.yml +++ b/.github/workflows/gaurab-manual-preview-deploy.yml @@ -4,6 +4,9 @@ on: issue_comment: types: [created] +permissions: + issues: write + jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/manual-add-files-to-translation-queue.yml b/.github/workflows/manual-add-files-to-translation-queue.yml index 60b34faf9186..e812b4953a29 100644 --- a/.github/workflows/manual-add-files-to-translation-queue.yml +++ b/.github/workflows/manual-add-files-to-translation-queue.yml @@ -16,6 +16,9 @@ on: required: false type: string +permissions: + contents: read + env: DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }} HUMAN_TRANSLATION_PROJECT_ID: ${{ secrets.TRANSLATION_VENDOR_PROJECT }} # human project id diff --git a/.github/workflows/manual-deploy-comment.yml b/.github/workflows/manual-deploy-comment.yml index daa816415cdd..131271743918 100644 --- a/.github/workflows/manual-deploy-comment.yml +++ b/.github/workflows/manual-deploy-comment.yml @@ -6,6 +6,10 @@ on: pull_request: types: [opened] +permissions: + pull-requests: write + issues: write + jobs: deploy-preview: # when a contributor comments 'netlify build', diff --git a/.github/workflows/netlify-build-forked-pr.yml b/.github/workflows/netlify-build-forked-pr.yml index 34b6fa37dfc7..c7567cba245c 100644 --- a/.github/workflows/netlify-build-forked-pr.yml +++ b/.github/workflows/netlify-build-forked-pr.yml @@ -5,11 +5,9 @@ on: issue_comment: types: [created] -# Permissions remain the same as they are still needed for the job's tasks. permissions: - contents: write + contents: read pull-requests: write - issues: write jobs: handle-fork-pr: @@ -140,76 +138,93 @@ jobs: echo "PR Author: ${{ steps.pr-data.outputs.pr_author_login }}" echo "Event Type: ${{ github.event_name }} (comment)" echo "::endgroup::" - - - name: Checkout repo - id: checkout - uses: actions/checkout@v3 - with: - ref: ${{ steps.pr-data.outputs.head_sha }} - fetch-depth: 0 - token: ${{ secrets.REPO_ACCESS_TOKEN }} - - - name: Verify checkout - run: | - echo "::group::Repository Status" - if [ -d .git ]; then - echo "Repository checkout successful" - git status - git log -n 1 --oneline - else - echo "::error::Repository checkout failed" - exit 1 - fi - echo "::endgroup::" - - - name: Setup Git Identity - run: | - echo "::group::Git Configuration" - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - echo "Git identity configured" - echo "::endgroup::" - - - name: Process synced PR + + - name: Create or update branch using GitHub API id: process-pr - run: | - echo "::group::Processing synced PR" - # Combine author and original branch name - FULL_BRANCH_NAME="${{ steps.pr-data.outputs.pr_author_login }}-${{ steps.pr-data.outputs.head_ref }}" - - # Sanitize the branch name for Netlify: - # 1. Replace all non-alphanumeric characters with a hyphen. - # 2. Squeeze consecutive hyphens into a single hyphen. - # 3. Truncate to Netlify's recommended length (38 chars). - # 4. Remove any leading/trailing hyphens. - PR_BRANCH=$(echo "$FULL_BRANCH_NAME" | sed 's/[^a-zA-Z0-9]/-/g' | tr -s '-' | cut -c1-38 | sed 's/^-//;s/-$//') - - echo "Original combined branch name: $FULL_BRANCH_NAME" - echo "New upstream branch name (sanitized and truncated): $PR_BRANCH" - - COMMIT_SHA="${{ steps.pr-data.outputs.head_sha }}" - COMMIT_SHORT_SHA=$(echo $COMMIT_SHA | cut -c1-7) - echo "Latest commit ID: $COMMIT_SHA (short: $COMMIT_SHORT_SHA)" - echo "commit_id=$COMMIT_SHA" >> $GITHUB_OUTPUT - echo "commit_short_id=$COMMIT_SHORT_SHA" >> $GITHUB_OUTPUT - echo "new_branch_name=$PR_BRANCH" >> $GITHUB_OUTPUT - - if git ls-remote --heads origin "refs/heads/$PR_BRANCH" | grep -q "refs/heads/$PR_BRANCH"; then - echo "Branch '$PR_BRANCH' already exists in upstream repo, will update." - echo "is_first_commit=false" >> $GITHUB_OUTPUT - git checkout -B "$PR_BRANCH" "FETCH_HEAD" - else - echo "Branch '$PR_BRANCH' does not exist yet in upstream repo, will create." - echo "is_first_commit=true" >> $GITHUB_OUTPUT - git checkout -b "$PR_BRANCH" "FETCH_HEAD" - fi - - git push origin "$PR_BRANCH" --force - if [ $? -ne 0 ]; then - echo "::error::Failed to push branch to origin" - exit 1 - fi - echo "::endgroup::" + uses: actions/github-script@v7 + env: + HEAD_SHA: ${{ steps.pr-data.outputs.head_sha }} + HEAD_REF: ${{ steps.pr-data.outputs.head_ref }} + PR_AUTHOR: ${{ steps.pr-data.outputs.pr_author_login }} + with: + github-token: ${{ secrets.REPO_ACCESS_TOKEN }} + script: | + const headSha = process.env.HEAD_SHA; + const headRef = process.env.HEAD_REF; + const prAuthor = process.env.PR_AUTHOR; + + // Combine author and original branch name + const fullBranchName = `${prAuthor}-${headRef}`; + + // Sanitize the branch name for Netlify: + // 1. Replace all non-alphanumeric characters with a hyphen. + // 2. Squeeze consecutive hyphens into a single hyphen. + // 3. Truncate to Netlify's recommended length (38 chars). + // 4. Remove any leading/trailing hyphens. + const prBranch = fullBranchName + .replace(/[^a-zA-Z0-9]/g, '-') + .replace(/-+/g, '-') + .substring(0, 38) + .replace(/^-|-$/g, ''); + + console.log(`Original combined branch name: ${fullBranchName}`); + console.log(`New upstream branch name (sanitized and truncated): ${prBranch}`); + + const commitShortSha = headSha.substring(0, 7); + console.log(`Latest commit ID: ${headSha} (short: ${commitShortSha})`); + + core.setOutput('commit_id', headSha); + core.setOutput('commit_short_id', commitShortSha); + core.setOutput('new_branch_name', prBranch); + + // Check if branch already exists + let branchExists = false; + try { + await github.rest.repos.getBranch({ + owner: context.repo.owner, + repo: context.repo.repo, + branch: prBranch, + }); + branchExists = true; + console.log(`Branch '${prBranch}' already exists in upstream repo, will update.`); + } catch (error) { + if (error.status === 404) { + console.log(`Branch '${prBranch}' does not exist yet in upstream repo, will create.`); + } else { + throw error; + } + } + + core.setOutput('is_first_commit', !branchExists ? 'true' : 'false'); + + // Create or update the branch reference using GitHub API + // This avoids checking out untrusted code locally + try { + if (branchExists) { + // Update existing branch + await github.rest.git.updateRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: `heads/${prBranch}`, + sha: headSha, + force: true, + }); + console.log(`Updated branch '${prBranch}' to point to ${headSha}`); + } else { + // Create new branch + await github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: `refs/heads/${prBranch}`, + sha: headSha, + }); + console.log(`Created branch '${prBranch}' pointing to ${headSha}`); + } + } catch (error) { + console.error(`Failed to create/update branch: ${error.message}`); + core.setFailed(`Failed to create/update branch: ${error.message}`); + throw error; + } - name: Get Current Time in IST if: steps.process-pr.outputs.is_first_commit == 'true' diff --git a/.github/workflows/pr-comment-action.yml b/.github/workflows/pr-comment-action.yml index 75bb47a24d4c..e27e46f9e52b 100644 --- a/.github/workflows/pr-comment-action.yml +++ b/.github/workflows/pr-comment-action.yml @@ -7,6 +7,9 @@ on: issue_comment: types: [created] +permissions: + issues: write + # The jobs that will be executed when the workflow is triggered. jobs: # A job named 'comment-reaction' diff --git a/.github/workflows/protected-file-comment.yml b/.github/workflows/protected-file-comment.yml index 09dea3a5b1fb..76ce1923c07f 100644 --- a/.github/workflows/protected-file-comment.yml +++ b/.github/workflows/protected-file-comment.yml @@ -5,6 +5,10 @@ on: branches: - develop +permissions: + pull-requests: write + contents: read + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ed9c235b468..b0b69ad7bf71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,9 @@ on: branches: - main +permissions: + contents: write + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/send-content-to-machine-translate.yml b/.github/workflows/send-content-to-machine-translate.yml index fbe28d3d1ae9..b551aa403fe9 100644 --- a/.github/workflows/send-content-to-machine-translate.yml +++ b/.github/workflows/send-content-to-machine-translate.yml @@ -6,6 +6,9 @@ on: # At 1 am everyday - cron: '0 1 * * *' +permissions: + contents: read + env: TRANSLATION_VENDOR_API_URL: ${{ secrets.TRANSLATION_VENDOR_API_URL }} TRANSLATION_VENDOR_PROJECT: ${{ secrets.TRANSLATION_VENDOR_MT_PROJECT }} diff --git a/.github/workflows/send-content-to-translate.yml b/.github/workflows/send-content-to-translate.yml index 9dfb325cb1f2..445ab6dca0d8 100644 --- a/.github/workflows/send-content-to-translate.yml +++ b/.github/workflows/send-content-to-translate.yml @@ -6,6 +6,9 @@ on: # At 1 am on the 1st and 15th day of a month - cron: '0 1 1,15 * *' +permissions: + contents: read + env: TRANSLATION_VENDOR_API_URL: ${{ secrets.TRANSLATION_VENDOR_API_URL }} TRANSLATION_VENDOR_PROJECT: ${{ secrets.TRANSLATION_VENDOR_PROJECT }} diff --git a/.github/workflows/trigger-i18n-merge.yml b/.github/workflows/trigger-i18n-merge.yml index 3309fc58a40c..ca6058ccf623 100644 --- a/.github/workflows/trigger-i18n-merge.yml +++ b/.github/workflows/trigger-i18n-merge.yml @@ -21,6 +21,9 @@ on: types: - closed +permissions: + contents: read + jobs: merge-main-i18n-branches: name: Merge main to i18n branches diff --git a/.github/workflows/update-attribute-dictionary-json.yml b/.github/workflows/update-attribute-dictionary-json.yml index abdcf108291a..479d2d04920f 100644 --- a/.github/workflows/update-attribute-dictionary-json.yml +++ b/.github/workflows/update-attribute-dictionary-json.yml @@ -6,6 +6,9 @@ on: # 12pm UTC (5a PDT) Monday - Friday - cron: '0 12 * * 1-5' +permissions: + contents: read + env: API_KEY: ${{ secrets.NEW_RELIC_API_KEY }} BOT_NAME: svc-docs-eng-opensource-bot diff --git a/.github/workflows/update-whats-new-ids.yml b/.github/workflows/update-whats-new-ids.yml index f3933e119726..3935dfe8f70d 100644 --- a/.github/workflows/update-whats-new-ids.yml +++ b/.github/workflows/update-whats-new-ids.yml @@ -8,6 +8,9 @@ on: branches: - main +permissions: + contents: read + env: BOT_NAME: svc-docs-eng-opensource-bot BOT_EMAIL: svc-docs-eng-opensource-bot@newrelic.com diff --git a/.github/workflows/vale-lint.yml b/.github/workflows/vale-lint.yml index c766c4b114be..879b3d290081 100644 --- a/.github/workflows/vale-lint.yml +++ b/.github/workflows/vale-lint.yml @@ -5,6 +5,11 @@ on: branches: - develop +permissions: + pull-requests: write + contents: read + checks: write + jobs: vale-linter: runs-on: ubuntu-latest diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 8d1dc38f2f0d..b237825f91ee 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -7,6 +7,10 @@ on: - main - feat/* +permissions: + contents: read + pull-requests: read + env: NODE_OPTIONS: '--max-old-space-size=4096' CHOKIDAR_USEPOLLING: 1 diff --git a/.github/workflows/validate-release-notes-json.yml b/.github/workflows/validate-release-notes-json.yml index 250d91938091..6a52fe221dbd 100644 --- a/.github/workflows/validate-release-notes-json.yml +++ b/.github/workflows/validate-release-notes-json.yml @@ -11,6 +11,9 @@ on: - develop - feat/* +permissions: + contents: read + env: NODE_OPTIONS: '--max-old-space-size=4096' CHOKIDAR_USEPOLLING: 1 diff --git a/.github/workflows/verify-mdx.yml b/.github/workflows/verify-mdx.yml index b28be69029cd..0ab954c31606 100644 --- a/.github/workflows/verify-mdx.yml +++ b/.github/workflows/verify-mdx.yml @@ -6,6 +6,9 @@ on: - develop - main +permissions: + contents: read + env: NODE_OPTIONS: '--max-old-space-size=4096' CHOKIDAR_USEPOLLING: 1 diff --git a/.github/workflows/webdriver.yml b/.github/workflows/webdriver.yml index d1818fb709b6..ef19d551f62e 100644 --- a/.github/workflows/webdriver.yml +++ b/.github/workflows/webdriver.yml @@ -6,6 +6,9 @@ on: branches: - main +permissions: + contents: read + env: NODE_OPTIONS: '--max-old-space-size=4096' CHOKIDAR_USEPOLLING: 1 diff --git a/package.json b/package.json index 8a1313999c2a..8448dfac98d2 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "remark-math": "^3.0.1", "remark-rehype": "^8.0.0", "rss": "^1.2.2", - "sequelize": "^6.21.3", + "sequelize": "^6.37.8", "sharp": "^0.30.7", "superstruct": "^0.16.5", "turndown": "^6.0.0", @@ -149,7 +149,7 @@ "remark-stringify": "^8.1.1", "remark-stringify10": "npm:remark-stringify@10.0.2", "selenium-webdriver": "^4.12.0", - "simple-git": "^3.32.3", + "simple-git": "^3.36.0", "sinon": "^17.0.1", "source-map-loader": "^3.0.1", "sync-fetch": "^0.3.0", @@ -179,7 +179,7 @@ "resolutions": { "bl": "^4.0.3", "object-path": "^0.11.5", - "node-forge": "^1.3.2", + "node-forge": "^1.4.0", "node-fetch": "^2.6.1", "remark-mdx": "2.0.0-next.8", "ini": "^1.3.6", diff --git a/src/content/docs/accounts/accounts-billing/account-setup/downgradecancel-account.mdx b/src/content/docs/accounts/accounts-billing/account-setup/downgradecancel-account.mdx index 59ced0df5979..03a8797936a0 100644 --- a/src/content/docs/accounts/accounts-billing/account-setup/downgradecancel-account.mdx +++ b/src/content/docs/accounts/accounts-billing/account-setup/downgradecancel-account.mdx @@ -61,11 +61,24 @@ There are two options for downgrading your [edition](https://newrelic.com/pricin If you have more than one account in your organization, and are not looking to close all of them at this time, you can cancel one or more accounts while keeping your organization. + + If the account you're canceling is a parent account, canceling it may also cancel some or all sub-accounts beneath it depending on your account configuration. This action cannot be reversed from the UI. + + * **To remove a single sub-account:** Cancel that specific account directly instead of its parent. + * **To close every account in your organization:** See [Delete your organization](#delete-org). + + If you have sub-accounts and are unsure how canceling the parent will affect them, please [file a ticket with our support team](https://docs.newrelic.com/docs/new-relic-solutions/solve-common-issues/find-help-get-support) before proceeding. + + When you cancel an account: * It is disabled, but it's still present in your organization in **Accounts > Cancelled accounts**. * Users, groups, and custom roles remain, but access grants that are assigned to that cancelled account lose all connections to the account. You should also remove any access grant associated with this account, otherwise users may see errors when they try to view it. * Any API keys associated with a cancelled account become inactive and can't be reassigned to another account. +* **Canceling a parent account**: Depending on your account and subscription configuration, canceling a parent account may also cancel some or all of its sub-accounts. + * If a sub-account is canceled as a result, it also experiences the same effects (disabled state, severed access grants, and inactive API keys). + * Any active trials on the parent expire, and the parent's subscription is canceled if the parent owns it. +* **Canceling a sub-account**: Canceling a sub-account does not cancel its parent account or any sibling sub-accounts. The sub-account is detached from its parent and canceled individually. ### Who can cancel an account [#who-cancel] diff --git a/src/content/docs/accounts/accounts-billing/account-structure/multi-tenancy/intro-to-multi-tenancy.mdx b/src/content/docs/accounts/accounts-billing/account-structure/multi-tenancy/intro-to-multi-tenancy.mdx index 595d2a1e2ecc..e6bc2c444624 100644 --- a/src/content/docs/accounts/accounts-billing/account-structure/multi-tenancy/intro-to-multi-tenancy.mdx +++ b/src/content/docs/accounts/accounts-billing/account-structure/multi-tenancy/intro-to-multi-tenancy.mdx @@ -63,7 +63,7 @@ To use multi-tenancy, you need to complete the following for your organization: 1. Get approval: Contact your account representative to confirm your organization has been added to multi-tenancy. Once approved, you receive the multi-tenant entitlement. 2. Make sure you have correct user types: Users within the managing org that will leverage the above feature set need to be provisioned as either a core or full platform users. -3. Add users to a designated group: Users with the core or full platform user type need to be added to a group with `tenant_settings` applied. +3. Add users to a designated group: Users with the core or full platform user type need to be added to a group with an org-scoped [access grant](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#access-grants) assigning them the Tenant Manager role. ## Overview of multi-tenancy approaches [#approaches] diff --git a/src/content/docs/accounts/accounts-billing/general-account-settings/intro-account-settings.mdx b/src/content/docs/accounts/accounts-billing/general-account-settings/intro-account-settings.mdx index af7e6024ee47..5ad89303215f 100644 --- a/src/content/docs/accounts/accounts-billing/general-account-settings/intro-account-settings.mdx +++ b/src/content/docs/accounts/accounts-billing/general-account-settings/intro-account-settings.mdx @@ -12,11 +12,11 @@ redirects: freshnessValidatedDate: never --- -In the bottom left of the New Relic platform UI, you'll find your user menu, which gives you access to features related to managing your organization and users, managing your data, and more. +In the top right of the New Relic platform UI, you'll find your user menu, which gives you access to features related to managing your organization and users, managing your data, and more. ## Find your account settings [#find] -From [one.newrelic.com](https://one.newrelic.com), go to the bottom left of the New Relic UI, and click your name. This will open up the user menu options. For details on the options in the user menu, see [User menu](#user-menu). +From [one.newrelic.com](https://one.newrelic.com), go to the top right of the New Relic UI, and click your name icon. This will open up the user menu options. For details on the options in the user menu, see [User menu](#user-menu). menu on any chart, you can: * Add the chart to your [dashboards](/docs/query-your-data/explore-query-data/dashboards/manage-your-dashboard/) for easy monitoring. * [Set up an alert](/docs/tutorial-create-alerts/create-an-alert/) to notify you of significant changes in usage. -* [Share a real-time view](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#chart) of your data with stakeholders. +* [Share a real-time view](/docs/query-your-data/explore-query-data/dashboards/share-charts-publicly) of your data with stakeholders. * Save the chart as an image for presentations or reports. * View the underlying query that powers the chart, which you can use for your own custom reports or deeper analysis. diff --git a/src/content/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing.mdx b/src/content/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing.mdx index 34ad497b96f4..8c002cc0cc0c 100644 --- a/src/content/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing.mdx +++ b/src/content/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing.mdx @@ -163,7 +163,7 @@ The following table compares capabilities supported by two alternative pricing m Existing product capability Data + User - Data + Core Compute * + Data + Core Compute * + Advanced Compute @@ -284,9 +284,9 @@ The following table compares capabilities supported by two alternative pricing m Public Dashboards - ❌ - ❌ ✅ + ✅ + ❌ Codestream @@ -313,16 +313,16 @@ The following table compares capabilities supported by two alternative pricing m ✅ - Prediction Query - ❌ - ❌ + NRQL Predictions + ✅ ✅ + ❌ Predictive Alerts - ❌ - ❌ ✅ + ✅ + ❌ Agentic AI @@ -343,38 +343,52 @@ The following table compares capabilities supported by two alternative pricing m ✅ - E&R via NRQL + Security RX Apps ❌ ❌ ✅ - Scorecards + Security RX Infra ❌ ❌ ✅ - Teams - ❌ - ❌ + E&R via NRQL ** ✅ + ✅ + ❌ - Security RX - ❌ - ❌ + Scorecards ** ✅ + ✅ + ❌ - Security RX Infra + Teams ** + ✅ + ✅ ❌ + + + Catalogs ** + ✅ + ✅ ❌ + + + Maps ** + ✅ ✅ + ❌ -*****Core Compute is currently in Public Preview and serves as an alternative to our User and data-based billing options for some capabilities. +*Core Compute is currently in Public Preview and serves as an alternative to our User and data-based billing options for some capabilities. + +**[Service Architecture Intelligence (SAI)](/docs/service-architecture-intelligence/getting-started/) capabilities (E&R via NRQL, Scorecards, Teams, Catalogs, and Maps) are included at no additional cost for all [Full platform users](/docs/accounts/accounts-billing/new-relic-one-user-management/user-type/#user-type-capabilities). Usage of these capabilities does not consume Core CCUs or count toward your monthly data ingestion limits. ### Billing for add-on features [#add-on-billing] diff --git a/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/feature-control-manager.mdx b/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/feature-control-manager.mdx index 353f9ffbe357..2b63a53237b5 100644 --- a/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/feature-control-manager.mdx +++ b/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/feature-control-manager.mdx @@ -41,7 +41,7 @@ To access the Feature Control manager: The **Feature Control** page displays all intelligent observability features available to your organization, showing their current activation status across your accounts. To get the active features for specific accounts, search with the account IDs in the search field. - Most features can be activated or deactivated for specific accounts. However, organization-scoped features like **Teams** apply to all accounts in your organization automatically. + Most features can be activated or deactivated for specific accounts. However, organization-scoped features apply to all accounts in your organization automatically. ## Activate features for specific accounts [#activate-features] @@ -57,7 +57,7 @@ The **Feature Control** page displays all intelligent observability f ## Activate org-scoped features [#activate-org-features] -To activate organization-scoped features (like **Teams**) across all accounts in your organization: +To activate organization-scoped features across all accounts in your organization: 1. From the **Feature Control** page, find the feature you want to activate. 2. Click **Activate**. @@ -88,7 +88,7 @@ To deactivate a feature for specific accounts: ## Deactivate org-scoped features [#deactivate-org-features] -For organization-scoped features (like **Teams**): +For organization-scoped features: 1. From the **Feature Control** page, find the active feature you want to deactivate. 2. Click **Deactivate for all accounts** and confirm the deactivation in the confirmation modal. diff --git a/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks.mdx b/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks.mdx index 085cc50cfddc..7708ff974e4c 100644 --- a/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks.mdx +++ b/src/content/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks.mdx @@ -222,6 +222,148 @@ Here are some user management tasks you might want to do: +## Name field requirements [#name-field-requirements] + +When creating or updating a user, the `name`, `given_name`, and `family_name` fields must meet these requirements: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Rule + + `name` + + `given_name` / `family_name` +
+ Maximum length: 250 characters + + Enforced + + Enforced +
+ URLs + + Blocked + + Blocked +
+ Email addresses + + Blocked + + Blocked +
+ Domain names + + Blocked + + Blocked +
+ Emoji + + Blocked + + Blocked +
+ Control characters + + Blocked + + Blocked +
+ Invisible Unicode + + Blocked + + Blocked +
+ Equal sign (`=`) + + Blocked + + Allowed +
+ + + Names with hyphens, apostrophes, accented characters (like ñ or ü), periods, spaces, and non-Latin scripts are all valid. Dot-separated names such as `firstname.lastname` are allowed because the domain check only blocks strings ending in a registered top-level domain (like `.com`, `.net`, or `.co.uk`). + + +These rules apply across the UI, [SCIM API](/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management), and [NerdGraph API](/docs/apis/nerdgraph/examples/nerdgraph-manage-users). Validation runs when a user is created or when a name field is updated. Existing users with non-conforming data are not affected unless they update the validated field. + ## Use our API [#api] To use our API to manage accounts and users, see our [NerdGraph tutorials](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/#tutorials). diff --git a/src/content/docs/accounts/accounts/account-maintenance/query-account-audit-logs-nrauditevent.mdx b/src/content/docs/accounts/accounts/account-maintenance/query-account-audit-logs-nrauditevent.mdx index b125c68b10e1..274ac19c9c68 100644 --- a/src/content/docs/accounts/accounts/account-maintenance/query-account-audit-logs-nrauditevent.mdx +++ b/src/content/docs/accounts/accounts/account-maintenance/query-account-audit-logs-nrauditevent.mdx @@ -29,7 +29,7 @@ The `NrAuditEvent` is created to record some important types of configuration ch * Login and logout events * Account changes made via API * [Synthetic monitor changes](/docs/synthetics/new-relic-synthetics/administration/audit-synthetics-account-changes) -* Dashboard creation, deletion, updates, and [public sharing](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#audit-trail-dashboard) +* Dashboard creation, deletion, updates, and [public sharing](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#audit-trail-dashboard) * Workload configuration changes To see all the attributes reported by this event, see [`NrAuditEvent`](/attribute-dictionary/?event=NrAuditEvent). diff --git a/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx b/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx index 3577acc060d4..ca46653c9640 100644 --- a/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx +++ b/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx @@ -121,7 +121,7 @@ New Relic uses a subset of the available fields in the SCIM core schema. Other S - Last name of the user. + Last name of the user. See [validation rules](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks/#name-field-requirements). @@ -131,7 +131,7 @@ New Relic uses a subset of the available fields in the SCIM core schema. Other S - First name of the user. + First name of the user. See [validation rules](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks/#name-field-requirements). diff --git a/src/content/docs/accounts/install-new-relic/partner-based-installation/heroku-install-new-relic-add.mdx b/src/content/docs/accounts/install-new-relic/partner-based-installation/heroku-install-new-relic-add.mdx index 17c5b1aac166..6715bb790000 100644 --- a/src/content/docs/accounts/install-new-relic/partner-based-installation/heroku-install-new-relic-add.mdx +++ b/src/content/docs/accounts/install-new-relic/partner-based-installation/heroku-install-new-relic-add.mdx @@ -118,7 +118,7 @@ Every time you install the New Relic add-on for Heroku, New Relic will automatic If you install the New Relic add-on multiple times and need to verify the URL your Heroku app uses for reporting to New Relic, look in your agent logs for a line indicating `reporting to` following by a URL using this format: ``` - rpm.newrelic.com/accounts/###/applications/###### + https://one.newrelic.com/redirect/entity/ ``` diff --git a/src/content/docs/agentic-ai/knowledge-integration/overview.mdx b/src/content/docs/agentic-ai/knowledge-integration/overview.mdx index 9b51b88f45cd..8d53e623178f 100644 --- a/src/content/docs/agentic-ai/knowledge-integration/overview.mdx +++ b/src/content/docs/agentic-ai/knowledge-integration/overview.mdx @@ -1,26 +1,27 @@ --- -title: "New Relic AI Knowledge connector" -metaDescription: "Knowledge connector is the process of integrating data from various sources to create a unified view of information. This unified view can be used to improve decision-making, automate processes, and enhance customer experiences." +title: "New Relic AI Knowledge" +metaDescription: "New Relic AI Knowledge integrates data from various sources to create a unified view of information. This unified view can be used to improve decision-making, automate processes, and enhance customer experiences." tags: freshnessValidatedDate: never redirects: - /docs/agentic-ai/knowledge-integration/knowledge-connector + - /docs/agentic-ai/knowledge-base/overview --- -To provide more context-specific answers, New Relic AI can use a technique called Retrieval Augmented Generation (RAG) through the New Relic AI knowledge connector. While New Relic AI LLMs have a vast general knowledge, RAG enhances their responses. +To provide more context-specific answers, New Relic AI can use a technique called Retrieval Augmented Generation (RAG) through New Relic AI Knowledge. While New Relic AI LLMs have a vast general knowledge, RAG enhances their responses. -By setting up the New Relic AI knowledge connector, you can expect tangible outcomes such as faster alert event resolution, more accurate and context-aware AI responses, and reduced manual searching across multiple documents. This unified approach helps your team make better decisions and respond to issues more efficiently. +By setting up New Relic AI Knowledge, you can expect tangible outcomes such as faster alert event resolution, more accurate and context-aware AI responses, and reduced manual searching across multiple documents. This unified approach helps your team make better decisions and respond to issues more efficiently. ## Use cases and value -The following examples show how the knowledge connector integration helps tackle challenges like fragmented documentation and slow alert event response by surfacing relevant information. +The following examples show how New Relic AI Knowledge helps tackle challenges like fragmented documentation and slow alert event response by surfacing relevant information. When a critical alert event occurs, you face a time-consuming investigation because historical context is fragmented across multiple sources like Confluence and runbooks. -The knowledge connector integrates all of these disparate sources, transforming the Retro DocSearch tool into a powerful historical intelligence engine that provides all the context in one place. This allows the tool to: +New Relic AI Knowledge integrates all of these disparate sources, transforming the Retro DocSearch tool into a powerful historical intelligence engine that provides all the context in one place. This allows the tool to: * Provide an immediate summary of an original alert event's root cause. * Present specific actionable steps from the runbook that resolved the issue. @@ -40,7 +41,7 @@ By leveraging RAG, the New Relic AI platform stores information from your existi ## Key features -With New Relic AI knowledge connector, you can: +With New Relic AI Knowledge, you can: - Gain access to relevant context from your internal runbooks and documentation directly within New Relic AI, leading to quicker mean time to resolution (MTTR). - The answers provided are specific to your environment and based on your own best practices and historical data. - Easily find solutions to problems that have been solved before. Ask questions like: @@ -57,14 +58,14 @@ With New Relic AI knowledge connector, you can: ## How it works High-level visual of Knowledge connector -The knowledge connector securely integrates with your content and knowledge bases, such as Confluence, to enhance New Relic AI's responses with your specific organizational knowledge. The process follows these steps: +New Relic AI Knowledge securely integrates with your content and knowledge bases, such as Confluence, to enhance New Relic AI's responses with your specific organizational knowledge. The process follows these steps: -- **Index:** Once your knowledge bases are connected to the New Relic AI platform, the knowledge connector performs an initial indexing of your documents. You can configure this process to run on a recurring basis, ensuring that New Relic AI always has access to the most up-to-date information as your documents evolve. +- **Index:** Once your knowledge bases are connected to the New Relic AI platform, New Relic AI Knowledge performs an initial indexing of your documents. You can configure this process to run on a recurring basis, ensuring that New Relic AI always has access to the most up-to-date information as your documents evolve. - **Retrieval:** When you ask a question in New Relic AI, the system searches the indexed content for the most relevant information. This step ensures that the context is pulled directly from your trusted, internal documentation. @@ -74,27 +75,27 @@ If a query doesn't require your organizational knowledge, New Relic AI will gene ## Prerequisites -Before you begin using the New Relic AI knowledge connector, ensure that: +Before you begin using New Relic AI Knowledge, ensure that: - Only documents suitable for organization-wide access are indexed. - Sensitive information is redacted. - All the documents to be indexed comply with your organization's internal data security and privacy policies. - New Relic AI is enabled for your account. -- Appropriate user permissions are configured for indexing (you'll need the Organization Manager role, which allows you to perform actions—such as set up and manage the knowledge connectors—that may have future billing implications). +- Appropriate user permissions are configured for indexing (you'll need the Organization Manager role, which allows you to perform actions—such as set up and manage New Relic AI Knowledge—that may have future billing implications). You have two options to assign the Organization Manager role: -- **Apply to an existing user group:** Add the Organization Manager role to an existing group of users who will be responsible for managing the knowledge connectors. +- **Apply to an existing user group:** Add the Organization Manager role to an existing group of users who will be responsible for managing New Relic AI Knowledge. - **Create a dedicated group:** For more granular control, create a new user group specifically for this purpose and assign the Organization Manager role to that group. This flexibility allows your organization to control who has the ability to manage indexed content. ## Configure data source and indexing frequency [#configure] -You can connect your knowledge sources using either pre-built connectors or the [knowledge connector API](/docs/apis/nerdgraph/examples/nerdgraph-rag) for more custom integrations. +You can connect your knowledge sources using either pre-built connectors or the [Knowledge API](/docs/apis/nerdgraph/examples/nerdgraph-rag) for more custom integrations. ### Best practices for optimizing your knowledge source content -To maximize the effectiveness of New Relic AI's ability to surface relevant information, provide accurate answers, and accelerate alert event resolution, it's crucial to structure your internal documentation with the AI in mind. While these guidelines focus on alert event retro documents for quick and efficient alert event management, the principles apply broadly to other knowledge types. The knowledge connector performs best when your source documents are clear, consistent, and rich in specific details relevant to their intended use. +To maximize the effectiveness of New Relic AI's ability to surface relevant information, provide accurate answers, and accelerate alert event resolution, it's crucial to structure your internal documentation with the AI in mind. While these guidelines focus on alert event retro documents for quick and efficient alert event management, the principles apply broadly to other knowledge types. New Relic AI Knowledge performs best when your source documents are clear, consistent, and rich in specific details relevant to their intended use. -Follow these best practices when creating and maintaining your retro documents and other knowledge base articles to ensure New Relic AI can optimally leverage the indexed information: +Follow these best practices when creating and maintaining your retro documents and other knowledge articles to ensure New Relic AI can optimally leverage the indexed information: - **Descriptive title:** Ensure each document has a clear and descriptive title. This helps New Relic AI fetch the closest matching content based on alert titles and user queries. For example, "Memory Leak in Service X during v2.3 Deployment" is more effective than "System Slowdown." @@ -124,7 +125,7 @@ Follow these best practices when creating and maintaining your retro documents a - **Owning team:** Clearly identify the team responsible for the service or component where the alert event originated or the team owning the resolution. -- **Regularly update and review:** Ensure your knowledge connector is configured to run on a recurring basis, and make it a practice to regularly review and update your source documents. This ensures New Relic AI always has access to the most up-to-date and accurate information. +- **Regularly update and review:** Ensure New Relic AI Knowledge is configured to run on a recurring basis, and make it a practice to regularly review and update your source documents. This ensures New Relic AI always has access to the most up-to-date and accurate information. To start indexing Confluence content, you need: @@ -137,7 +138,7 @@ To start indexing Confluence content, you need: - `read:content-details:confluence` - Relevant query parameter using Confluence Query Language (CQL) to filter the list of returned content to be indexed -To start indexing your content and benefit from the knowledge connector with New Relic AI, follow these mentioned steps: +To start indexing your content and benefit from New Relic AI Knowledge, follow these mentioned steps: @@ -146,7 +147,7 @@ To start indexing your content and benefit from the knowledge connector with New - Search for **NRAI Knowledge Connectors**. + Search for **NRAI Knowledge**. @@ -206,7 +207,7 @@ To start indexing your content and benefit from the knowledge connector with New - On successful configuration, you’ll see the status of your connector on the Connector overview page. + On successful configuration, you'll see the status of your connector on the Connector overview page. @@ -267,12 +268,12 @@ To start indexing your content and benefit from the knowledge connector with New ## Data synchronization and querying [#data-sync-query] -Once your data source is connected, New Relic will begin to synchronize and index your knowledge articles. After the initial synchronization is complete, your team can begin asking questions through the New Relic AI chat. Additionally, New Relic AI will automatically use the knowledge connector tool to search your indexed documents and provide contextual responses on the “What happened previously?” portion of the [issue page](/docs/alerts/alert-event-management/Issues-and-alert-event-management-and-response/#issue-summary). +Once your data source is connected, New Relic will begin to synchronize and index your knowledge articles. After the initial synchronization is complete, your team can begin asking questions through the New Relic AI chat. Additionally, New Relic AI will automatically use Knowledge to search your indexed documents and provide contextual responses on the "What happened previously?" portion of the [issue page](/docs/alerts/alert-event-management/Issues-and-alert-event-management-and-response/#issue-summary). ## Supported connectors - If you’d like to make a request for an unsupported connector, fill out this [form](https://forms.gle/ZHs4mpFKdsqtfNJW7). + If you'd like to make a request for an unsupported connector, fill out this [form](https://forms.gle/ZHs4mpFKdsqtfNJW7). Here are the supported connectors: @@ -297,7 +298,7 @@ Here are the supported connectors: @@ -312,4 +313,3 @@ Here are the supported connectors:
- Connect with your retrodocs to understand “How were similar issues resolved in the past?” + Connect with your retrodocs to understand "How were similar issues resolved in the past?"
- diff --git a/src/content/docs/agentic-ai/mcp/tool-reference.mdx b/src/content/docs/agentic-ai/mcp/tool-reference.mdx index 59ab887b7725..b6c02e8d2fe4 100644 --- a/src/content/docs/agentic-ai/mcp/tool-reference.mdx +++ b/src/content/docs/agentic-ai/mcp/tool-reference.mdx @@ -1,6 +1,6 @@ --- title: New Relic MCP tool reference -metaDescription: "Complete reference guide for all 35 tools available in New Relic's Model Context Protocol server, organized by category." +metaDescription: "Complete reference guide for all 36 tools available in New Relic's Model Context Protocol server, organized by category." translate: - jp freshnessValidatedDate: never @@ -63,7 +63,6 @@ In this example, the AI agent will only be presented with tools categorized unde - `list_related_entities`: List entities 1 hop away (related) from a given entity `GUID`. - `list_available_new_relic_accounts`: List all account `IDs` available to the user. - `list_dashboards`: List all dashboards for a New Relic account. -- `list_entity_types`: List the complete catalog of New Relic entity types with domain/type definitions. - `search_entity_with_tag`: Search for entities using a specific tag key and value. ## Data Access (tag: data-access) [#data-access] @@ -95,6 +94,7 @@ In this example, the AI agent will only be presented with tools categorized unde - `analyze_transactions`: Analyze transactions for a specific entity within a time window, identifying slow and error-prone transactions. - `list_garbage_collection_metrics`: List garbage collection and memory metrics for a given account and entity. - `list_recent_logs`: List recent logs from New Relic for the specified account and entity `GUID`. +- `list_entity_performance_risk_groups`: Fetch performance risks groups for a specific entity from the Performance Risks Inbox within a time window. ## Advanced analysis (tag: advanced-analysis) [#advanced-analysis] diff --git a/src/content/docs/agentic-ai/sre-agent/sre-agent-setup.mdx b/src/content/docs/agentic-ai/sre-agent/sre-agent-setup.mdx index b34be6bd11fd..74e46aeb9027 100644 --- a/src/content/docs/agentic-ai/sre-agent/sre-agent-setup.mdx +++ b/src/content/docs/agentic-ai/sre-agent/sre-agent-setup.mdx @@ -22,9 +22,6 @@ Learn how to set up and configure the SRE Agent for your organization Before setting up the SRE Agent, ensure you meet the following requirements: -### Account access -Access to the SRE Agent is available for customers on the **Advanced Compute** or **Advanced Compute Add-on** SKU. - ### Admin permissions (for setup) To set up the SRE Agent, you must be both an **Organization Administrator** and **Authentication Domain Manager**. diff --git a/src/content/docs/agentic-ai/sre-agent/use-sre-agent.mdx b/src/content/docs/agentic-ai/sre-agent/use-sre-agent.mdx index 4f1739f727f6..2551d3e7ad86 100644 --- a/src/content/docs/agentic-ai/sre-agent/use-sre-agent.mdx +++ b/src/content/docs/agentic-ai/sre-agent/use-sre-agent.mdx @@ -34,6 +34,19 @@ The agent uses tools designed to convert natural language into NRQL queries, whi Agents may not always act as you intend. For example, an agent may make a suggestion or initiate a process that it deems reasonable, but that may not align with what you had in mind. Due to this, we have incorporated a human-in-the-loop (you) for certain decision making in the SRE Agent design and provide configurable controls for SRE Agent access and permissions for more automated tasks. It is important for you to review suggestions carefully and validate those suggestions and next steps for your own context and circumstances. +## New Relic AI Knowledge with the SRE Agent [#knowledge] + +Connect [New Relic AI Knowledge](/docs/agentic-ai/knowledge-integration/overview/) to the SRE Agent so its answers draw on your team's own documents, not just general knowledge. Once connected, the agent searches your connected content during every investigation. + +With New Relic AI Knowledge enabled, you can: + +- Connect Confluence retros, postmortems, runbooks, and custom files (PDFs, CSVs, text files) so the agent's answers reflect your team's actual practices. +- Find the past incident that matches what you're seeing now, the steps that fixed it, and the team that handled it—so you spend less time investigating from scratch. +- Ask questions in plain language, such as "What are the standard triage steps for this alert?" or "Show me the runbook for a `database connection limit exceeded` error," and get an answer drawn directly from your own documentation. +- Schedule regular content updates so the agent always has access to your most current documents. + +For setup instructions and supported connectors, see [New Relic AI Knowledge](/docs/agentic-ai/knowledge-integration/overview/). + ## Next steps @@ -43,4 +56,4 @@ Agents may not always act as you intend. For example, an agent may make a sugges Review setup and configuration options. - \ No newline at end of file + diff --git a/src/content/docs/ai-monitoring/compatibility-requirements-ai-monitoring.mdx b/src/content/docs/ai-monitoring/compatibility-requirements-ai-monitoring.mdx index 6186c994fd65..6407be78b37a 100644 --- a/src/content/docs/ai-monitoring/compatibility-requirements-ai-monitoring.mdx +++ b/src/content/docs/ai-monitoring/compatibility-requirements-ai-monitoring.mdx @@ -43,7 +43,7 @@ AI monitoring is compatible with these agent versions and AI libraries: - * [AWS SDK for Java v2 Bedrock Runtime Client](https://github.com/aws/aws-sdk-java-v2/) versions 2.20.157 and above + For a full list of AI libraries supported by the Java agent, refer to [Built-in instrumentation for AI monitoring](/docs/apm/agents/java-agent/getting-started/compatibility-requirements-java-agent/#ai-monitoring) @@ -65,11 +65,7 @@ AI monitoring is compatible with these agent versions and AI libraries: - * [OpenAI Node.js API library](https://www.npmjs.com/package/openai) versions 4.0.0 and above. If your model uses streaming, the Node.js agent supports versions 4.12.2 and above - * [AWS SDK for JavaScript BedrockRuntime Client](https://www.npmjs.com/package/@aws-sdk/client-bedrock-runtime) versions 3.474.0 and above - * [LangChain.js](https://www.npmjs.com/package/langchain) versions 0.2.0 and above - * [Google Gen AI SDK](https://www.npmjs.com/package/@google/genai) versions 1.1.0 and above - * [MCP SDK](https://www.npmjs.com/package/@modelcontextprotocol/sdk) versions 1.13.0 and above + For full list of supported AIM libraries, refer to the [Node.js agent's compatibility requirements page](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent/#ai-monitoring-support). diff --git a/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alert-events.mdx b/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alert-events.mdx new file mode 100644 index 000000000000..3e6367fe5de0 --- /dev/null +++ b/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alert-events.mdx @@ -0,0 +1,24 @@ +--- +title: Understand compound alert events +tags: + - Alerts + - Compound alerts +metaDescription: 'Learn how compound alert events are created, correlated, and linked to component alert conditions in New Relic.' +freshnessValidatedDate: never +--- + + + We're still working on this feature, but we'd love for you to try it out! + + This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). + + +When a compound alert condition's trigger expression evaluates to true, New Relic opens a compound alert event. The event includes a link to your runbook URL. To view specific threshold breaches for each component condition, click through to the individual alert events. + +## Alert events and issue correlation [#alert-events-correlation] + +Compound alert conditions create multiple related alert events: + +* **Multiple alert events**: A compound alert condition creates its own compound alert event. By default, each component condition also creates its own alert events when it breaches its thresholds. To reduce noise, you can silence these events from the alert condition's configuration. If you silence a component condition's alert events, that condition's tags won't appear in the compound alert event. +* **Correlating to the same issue**: To ensure all related alert events (both compound and component) are grouped into the same issue, configure your component conditions to use the same policy as your compound alert condition. This allows New Relic's issue correlation to group them together. +* **Viewing related events**: From a compound alert event, you can navigate to the individual component alert events to see threshold breaches and metrics for each condition. diff --git a/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alerts.mdx b/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alerts.mdx new file mode 100644 index 000000000000..156cd66b7336 --- /dev/null +++ b/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alerts.mdx @@ -0,0 +1,56 @@ +--- +title: Introduction to Compound alerts +tags: + - Alerts + - Compound alerts +metaDescription: 'Use compound alerts to combine multiple alert conditions with logical operators to reduce noise and increase alert relevance.' +freshnessValidatedDate: never +--- + + + We're still working on this feature, but we'd love for you to try it out! + + This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). + + +When multiple related alert conditions fire separately, it creates alert noise and makes it harder to identify critical issues. While New Relic's existing correlation feature helps reduce this noise, you may need more precise control over when alerts trigger based on specific condition combinations. + +Compound alerts let you combine multiple alert conditions into a trigger expression using logical operators (AND, OR, NOT). They trigger only when specific combinations of conditions are met — or when one condition triggers but another does not — giving you fewer, more relevant notifications. + +A screenshot of how the compound alert builder works + +With **Compound alerts**, you can: + +* **Reduce alert noise**: Receive a single [compound alert event](/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alert-events) instead of separate alerts from multiple related conditions, reducing the overall volume of notifications. +* **Combine up to five alert conditions**: Select up to five existing alert conditions. Combine them using AND, OR, and NOT operators with parentheses for complex logic. +* **Combine cross-account conditions**: Include alert conditions that target data from different accounts. All component conditions must have the same owning account, but they can query data from other accounts. +* **Control facet matching**: Choose how to handle shared facets across conditions. The compound alert can trigger when the same facet value meets the threshold across all conditions, or trigger regardless of matching facet values. +* **Silence component condition alert events**: Configure individual alert condition thresholds to suppress their own alert events when they are part of a compound alert. This reduces noise from contributing conditions while keeping the compound alert active. +* **Add tags to compound conditions**: Organize and filter compound alert conditions using custom tags, just like standard alert conditions. Tags help you categorize alerts and streamline incident triage. + +## Use cases [#use-cases] + +Here are some use cases in which you might use compound alerts: + +* **Detect memory leaks**: Alert when memory > 50% (infrastructure) AND throughput < 1k (APM), which helps identify situations where memory increases without corresponding traffic. +* **Database performance issues**: Alert when database response time > 2s AND (CPU usage > 80% OR connection pool > 90%) AND NOT during maintenance window, helping identify performance degradation while avoiding noise during planned maintenance. + +## Permissions and access control [#permissions] + +Compound alerts use the same permission model as standard alert conditions: + +* Users who can create standard alert conditions can also [create compound alert conditions](/docs/alerts/create-alert/create-alert-condition/compound-alerts/create-compound-alert). +* All users with access to the account can view and manage compound alert conditions in that account. + +## Limitations [#limitations] + +When you use compound alerts, keep these limitations in mind: + +* **Maximum conditions**: You can combine up to five conditions in a single compound alert. +* **No nesting**: You can't use a compound alert condition as a component condition in another compound alert. +* **Account scope**: All component conditions must be from the same owning account (though they can target data from other accounts via cross-account conditions). +* **Facet matching**: When conditions are faceted by multiple attributes, a match occurs when at least one attribute is the same (granular control is not currently supported). diff --git a/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/create-compound-alert.mdx b/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/create-compound-alert.mdx new file mode 100644 index 000000000000..0439134938cc --- /dev/null +++ b/src/content/docs/alerts/create-alert/create-alert-condition/compound-alerts/create-compound-alert.mdx @@ -0,0 +1,69 @@ +--- +title: Create a compound alert condition +tags: + - Alerts + - Compound alerts +metaDescription: 'Step-by-step instructions for creating and managing compound alert conditions in New Relic.' +freshnessValidatedDate: never +--- + + + We're still working on this feature, but we'd love for you to try it out! + + This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). + + +To create a compound alert condition, + +1. Go to **Alerts > Compound Alerts**. + +2. All component conditions must be from the same owning account. Select it from the dropdown. + + + To include a condition that targets data from another account, set up a cross-account alert condition in the same owning account as the compound alert. + + +3. Click **Create a compound alert** and enter a name for the compound alert. + +4. Click **Add conditions** and choose up to five conditions. Each condition is automatically assigned a variable (a, b, c, d, e) for use in the trigger expression. You can only select standard alert conditions, not other compound alert conditions. See [compound alert limitations](/docs/alerts/create-alert/create-alert-condition/compound-alerts/compound-alerts#limitations) for all restrictions. + + A screenshot dispaying the condition selection process in the compound alert builder + + + Each condition may have multiple thresholds like warning, critical, or loss of signal. When any threshold of a condition is met, that condition is treated as triggered in the compound expression. + + +5. If your conditions share facets, select the checkbox to trigger only when the same facet value meets thresholds across all conditions. Leave it unselected to trigger regardless of matching facet values. + + + When a condition is faceted by multiple attributes, a match occurs when at least one attribute is the same across conditions. + + +6. To define how conditions should work together, in the **Tell us how you want these conditions to work together** field, write a trigger expression using the assigned variables and logical operators (AND, OR, NOT). Use parentheses to group expressions for complex logic. + + Examples: `a AND b`, `a OR b OR c`, `a AND (b OR c)`, `a AND NOT b`, `a AND (b OR c) AND NOT d` + +7. Set the **Threshold duration** to control how long the trigger expression must remain true before an alert event opens. + +8. From the **Policy** dropdown, select a policy. Learn more about [alert policies](/docs/alerts/organize-alerts/create-edit-or-find-alert-policy/). + + + To group compound and component alert events into the same issue, configure your component conditions to use the same policy you select here. + + +9. (Optional) To link to your incident-handling procedure, add a **Runbook URL**. This URL will be included in notifications. + +10. Toggle **Enable on save** to activate the condition immediately. + +11. Review your configuration, then save. The condition appears on the **Compound Alerts** page. + +## Manage compound alert conditions [#manage-compound-alerts] + +To view all compound alert conditions, go to **Alerts > Compound Alerts**. + +* **Edit**: Click any compound alert name to edit its configuration. Changes to component conditions automatically reflect in the compound alert. +* **Delete**: Click > **Delete**. Deleting a compound alert does not delete the individual component conditions — those remain active individually. diff --git a/src/content/docs/alerts/create-alert/create-alert-condition/create-nrql-alert-conditions.mdx b/src/content/docs/alerts/create-alert/create-alert-condition/create-nrql-alert-conditions.mdx index 54e73515ab4f..f3e894797134 100644 --- a/src/content/docs/alerts/create-alert/create-alert-condition/create-nrql-alert-conditions.mdx +++ b/src/content/docs/alerts/create-alert/create-alert-condition/create-nrql-alert-conditions.mdx @@ -902,7 +902,7 @@ Options for editing data gap settings: * In the NRQL conditions UI, go to **Condition settings > Advanced signal settings > fill data gaps with** and choose an option. * If using our [Nerdgraph API](/docs/alerts-applied-intelligence/new-relic-alerts/alerts-nerdgraph/nerdgraph-api-loss-signal-gap-filling) (preferred), this node is located at: `actor : account : alerts : nrqlCondition : signal : fillOption | fillValue` -* NerdGraph is our recommended API for this but if you're using our REST API, you can find this setting in the REST API explorer under the **"signal"** section of [the Alert NRQL conditions API](https://rpm.newrelic.com/api/explore/alerts_nrql_conditions/list). +* NerdGraph is our recommended API for this, but if you're using our REST API, you can find this setting in the REST API explorer under the **"signal"** section of [the Alert NRQL conditions API](https://api.newrelic.com/docs/#/Alerts%20NRQL%20Conditions). ### Evaluation delay [#evaluation-delay] diff --git a/src/content/docs/alerts/create-alert/examples/multi-location-synthetic-monitoring-alert-conditions.mdx b/src/content/docs/alerts/create-alert/examples/multi-location-synthetic-monitoring-alert-conditions.mdx index 0f82fcd03d71..87e18ffcefa9 100644 --- a/src/content/docs/alerts/create-alert/examples/multi-location-synthetic-monitoring-alert-conditions.mdx +++ b/src/content/docs/alerts/create-alert/examples/multi-location-synthetic-monitoring-alert-conditions.mdx @@ -135,4 +135,4 @@ Before creating a condition, read the [rules for multi-location conditions](#rul For example, multi-location condition REST API calls see the [REST API calls for alerts](/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/rest-api-alerts/rest-api-calls-alerts/#multilocation-synthetics-conditions) documentation. -To use the alerts REST API to manage multi-location conditions, use the [REST API explorer](https://rpm.newrelic.com/api/explore/alerts_location_failure_conditions/create). +To use the alerts REST API to manage multi-location conditions, use the [REST API explorer](https://api.newrelic.com/docs/#/Deprecation%20Notice%20-%20Alerts%20Location%20Failure%20Conditions). diff --git a/src/content/docs/alerts/create-alert/examples/scope-alert-thresholds-specific-instances.mdx b/src/content/docs/alerts/create-alert/examples/scope-alert-thresholds-specific-instances.mdx index 52aa1bc6d70b..8951b2c47f59 100644 --- a/src/content/docs/alerts/create-alert/examples/scope-alert-thresholds-specific-instances.mdx +++ b/src/content/docs/alerts/create-alert/examples/scope-alert-thresholds-specific-instances.mdx @@ -151,7 +151,7 @@ To create instance-based [alert conditions with the New Relic REST API](/docs/al * Your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). * The numeric [`entity_id`](/docs/using-new-relic/welcome-new-relic/get-started/glossary#entity) for the [entity](/docs/using-new-relic/welcome-new-relic/get-started/glossary#entity) being monitored -* The [`condition_id`](/docs/using-new-relic/welcome-new-relic/get-started/glossary#alert-condition) (available from the API Explorer: [**Alerts Conditions > GET > List**](https://rpm.newrelic.com/api/explore/alerts_entity_conditions/list)) +* The [`condition_id`](/docs/using-new-relic/welcome-new-relic/get-started/glossary#alert-condition) (available from the API Explorer: [**Alerts Conditions > GET > List**](https://api.newrelic.com/docs/#/Alerts%20Entity%20Conditions)) * The `entity_type` (set to `"application"`) * The `condition_scope` (set to `"instance"` for a Java application instance or `"application"` for a Java app) diff --git a/src/content/docs/alerts/create-alert/set-thresholds/outlier-detection.mdx b/src/content/docs/alerts/create-alert/set-thresholds/outlier-detection.mdx index 09705c16dc16..dd0908ace463 100644 --- a/src/content/docs/alerts/create-alert/set-thresholds/outlier-detection.mdx +++ b/src/content/docs/alerts/create-alert/set-thresholds/outlier-detection.mdx @@ -78,6 +78,64 @@ Follow these steps to create an alert condition with outlier detection: - Avoid over-segmentation which can reduce effectiveness. - Consider seasonality and business patterns when grouping. +### Handling delayed data and older timestamps [#handling-delayed-data-and-older-timestamps] + +Outlier detection works by comparing metrics from multiple entities at the same point in time. To make a fair comparison, all entities must report data for the same time window. + +#### The problem with delayed timestamps + +Imagine you're monitoring CPU usage across three servers at 2:00 PM: + +- **Server A** reports 45% CPU with timestamp `2:00 PM` +- **Server B** reports 50% CPU with timestamp `2:00 PM` +- **Server C** reports 95% CPU with timestamp `1:30 PM` + +Server C's data has an older timestamp (1:30 PM instead of 2:00 PM). The system cannot compare 1:30 PM data to 2:00 PM data—it's like comparing apples to oranges. As a result, Server C is excluded from the outlier analysis entirely. Even though Server C is clearly experiencing a problem, you won't get an alert because it was never evaluated. + +This happens when an entity consistently reports data with older timestamps than the current time window being analyzed. + +#### Common causes + +- **Cloud-provider polling:** AWS CloudWatch and similar services collect metrics on a schedule, then New Relic polls them later. For example, a metric representing 2:00 PM might not arrive at New Relic until 2:05 PM, creating a 5-minute delay. + +- **Long-running transactions:** Background jobs are timestamped when they start, not when they finish. A job that starts at 1:30 PM and runs for 30 minutes will have a 1:30 PM timestamp when its data arrives at 2:00 PM. + +- **Buffered data:** Network issues or agent settings can cause data to queue locally. When connectivity is restored, all buffered data arrives with its original timestamps. + +#### Identifying excluded entities + +To see which entities are being excluded and why, query the `NrAiSignal` event: + +```sql +FROM NrAiSignal +SELECT * +WHERE conditionId = 1234 +  AND outlierProcessingSkippedReason IS NOT NULL +``` + +Replace `1234` with your alert condition ID. Key fields to examine: + +- **`outlierProcessingSkippedReason`**: Why the signal was excluded (typically shows `LATE` for delayed data) +- **`outlierProcessingSkippedTimeDelta`**: The time difference in seconds between the data's timestamp and the current evaluation window + +#### Resolving the issue + +If you see a warning in the condition editor that signals are being excluded: + +**Option 1: Split the condition (Recommended)** + +Create separate alert conditions for entities with different reporting behaviors: +- One condition for real-time application servers +- Another condition for cloud-polled resources (like AWS CloudWatch metrics) + +This ensures each condition's aggregation window matches how its entities actually report data. + +**Option 2: Increase the aggregation window** + +Expand your aggregation window to accommodate delays. For example, if your data is consistently 3-5 minutes late, use a 5-minute aggregation window instead of 1 minute. + +**Trade-off:** Larger windows smooth out short-term spikes and increase the time before an alert triggers. A server that spikes at 2:00 PM might not trigger an alert until 2:05 PM or later. + ## Use cases and examples [#use-cases] - **Imbalanced Kafka brokers:** Quickly identify brokers with abnormal CPU I/O wait times, allowing administrators to proactively rebalance workloads before performance is impacted. diff --git a/src/content/docs/alerts/create-alert/set-thresholds/predictive-alerts.mdx b/src/content/docs/alerts/create-alert/set-thresholds/predictive-alerts.mdx index f9d783c3f040..790b74178fc0 100644 --- a/src/content/docs/alerts/create-alert/set-thresholds/predictive-alerts.mdx +++ b/src/content/docs/alerts/create-alert/set-thresholds/predictive-alerts.mdx @@ -114,7 +114,7 @@ If you set a window duration of 1 minute, the possible seasonal length will be H * If adequate historical data isn't available, the model will wait until enough data is accumulated before generating predictions. ## Predictive alerts billing [#predictive-alerts-billing] -The **Predictive Alerts** is an Advanced Compute Product feature offered as an [add-on](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/add-on-billing) or as a part of the Compute pricing model. Advanced [CCUs](/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions/#compute-capacity-unit) are consumed for both analysing historical data and generating predictions. +**Predictive Alerts** is available to all [Full platform users](/docs/accounts/accounts-billing/new-relic-one-user-management/user-type/#user-type-capabilities) across all customers. For customers on the [Data + User](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing/) pricing model, there's no extra cost. For customers on the [Data + Core Compute](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing/) pricing model, [Core CCUs](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing/#core-compute-capacity-unit) are consumed when historical data is analyzed and predictions are generated. ## Enable **Predictive Alerts** [#enable-predictive-alerts] diff --git a/src/content/docs/alerts/scale-automate/rest-api/disable-enable-alerts-conditions-using-api.mdx b/src/content/docs/alerts/scale-automate/rest-api/disable-enable-alerts-conditions-using-api.mdx index 602f6ba8b956..a731e64394d9 100644 --- a/src/content/docs/alerts/scale-automate/rest-api/disable-enable-alerts-conditions-using-api.mdx +++ b/src/content/docs/alerts/scale-automate/rest-api/disable-enable-alerts-conditions-using-api.mdx @@ -26,7 +26,7 @@ The REST API is no longer the preferred way to programmatically manage your aler Modifying any attribute in a condition using the API requires: * An [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key) and permissions to manage alerts -* The condition's `id` (available from [API Explorer:](https://rpm.newrelic.com/api/explore/alerts_condition/list) **Alerts Conditions > GET > List**) +* The condition's `id` (available from [API Explorer:](https://api.newrelic.com/docs/#/Alerts%20Conditions) **Alerts Conditions > GET > List**) * If your organization hosts data in the EU data center, ensure you are using the proper [API endpoints for EU region accounts](/docs/using-new-relic/welcome-new-relic/getting-started/introduction-eu-region-data-center#endpoints). ## Enable and disable a condition @@ -47,12 +47,12 @@ The process for disabling or enabling a condition is the same general process fo * [, , and ](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#conditions-list) Conditions available: `apm_app_metric`, `apm_kt_metric`, `browser_metric`, and `mobile_metric` - [API Explorer link Get>List](https://rpm.newrelic.com/api/explore/alerts_conditions/list) + [API Explorer link Get>List](https://api.newrelic.com/docs/#/Alerts%20Conditions) * [External services](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#ext-conditions-list) Conditions available: `apm_external_service`, `mobile_external_service` - [API Explorer link Get>List](https://rpm.newrelic.com/api/explore/alerts_external_service_conditions/list) + [API Explorer link Get>List](https://api.newrelic.com/docs/#/Alerts%20External%20Service%20Conditions) * [Synthetic monitoring](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#synthetics-conditions-list) - [API Explorer link Get>List](https://rpm.newrelic.com/api/explore/alerts_synthetics_conditions/list) + [API Explorer link Get>List](https://api.newrelic.com/docs/#/Alerts%20Synthetics%20Conditions) 3. For the returned JSON, find the JSON object of the condition you want to change. @@ -68,12 +68,12 @@ The process for disabling or enabling a condition is the same general process fo * [Conditions for APM, browser, and mobile](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#conditions-update) Conditions available: `apm_app_metric`, `apm_kt_metric`, `browser_metric`, and `mobile_metric` - [API Explorer PUT>Update link](https://rpm.newrelic.com/api/explore/alerts_conditions/update) + [API Explorer PUT>Update link](https://api.newrelic.com/docs/#/Alerts%20Conditions/put_alerts_conditions__condition_id__json) * [Conditions for external services](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#ext-conditions-update) Conditions available: `apm_external_service`, `mobile_external_service` - [API Explorer PUT>Update](https://rpm.newrelic.com/api/explore/alerts_external_service_conditions/update) + [API Explorer PUT>Update](https://api.newrelic.com/docs/#/Alerts%20External%20Service%20Conditions/put_alerts_external_service_conditions__condition_id__json) * [Conditions for Synthetic monitoring](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#synthetics-conditions-update)) - [API Explorer PUT>Update](https://rpm.newrelic.com/api/explore/alerts_synthetics_conditions/update) + [API Explorer PUT>Update](https://api.newrelic.com/docs/#/Alerts%20Synthetics%20Conditions/put_alerts_synthetics_conditions__condition_id__json) An Update API request can only change one condition at a time, it cannot update a vector of objects. For example, to change three conditions, you will have to make three separate requests. diff --git a/src/content/docs/alerts/troubleshooting/missing-alert-notifications.mdx b/src/content/docs/alerts/troubleshooting/missing-alert-notifications.mdx index e06e7e73fab5..5ab8b085d3c3 100644 --- a/src/content/docs/alerts/troubleshooting/missing-alert-notifications.mdx +++ b/src/content/docs/alerts/troubleshooting/missing-alert-notifications.mdx @@ -60,11 +60,11 @@ Here are some tips to avoid being placed on our suppression list: - Add your email to our allow list + Add our email to your allow list - Many messages can end up in you or your company’s spam filter. To ensure your system recognizes emails sent by us, add [noreply@newrelic.com](mailto:noreply@newrelic.com) and \*@mailer-d.newrelic.com to your allow list or “Safe Senders” list as a trusted email source. + Many messages can end up in your or your company’s spam filter. To ensure your system recognizes emails sent by us, add [noreply@newrelic.com](mailto:noreply@newrelic.com) and \*@mailer-d.newrelic.com to your allow list or “Safe Senders” list as a trusted email source. diff --git a/src/content/docs/apis/intro-apis/new-relic-api-keys.mdx b/src/content/docs/apis/intro-apis/new-relic-api-keys.mdx index e9ca545d3d12..cd071dedcf74 100644 --- a/src/content/docs/apis/intro-apis/new-relic-api-keys.mdx +++ b/src/content/docs/apis/intro-apis/new-relic-api-keys.mdx @@ -448,7 +448,7 @@ To create or manage API keys, use the UI at [one.newrelic.com/launcher/api-keys- The license key is a 40-character hexadecimal string associated with a New Relic account. When you first [sign up](/docs/subscriptions/creating-your-new-relic-account) for New Relic, an organization with a single account and its own license key are created. If more accounts are added, each account starts with its own license key. The license key originally created for an account cannot be deleted but you can create additional license keys that can be managed and deleted, and this is useful for implementing security-practices such as key rotation. If you need to replace an account's original account license key, [contact support](https://support.newrelic.com). - To restrict a user from being able to view or manage license keys, [assign them a role without those permissions].(/docs/accounts/accounts-billing/new-relic-one-user-management/user-permissions). + To restrict a user from being able to view or manage license keys, [assign them a role without those permissions](/docs/accounts/accounts-billing/new-relic-one-user-management/user-permissions). Anyone with access to the live chart URLs can view all the information from the underlying chart query. Ensure that information is shared cautiously and in compliance with your company's internal policies and procedures. @@ -205,13 +205,13 @@ This API retrieves live URLs for dashboard widgets, providing the title, URL, cr ``` - This API allows you to revoke the live URL associated with a specific dashboard widget. #### Input parameters - + @@ -230,9 +230,9 @@ This API retrieves live URLs for dashboard widgets, providing the title, URL, cr
- + #### Sample request - + ```graphql mutation { dashboardWidgetRevokeLiveUrl(uuid: "YOUR_LIVE_CHART_UUID") { @@ -249,9 +249,9 @@ This API retrieves live URLs for dashboard widgets, providing the title, URL, cr # uuid: xxx1afc8-6d1f-xxxx-9a33-373f64212xxx # } ``` - + #### Sample response - + ```json { "data": { @@ -265,3 +265,14 @@ This API retrieves live URLs for dashboard widgets, providing the title, URL, cr
+ +## Related topics + + + + Introduction to public sharing for dashboards and charts, with availability and pricing details. + + + Share individual charts with external viewers via live URLs. + + diff --git a/src/content/docs/apis/nerdgraph/examples/manage-live-dashboard-urls-via-api.mdx b/src/content/docs/apis/nerdgraph/examples/manage-live-dashboard-urls-via-api.mdx index d8378444dbcb..f1dee8dfea3b 100644 --- a/src/content/docs/apis/nerdgraph/examples/manage-live-dashboard-urls-via-api.mdx +++ b/src/content/docs/apis/nerdgraph/examples/manage-live-dashboard-urls-via-api.mdx @@ -9,8 +9,8 @@ metaDescription: Use New Relic NerdGraph to create, update, and revoke live dash freshnessValidatedDate: never --- -With the necessary [security and access set up](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts) you can create, manage, and revoke publicly accessible live dashboard URLs using queries and mutations in [NerdGraph](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph), -You can also do it from the [New Relic UI](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#dashboard). +With the necessary [access management configured](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#access-management) you can create, manage, and revoke publicly accessible live dashboard URLs using queries and mutations in [NerdGraph](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph), +You can also do it from the [New Relic UI](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly). If a shared dashboard is not password-protected, anyone with the live URL can access and view all the information it contains. To prevent unwanted access, ensure you [create password-protected URLs](#create-dashboard-url-with-psswd-nerdgraph) or [enable password protection for existing shared URLs](#enable-password-dashboard-url-nerdgraph). @@ -133,13 +133,13 @@ To avoid unwanted access to the shared dashboard, you can create a live dashboar } ``` - The `uuid` is the ID of the shared dashboard. You can use it to [update](#update-dashboard-url-nerdgraph) or [revoke](revoke-dashboard-url-nerdgraph) the shared dashboard URL through NerdGraph. To share the dashboard with external users, copy the URL and password from the response. Passwords can not be retrieved later. If you lose it, you only have to [reset the password](#reset-password-dashboard-url-nerdgraph) and share it again with the users. Follow our [password management best practices](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#password-management) to manage the password securely. + The `uuid` is the ID of the shared dashboard. You can use it to [update](#update-dashboard-url-nerdgraph) or [revoke](revoke-dashboard-url-nerdgraph) the shared dashboard URL through NerdGraph. To share the dashboard with external users, copy the URL and password from the response. Passwords can not be retrieved later. If you lose it, you only have to [reset the password](#reset-password-dashboard-url-nerdgraph) and share it again with the users. Follow our [password management best practices](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#password-management) to manage the password securely. -Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts/#permissions-to-custom-role) to modify the configuration of the shared dashboard. +Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard. To update the time period for the URL to be live: 1. Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql). @@ -178,7 +178,7 @@ To update the time period for the URL to be live: -Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts/#permissions-to-custom-role) to modify the configuration of the shared dashboard. +Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard. To enable password protection for a live dashboard URL: 1. Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql). 2. Construct a [graph API call](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardUpdateLiveUrlAuth` mutation with following parameters: @@ -224,13 +224,13 @@ To enable password protection for a live dashboard URL: } ``` - After enabling password for the shared dashboards, you need to share the password with the users. Copy and save the password, as you cann't retrieve it later. If you lose it, you only have to [reset the password](#reset-password-dashboard-url-nerdgraph) and share it again with the users. Follow our [password management best practices](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#password-management) to manage the password securely. + After enabling password for the shared dashboards, you need to share the password with the users. Copy and save the password, as you cann't retrieve it later. If you lose it, you only have to [reset the password](#reset-password-dashboard-url-nerdgraph) and share it again with the users. Follow our [password management best practices](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#password-management) to manage the password securely. -Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts/#permissions-to-custom-role) to modify the configuration of the shared dashboard. +Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard. To disable password protection for a live dashboard URL: 1. Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql). 2. Construct a [graph API call](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardUpdateLiveUrlAuth` mutation with following attribute values: @@ -272,7 +272,7 @@ To disable password protection for a live dashboard URL: -Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts/#permissions-to-custom-role) to modify the configuration of the shared dashboard. +Make sure you have the [permissions](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard. To reset the password for a live dashboard URL: 1. Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql). 2. Construct a [graph API call](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardResetLiveUrlPassword` mutation with the following attribute values: @@ -302,13 +302,13 @@ To reset the password for a live dashboard URL: } ``` - After resetting password for the shared dashboards, you need to share the new password with the users. Copy and save the password, as you cann't retrieve it later. If you lose it, you only have to reset it again. Follow our [password management best practices](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#password-management) to manage the password securely. + After resetting password for the shared dashboards, you need to share the new password with the users. Copy and save the password, as you cann't retrieve it later. If you lose it, you only have to reset it again. Follow our [password management best practices](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#password-management) to manage the password securely. -Based on the [permissions](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts/#permissions-to-custom-role) you have, you can revoke only the URLs you have created, or all URLs created by users in the account. To revoke a shared dashboard URL: +Based on the [permissions](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) you have, you can revoke only the URLs you have created, or all URLs created by users in the account. To revoke a shared dashboard URL: 1. Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql). 2. Construct a [graph API call](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardRevokeLiveUrl` mutation with the following attribute value: * `id`: Copy the ID from the shared dashboard URL and enter it. @@ -339,7 +339,7 @@ Based on the [permissions](/docs/query-your-data/explore-query-data/dashboards/p -Based on the [permissions](/docs/query-your-data/explore-query-data/dashboards/prerequisites-to-share-dashboards-charts/#permissions-to-custom-role) you have, you can retrieve the list of URLs you have created, or all URLs created by users in the account. To get the list of shared dashboard URLs: +Based on the [permissions](/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) you have, you can retrieve the list of URLs you have created, or all URLs created by users in the account. To get the list of shared dashboard URLs: 1. Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql). 2. Construct a [graph API call](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the following details: * `actor` > `dashboard` > `liveUrls`: Use this to retrieve the list of shared dashboard URLs. @@ -371,3 +371,14 @@ Based on the [permissions](/docs/query-your-data/explore-query-data/dashboards/p + +## Related topics + + + + Introduction to public sharing for dashboards and charts, with availability and pricing details. + + + Share entire dashboards with external viewers via live URLs, with password protection and expiration controls. + + diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-maintenance-windows-slm.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-maintenance-windows-slm.mdx new file mode 100644 index 000000000000..e6b668ac8547 --- /dev/null +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-maintenance-windows-slm.mdx @@ -0,0 +1,206 @@ +--- +title: "NerdGraph tutorial: Manage service level maintenance windows" +tags: + - Full-Stack Observability + - Observe everything + - Service level management + - SLI/SLO + - Maintenance windows + - NerdGraph +metaDescription: Learn how to create, update, delete, and query service level maintenance windows programmatically using the NerdGraph API. +freshnessValidatedDate: never +--- + +## Create a maintenance window [#create-mutation] + +Use the `maintenanceWindowCreate` mutation to create a new maintenance window for your service levels. + +### Parameters [#create-parameters] + +| Parameter | Data type | Description | +| --- | --- | --- | +| `name` | String | (Required) The name of the maintenance window. | +| `description` | String | (Optional) A description of the maintenance window. | +| `scope` | ScopedReferenceInput | (Required) The scope the maintenance window belongs to. Contains `id` (the account ID) and `type` (the entity scope — use `ACCOUNT` for service level maintenance windows). | +| `startTime` | NaiveDateTime | (Required) The start time of the maintenance window in ISO 8601 format. This time should be interpreted in the timezone specified in the `timezone` parameter. | +| `duration` | Duration | (Required) The duration of the maintenance window in ISO 8601 duration format (for example, `PT2H` for 2 hours, `PT30M` for 30 minutes). | +| `rrule` | String | (Optional) The recurrence rule of the maintenance window in iCalendar format (RFC 5545). Use this to create recurring maintenance windows. | +| `timezone` | String | (Required) The timezone of the maintenance window (for example, `America/New_York`, `Europe/London`). | +| `affectedEntityType` | String | (Required) The type of the affected entities. Use `SERVICE_LEVEL` for service level maintenance windows. | +| `affectedEntities` | \[ID\] | (Optional) The list of entity GUIDs affected by the maintenance window. | + +### Sample mutation [#create-sample] + +```graphql +mutation { + maintenanceWindowCreate( + maintenanceWindow: { + name: "Monthly System Upgrade" + description: "Scheduled maintenance for system upgrades" + scope: { id: "INSERT_YOUR_ACCOUNT_ID", type: ACCOUNT } + startTime: "2025-12-15T02:00:00" + duration: "PT4H" + rrule: "FREQ=MONTHLY;BYMONTHDAY=15" + timezone: "America/New_York" + affectedEntityType: "SERVICE_LEVEL" + affectedEntities: ["INSERT_ENTITY_GUID_1", "INSERT_ENTITY_GUID_2"] + } + ) { + id + name + description + startTime + duration + rrule + timezone + affectedEntityType + affectedEntities + } +} +``` + +## Update a maintenance window [#update-mutation] + +Use the `maintenanceWindowUpdate` mutation to update an existing maintenance window. + +### Parameters [#update-parameters] + +| Parameter | Data type | Description | +| --- | --- | --- | +| `id` | ID | (Required) The unique identifier of the maintenance window to update. | +| `name` | String | (Optional) The new name of the maintenance window. | +| `description` | String | (Optional) The new description of the maintenance window. | +| `startTime` | NaiveDateTime | (Optional) The new start time in ISO 8601 format. | +| `duration` | Duration | (Optional) The new duration in ISO 8601 duration format. | +| `rrule` | String | (Optional) The new recurrence rule in iCalendar format. | +| `timezone` | String | (Optional) The new timezone. | +| `affectedEntities` | \[ID\] | (Optional) The new list of entity GUIDs affected by the maintenance window. | + +### Sample mutation [#update-sample] + +```graphql +mutation { + maintenanceWindowUpdate( + id: "INSERT_MAINTENANCE_WINDOW_ID" + maintenanceWindow: { + name: "Updated System Upgrade Window" + duration: "PT6H" + affectedEntities: [ + "INSERT_ENTITY_GUID_1" + "INSERT_ENTITY_GUID_2" + "INSERT_ENTITY_GUID_3" + ] + } + ) { + id + name + description + startTime + duration + rrule + timezone + affectedEntityType + affectedEntities + } +} +``` + +## Delete a maintenance window [#delete-mutation] + +Use the `maintenanceWindowDelete` mutation to delete a maintenance window. + +### Sample mutation [#delete-sample] + +```graphql +mutation { + maintenanceWindowDelete(id: "INSERT_MAINTENANCE_WINDOW_ID") { + id + name + } +} +``` + +## Query maintenance windows by IDs [#query-by-ids] + +Use the `listByIds` query to retrieve specific maintenance windows by their IDs. + +### Sample query [#query-ids-sample] + +```graphql +query { + actor { + maintenanceWindow { + listByIds( + ids: [ + "INSERT_MAINTENANCE_WINDOW_ID_1" + "INSERT_MAINTENANCE_WINDOW_ID_2" + ] + ) { + maintenanceWindows { + id + name + description + startTime + duration + rrule + timezone + affectedEntityType + affectedEntities + scope { + id + type + } + metadata { + createdAt + createdBy + updatedAt + updatedBy + } + } + } + } + } +} +``` + +## Query maintenance windows by affected entity [#query-by-entity] + +Use the `listByAffectedEntityId` query to retrieve all maintenance windows that affect a specific entity. + +### Sample query [#query-entity-sample] + +```graphql +query { + actor { + maintenanceWindow { + listByAffectedEntityId(affectedEntityId: "INSERT_ENTITY_GUID") { + maintenanceWindows { + id + name + description + startTime + duration + rrule + timezone + affectedEntityType + affectedEntities + } + } + } + } +} +``` + +## Related topics [#related-topics] + + + + Learn what maintenance windows are and how they work. + + + Learn how to create, edit, and delete maintenance windows in the UI. + + + Learn how to create and manage SLIs and SLOs with NerdGraph. + + diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-manage-users.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-manage-users.mdx index 7939ec84cbda..ab0ae0449b11 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-manage-users.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-manage-users.mdx @@ -86,6 +86,8 @@ Here's an example query for getting the last active date and the user type for t ## Create users [#create-users] +The `name` field must meet [name field validation requirements](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-ui-and-tasks/#name-field-requirements). + Here's an example of creating a basic user: ```graphql diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-nrql-tutorial.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-nrql-tutorial.mdx index 6af46e3635a1..dbdd5d7fb4f4 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-nrql-tutorial.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-nrql-tutorial.mdx @@ -93,7 +93,7 @@ For how to create a dashboard with data from multiple accounts, see [the NerdGra ## Create embeddable charts [#embeddable-charts] -In addition to returning raw data, you can fetch embeddable chart links for the data to use in an application. Please refer to our [public chart docs](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#chart). +In addition to returning raw data, you can fetch embeddable chart links for the data to use in an application. Please refer to our [public chart docs](/docs/query-your-data/explore-query-data/dashboards/share-charts-publicly). ## Suggested facets [#suggest-facets] diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-rag.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-rag.mdx index 55ce4aac8780..e72f7ae06981 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-rag.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-rag.mdx @@ -3,6 +3,7 @@ title: "Set up RAG integration" metaDescription: Enhance New Relic AI with RAG (Retrieval Augmented Generation) redirects: - /docs/agentic-ai/knowledge-integration/apis-and-communication-protocol + - /docs/agentic-ai/knowledge-base/apis-and-communication-protocol freshnessValidatedDate: never --- @@ -10,13 +11,13 @@ With New Relic, you can enhance New Relic AI agents with Retrieval Augmented Gen After adding your documents, you will create a relationship to associate them with the RAG tool. You can then verify your configuration by querying the relationships between the RAG documents and the RAG tool. The final step is to query the RAG tool itself to retrieve relevant, indexed information. -To learn more about the knowledge connector, refer to [New Relic AI Knowledge connector](/docs/agentic-ai/knowledge-integration/overview). +To learn more about New Relic AI Knowledge, refer to [New Relic AI Knowledge](/docs/agentic-ai/knowledge-integration/overview). Before performing the following steps, ensure that you have "Org Product Admin" permissions. -To start indexing your content and benefit from the knowledge connector with New Relic AI, follow these mentioned steps: +To start indexing your content and benefit from New Relic AI Knowledge, follow these mentioned steps: ## Task 1: Create your RAG tool [#create-your-rag-tool] diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-custom-tutorial.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-custom-tutorial.mdx index 05336c42d072..e14e53b6b59d 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-custom-tutorial.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-custom-tutorial.mdx @@ -1,5 +1,5 @@ --- -title: "NerdGraph tutorial: Create custom role for Scorecards" +title: "Create custom roles for Scorecards" tags: - Scorecards - APIs @@ -10,40 +10,82 @@ metaDescription: How to use New Relic NerdGraph API to create Scorecards custom freshnessValidatedDate: never --- -A Scorecard serves as a container for various rules that collectively assess adherence to defined standards. Scorecards use rules to monitor compliance across different entities and teams, identify areas for improvement, and ensure alignment with both internal and external requirements. This document provides instruction on how to create and manage Scorecards and its rules in New Relic. +A Scorecard serves as a container for various rules that collectively assess adherence to defined standards. Scorecards use rules to monitor compliance across different entities and teams, identify areas for improvement, and ensure alignment with both internal and external requirements. -In New Relic, two types of users can manage Scorecards: +## Default Scorecards access [#default-access] -* Organization Product Admin -* Scorecard custom role users +New Relic provides default access to Scorecards through these standard roles: + + + + + + + + + + + + + + + + + +
ActionRequired role
View Scorecards[**Organization read only**](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#standard-roles)
Create, update, and delete Scorecards and rules[**Organization Product Admin**](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#standard-roles) or a custom Scorecards role
-This section provides instructions on using NerdGraph GraphQL mutations to create a custom role for managing Scorecards and associated rules. +You might need a custom role if the default permissions don't meet your organization's needs. -To create a Scorecards administrator custom role, you need to: +## Scorecards capabilities [#capabilities] -1. [Find the required permission IDs for Scorecards](#retrieve-organization-scoped-capabilities) -2. [Retrieve your organization ID](#retrieve-your-organization-id) -3. [Create the custom role for Scorecards administrator](#create-custom-role) -4. [Add the custom role to a user group](#add-custom-role-to-a-user-group) +When building a custom role for Scorecards, use the permissions below. Scorecards permissions are organization-scoped. + + + + + + + + + + + + + + + + + + + + + + + + + + +
CapabilityPermission identifier
Read Scorecards (also grants `scorecards.read.rule`)`scorecards.read.scorecard`
Create, update, and delete Scorecards`scorecards.modify.scorecard`
Read Scorecard rules`scorecards.read.rule`
Create, update, and delete Scorecard rules`scorecards.modify.rule`
+## Prerequisites [#prerequisites] -**Prerequisites:** +Before you begin, ensure you have: * [General NerdGraph requirements](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/#authentication) -* You must be an Organization Product Admin to create a custom role. - +* Organization Admin with `Organization Product Admin` role to create custom roles -## Mutations [#mutations] + +You can also create a custom role for Scorecards through the UI. For the permissions to select and the scope to use, see [Scorecards capabilities](/docs/service-architecture-intelligence/scorecards/getting-started/#scorecards-capabilities). + -New Relic provides various NerdGraph mutations to create custom role for Scorecards managers. +To create a custom role via the NerdGraph API, perform the following steps: - - - Use the `customerAdministration` query to retrieve a list of capabilities, their permission IDs, and related information. + + + ## Find the required permission IDs for Scorecards + Use the `customerAdministration` query to retrieve a list of capabilities, their permission IDs, and related information. Filter by `scope: "organization"` to get Scorecards permissions. #### Input parameters @@ -85,381 +127,383 @@ New Relic provides various NerdGraph mutations to create custom role for Scoreca #### Sample response - ```json - { - "data": { - "customerAdministration": { - "permissions": { - "items": [ - { - "category": "READ", - "feature": "Scorecards Rules", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "MANAGE", - "feature": "Scorecards Rules", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "READ", - "feature": "Scorecards", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "MANAGE", - "feature": "Scorecards", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "READ", - "feature": "Teams", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "OTHER", - "feature": "Teams", - "id": "xxxxxx", - "product": "New Relic One" - }, - { - "category": "DELETE", - "feature": "Teams", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "MODIFY", - "feature": "Teams", - "id": "xxxxxx", - "product": "New Relic One" - } - ] - } + ```json + { + "data": { + "customerAdministration": { + "permissions": { + "items": [ + { + "category": "READ", + "feature": "Scorecards Rules", + "id": "xxxxx", + "product": "New Relic One" + }, + { + "category": "MANAGE", + "feature": "Scorecards Rules", + "id": "xxxxx", + "product": "New Relic One" + }, + { + "category": "READ", + "feature": "Scorecards", + "id": "xxxxx", + "product": "New Relic One" + }, + { + "category": "MANAGE", + "feature": "Scorecards", + "id": "xxxxx", + "product": "New Relic One" + } + ] } } } - ``` - -Copy and paste the information related to Scorecards in a text file matching the following criteria: -* `category: MANAGE` -* `"feature": "Scorecards"` or `"Scorecards Rules"` - -For example, in the previous response, the following matches the criteria: - -```json -{ - "category": "MANAGE", - "feature": "Scorecards Rules", - "id": "xxxxx", - "product": "New Relic One" -}, -{ - "category": "MANAGE", - "feature": "Scorecards", - "id": "xxxxx", - "product": "New Relic One" -} -``` + } + ``` - - + From the response, identify and copy the permission IDs where `feature` is `"Scorecards"` or `"Scorecards Rules"` and `category` matches the access level you want to grant. You'll need these IDs in the next step. +
-Fetch your organization ID to use in various mutations further. + + ## Retrieve your organization ID + Retrieve your organization ID, which you'll use in subsequent mutations. -#### Sample request + #### Sample request -```graphql -{ - actor { - organization { - id - } - } -} -``` - - #### Sample response - - ```json - { - "data": { - "actor": { - "organization": { - "id": "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX" + ```graphql + { + actor { + organization { + id } } } - } - ``` + ``` -Copy the organization ID and keep it aside to create a role. + #### Sample response - - + ```json + { + "data": { + "actor": { + "organization": { + "id": "YOUR_ORGANIZATION_ID" + } + } + } + } + ``` -Run the `customRoleCreate` mutation to create your own custom role. + Copy your organization ID from the response. You'll need it to create the custom role. + + + ## Create the custom role -#### Input parameters + Use the `customRoleCreate` mutation to create your custom role for Scorecards management. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID copied in the previous step.
`type`StringYesSet the type to `organization`.
`name`StringYesThe name of the role.
`permissionIds`[Int]YesList the IDs for the feature identified using `customerAdministration` query for Scorecards and Scorecards rules.
`scope`StringYesSet the scope to `organization`.
+ #### Input parameters -#### Sample request + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID from the previous step.
`type`StringYesSet to `organization`.
`name`StringYesThe display name for the custom role.
`permissionIds`Array of IntegersYesThe Scorecards permission IDs identified in Step 1.
`scope`StringYesSet to `organization`.
-```graphql -mutation { - customRoleCreate( - container: { - id: "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX" - type: "organization" - } - name: "Scorecards manager" - permissionIds: [xxxxx, xxxxx] - scope: "organization" - ) { - id - } -} -``` - -#### Sample response - -```json -{ - "data": { - "customRoleCreate": { - "id": 9999999 + #### Sample request + + ```graphql + mutation { + customRoleCreate( + container: { + id: "YOUR_ORGANIZATION_ID" + type: "organization" + } + name: "Scorecards manager" + permissionIds: [xxxxx, xxxxx] + scope: "organization" + ) { + id + } } - } -} -``` + ``` - - - - - - - - - - - - - - - -
ParameterData TypeDescription
`id`IntThe custom role ID. Copy and keep this ID for future use.
+ #### Sample response - + ```json + { + "data": { + "customRoleCreate": { + "id": 9999999 + } + } + } + ``` - + Save the returned role ID — you'll need it to assign this role to a user group. +
-After you have created the custom role, you must associate this role with a user group on the New Relic platform. + + ## Add the custom role to a user group -### Fetch the group ID + After creating the custom role, assign it to a user group in New Relic. -You can use `customerAdministration` query to retrieve the list of group IDs. + ### Retrieve group IDs + Use the `customerAdministration` query to get a list of available user groups. -#### Input parameters + #### Input parameters - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID copied in the previous step.
+ + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID from the previous step.
-#### Sample request + #### Sample request -```graphql -{ - customerAdministration { - groups( - filter: { - organizationId: { eq: "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX" } - } - ) { - nextCursor - items { - id - name - users { + ```graphql + { + customerAdministration { + groups( + filter: { + organizationId: { eq: "YOUR_ORGANIZATION_ID" } + } + ) { + nextCursor items { id - email + name + users { + items { + id + email + } + } } } } } - } -} -``` + ``` -From the displayed list of group IDs, copy the desired group ID to associate the custom Scorecard role you created earlier. - -### Add the rule to a user group + From the response, copy the group ID for the group you want to assign the Scorecards role to. -You can use `authorizationManagementGrantAccess` mutation to add the role to a user group. + ### Assign the role to the group + Use the `authorizationManagementGrantAccess` mutation to assign the custom role to a user group. -#### Input parameters + #### Input parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`roleId`StringYesThe custom role ID created in the Custom role section.
`groupId`StringNoThe group ID retrieved in the previous step.
+ + + + + + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`roleId`StringYesThe custom role ID from the previous step.
`groupId`StringYesThe group ID retrieved above.
-#### Sample request + #### Sample request -```graphql -mutation { - authorizationManagementGrantAccess( - grantAccessOptions: { - organizationAccessGrants: { roleId: "99999999" } - groupId: "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX" - } - ) { - roles { - id - name - organizationId - roleId - groupId - displayName + ```graphql + mutation { + authorizationManagementGrantAccess( + grantAccessOptions: { + organizationAccessGrants: { roleId: "YOUR_ROLE_ID" } + groupId: "YOUR_GROUP_ID" + } + ) { + roles { + id + name + organizationId + roleId + groupId + displayName + } + } } - } -} -``` - -#### Sample response - -```json -{ - "data": { - "authorizationManagementGrantAccess": { - "roles": [ - { - "displayName": "Scorecards manager", - "groupId": null, - "id": "99999999", - "name": "scorecards_manager", - "organizationId": "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX", - "roleId": 99999 + ``` + + #### Sample response + + ```json + { + "data": { + "authorizationManagementGrantAccess": { + "roles": [ + { + "displayName": "Scorecards manager", + "groupId": null, + "id": "99999999", + "name": "scorecards_manager", + "organizationId": "YOUR_ORGANIZATION_ID", + "roleId": 99999 + } + ] } - ] + } } - } -} -``` + ``` +
+
- - +## Manage existing custom roles [#manage-roles] + + + Use the `customRoleUpdate` mutation to rename a role or replace its permission set. + + ```graphql + mutation { + customRoleUpdate( + id: ROLE_ID + name: "Updated role name" + permissionIds: [xxxxx, xxxxx] + ) { + id + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription
`id`The ID of the role to update.
`name`New display name for the role.
`permissionIds`Full replacement list of permission IDs. This replaces all existing permissions on the role.
+
-## Check the new role in New Relic platform [#check-role] + + Use the `customRoleDelete` mutation to permanently remove a custom role. -You can validate if the scorecard role is reflecting in the New Relic platform. + ```graphql + mutation { + customRoleDelete(id: ROLE_ID) { + id + } + } + ``` -**To check the role:** + The response returns the ID of the deleted role, confirming successful deletion. + -1. Log in to your new relic account. -2. Click on your name at the bottom left. -3. Go to **Administration > Access Management**. -4. Click the **Grants** tab: - You can see the custom role you created in the list of roles: + + Use the following query to look up a role ID by browsing your organization's groups and their assigned roles. - A diagram showing a custom Scorecards Manager role to manage Scorecards + ```graphql + { + actor { + organization { + authorizationManagement { + authenticationDomains(id: "YOUR_AUTHENTICATION_DOMAIN_ID") { + authenticationDomains { + groups { + groups { + displayName + id + roles { + roles { + roleId + name + } + } + } + } + } + } + } + } + } + } + ``` + +
+For more information about Scorecards, see the [Scorecards documentation](/docs/service-architecture-intelligence/scorecards/getting-started/). diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-tutorial.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-tutorial.mdx index 279ab51487a9..430df2519096 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-tutorial.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-scorecards-tutorial.mdx @@ -11,7 +11,7 @@ freshnessValidatedDate: never New Relic lets you to use NerdGraph [Scorecards](/docs/service-architecture-intelligence/scorecards/getting-started) GraphQL mutations to manage Scorecards and rules. These mutations let you create, update, delete, and retrieve Scorecards and their associated rules in your existing workflows and integrations. -This tutorial provides examples of how to use NerdGraph to manage Scorecards and rules. You can use these examples to automate Scorecard management tasks, such as creating Scorecards, adding rules, and updating Scorecard details. +This tutorial provides examples of how to use NerdGraph to manage Scorecards and rules. You can use these examples to automate Scorecard management tasks, such as creating Scorecards, adding rules, and updating Scorecard details. If you need to set up custom permissions for managing Scorecards, see [Create custom roles for Scorecards](/docs/apis/nerdgraph/examples/nerdgraph-scorecards-custom-tutorial). ## Mutations [#mutations] diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-custom-role-tutorial.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-custom-role-tutorial.mdx index 63ce0cbe3398..953e5d7e411f 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-custom-role-tutorial.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-custom-role-tutorial.mdx @@ -1,5 +1,5 @@ --- -title: "NerdGraph tutorial: Create custom role for Teams" +title: "Create custom roles for Teams" tags: - Teams - APIs @@ -10,54 +10,98 @@ metaDescription: How to use New Relic NerdGraph API to create a custom role to c freshnessValidatedDate: never --- - - We're still working on this feature, but we'd love for you to try it out! - - This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). - - - New Relic Teams lets you connect the entities you're monitoring to the teams who own them. When you can easily see who owns an entity, you can speed up troubleshooting, enhance team collaboration, and improve your operational efficiency. -## Default Teams access +## Default Teams access [#default-access] New Relic provides default access to Teams through these standard roles: -* **Read Access**: All users have read access to Teams, including metadata such as contact information, team members, and other relevant details. -* **Modify Teams**: Users with the **Organization Product Admin** role can modify Teams. This is a new role assigned to all users who currently have the **All Product Admin** role. -* **Create & Delete Teams**: Users with **Organization Manager** or **Authentication Manager** roles can create and delete Teams. - - -You might need a custom role if the default permissions don't meet your organization's needs. This tutorial shows you how to use NerdGraph GraphQL mutations to create a custom role for managing Teams. + + + + + + + + + + + + + + + + + + + + + +
ActionRequired role
View teams[**Organization read only**](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#standard-roles)
Modify teams[**Organization Product Admin**](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#standard-roles)
Create and delete teams[**Organization Manager**](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#standard-roles) or [**Authentication Manager**](/docs/accounts/accounts-billing/new-relic-one-user-management/user-management-concepts/#standard-roles)
-### Process overview +You might need a custom role if the default permissions don't meet your organization's needs. -To create a Teams administrator custom role, you'll need to: +## Teams capabilities [#capabilities] -1. [Find the required permission IDs for Teams](#retrieve-organization-scoped-capabilities) -2. [Retrieve your organization ID](#retrieve-your-organization-id) -3. [Create the custom role for Teams administrator](#create-custom-role) -4. [Add the custom role to a user group](#add-custom-role-to-a-user-group) +When building a custom role for Teams, use the permissions below. Teams permissions are organization-scoped. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CapabilityPermission identifier
Read teams`teams.read.team`
Delete teams`teams.delete.team`
Create teams`teams.create.team`
Modify teams`teams.update.team`
Read access to the automations/settings page`teams.read.organization_settings`
Modify access to the automations/settings page`teams.manage.organization_settings`
Create teams from IdP user groups (for example, Okta)`authentication_domain.read.groups`
-## Prerequisites +## Prerequisites [#prerequisites] Before you begin, ensure you have: * [General NerdGraph requirements](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/#authentication) -* Organization Admin with `Authentication Domain Manager` role to create custom roles - +* Organization Admin with `Authentication Domain Manager` role to create custom roles -## Mutations [#mutations] + +You can also create a custom role for Teams through the UI. For the permissions to select and the scope to use, see [Teams capabilities](/docs/service-architecture-intelligence/teams/teams/#teams-capabilities). + -New Relic provides various NerdGraph mutations to create custom role for Team managers. +To create a custom role via the NerdGraph API, perform the following steps: - - - Use the `customerAdministration` query to retrieve a list of capabilities, their permission IDs, and related information. + + + ## Find the required permission IDs for Teams + Use the `customerAdministration` query to retrieve a list of capabilities, their permission IDs, and related information. Filter by `scope: "organization"` to get Teams permissions. #### Input parameters @@ -83,333 +127,399 @@ New Relic provides various NerdGraph mutations to create custom role for Team ma #### Sample request ```graphql - { + { customerAdministration { permissions(filter: {scope: {eq: "organization"}}) { - items { - feature - category - id - product - } + items { + feature + category + id + product } } } - + } ``` #### Sample response - ```graphql - { - "data": { - "customerAdministration": { - "permissions": { - "items": [ - { - "category": "READ", - "feature": "Teams", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "OTHER", - "feature": "Teams", - "id": "xxxxxx", - "product": "New Relic One" - }, - { - "category": "DELETE", - "feature": "Teams", - "id": "xxxxx", - "product": "New Relic One" - }, - { - "category": "MODIFY", - "feature": "Teams", - "id": "xxxxxx", - "product": "New Relic One" - } - ] - } + ```json + { + "data": { + "customerAdministration": { + "permissions": { + "items": [ + { + "category": "READ", + "feature": "Teams", + "id": "xxxxx", + "product": "New Relic One" + }, + { + "category": "OTHER", + "feature": "Teams", + "id": "xxxxxx", + "product": "New Relic One" + }, + { + "category": "DELETE", + "feature": "Teams", + "id": "xxxxx", + "product": "New Relic One" + }, + { + "category": "MODIFY", + "feature": "Teams", + "id": "xxxxxx", + "product": "New Relic One" + } + ] } } } - + } ``` - **Next step**: From the response, identify and copy the permission IDs where: - * `category: "MANAGE"` (or the appropriate category for your needs) - * `feature: "Teams"` - - You'll need these IDs for the next step. - + From the response, identify and copy the permission IDs where `feature` is `"Teams"` and the `category` matches the access level you want to grant. You'll need these IDs in the next step. + + + ## Retrieve your organization ID - - - -Retrieve your organization ID, which you'll use in subsequent mutations. + Retrieve your organization ID, which you'll use in subsequent mutations. -#### Sample request + #### Sample request -```graphql - { - actor { - organization { - id + ```graphql + { + actor { + organization { + id + } } } - } - - ``` + ``` - #### Sample response + #### Sample response - ```graphql - { - "data": { - "actor": { - "organization": { - "id": "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX" + ```json + { + "data": { + "actor": { + "organization": { + "id": "YOUR_ORGANIZATION_ID" + } } } } - } - - ``` - - **Next step**: Copy your organization ID from the response. You'll need it to create the custom role. - - - + ``` -Use the `customRoleCreate` mutation to create your custom role for Teams management. + Copy your organization ID from the response. You'll need it to create the custom role. + + + ## Create the custom role -#### Input parameters + Use the `customRoleCreate` mutation to create your custom role for Teams management. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID copied in the previous step.
`type`StringYesSet the type to `organization`.
`name`StringYesThe name of the role.
`permissionIds`Array of IntegersYesThe permission IDs for Teams features identified in the first step.
`scope`StringYesSet the scope to `organization`.
- -#### Sample request - -```graphql - -mutation { - customRoleCreate( - container: {id: "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX", type: "organization"} - name: "Teams manager" - permissionIds: [xxxxx, xxxxx] - scope: "organization" - ) { - id - } -} + #### Input parameters -``` -#### Sample response + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID from the previous step.
`type`StringYesSet to `organization`.
`name`StringYesThe display name for the custom role.
`permissionIds`Array of IntegersYesThe Teams permission IDs identified in Step 1.
`scope`StringYesSet to `organization`.
-```graphql + #### Sample request -{ - "data": { - "customRoleCreate": { - "id": 9999999 + ```graphql + mutation { + customRoleCreate( + container: { + id: "YOUR_ORGANIZATION_ID" + type: "organization" + } + name: "Teams manager" + permissionIds: [xxxxx, xxxxx] + scope: "organization" + ) { + id + } } - } -} - -``` - -**Next step**: Save the returned role ID. You'll need it to assign this role to a user group. + ``` -
+ #### Sample response - + ```json + { + "data": { + "customRoleCreate": { + "id": 9999999 + } + } + } + ``` -After creating the custom role, you need to assign it to a user group in New Relic. + Save the returned role ID — you'll need it to assign this role to a user group. + -### Step 1: Retrieve group IDs + + ## Add the custom role to a user group -Use the `customerAdministration` query to get a list of available user groups. + After creating the custom role, assign it to a user group in New Relic. + ### Retrieve group IDs -#### Input parameters + Use the `customerAdministration` query to get a list of available user groups. - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID copied in the previous step.
+ #### Input parameters -#### Sample request + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`id`StringYesThe organization ID from the previous step.
-```graphql + #### Sample request -{ - customerAdministration { - groups(filter: {organizationId: {eq: "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX"}}) { - nextCursor - items { - id - name - users { + ```graphql + { + customerAdministration { + groups( + filter: { + organizationId: { eq: "YOUR_ORGANIZATION_ID" } + } + ) { + nextCursor items { id - email + name + users { + items { + id + email + } + } } } } } - } -} + ``` -``` + From the response, copy the group ID for the group you want to assign the Teams role to. -**Next step**: From the response, copy the group ID for the group you want to assign the Teams role to. - -### Step 2: Assign the role to a user group + ### Assign the role to the group -Use the `authorizationManagementGrantAccess` mutation to assign the custom role to a user group. + Use the `authorizationManagementGrantAccess` mutation to assign the custom role to a user group. + #### Input parameters -#### Input parameters + + + + + + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`roleId`StringYesThe custom role ID from the previous step.
`groupId`StringYesThe group ID retrieved above.
- - - - - - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`roleId`StringYesThe custom role ID from the previous step.
`groupId`StringYesThe group ID from Step 1.
+ #### Sample request -#### Sample request - -```graphql -mutation { - authorizationManagementGrantAccess( - grantAccessOptions: {organizationAccessGrants: {roleId: "99999999"}, groupId: "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX"} - ) { - roles { - id - name - organizationId - roleId - groupId - displayName + ```graphql + mutation { + authorizationManagementGrantAccess( + grantAccessOptions: { + organizationAccessGrants: { roleId: "YOUR_ROLE_ID" } + groupId: "YOUR_GROUP_ID" + } + ) { + roles { + id + name + organizationId + roleId + groupId + displayName + } + } } - } -} - -``` - -#### Sample response - -```graphql -{ - "data": { - "authorizationManagementGrantAccess": { - "roles": [ - { - "displayName": "Teams manager", - "groupId": null, - "id": "99999999", - "name": "teams_manager", - "organizationId": "xxx****xxx-xx**00**-xxx-x*x*-xx**XXX**XX", - "roleId": 99999 + ``` + + #### Sample response + + ```json + { + "data": { + "authorizationManagementGrantAccess": { + "roles": [ + { + "displayName": "Teams manager", + "groupId": null, + "id": "99999999", + "name": "teams_manager", + "organizationId": "YOUR_ORGANIZATION_ID", + "roleId": 99999 + } + ] } - ] + } + } + ``` +
+ + +## Manage existing custom roles [#manage-roles] + + + + Use the `customRoleUpdate` mutation to rename a role or replace its permission set. + + ```graphql + mutation { + customRoleUpdate( + id: ROLE_ID + name: "Updated role name" + permissionIds: [xxxxx, xxxxx] + ) { + id + } } - } -} + ``` -``` + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription
`id`The ID of the role to update.
`name`New display name for the role.
`permissionIds`Full replacement list of permission IDs. This replaces all existing permissions on the role.
-
-## What's next + + Use the `customRoleDelete` mutation to permanently remove a custom role. + + ```graphql + mutation { + customRoleDelete(id: ROLE_ID) { + id + } + } + ``` + + The response returns the ID of the deleted role, confirming successful deletion. + -After successfully creating and assigning your custom Teams role, users in the assigned group will have the permissions you configured. You can: + + Use the following query to look up a role ID by browsing your organization's groups and their assigned roles. -* Monitor the role's usage through your organization's user management -* Modify the role permissions if needed using similar NerdGraph mutations -* Create additional custom roles for different levels of Teams access + ```graphql + { + actor { + organization { + authorizationManagement { + authenticationDomains(id: "YOUR_AUTHENTICATION_DOMAIN_ID") { + authenticationDomains { + groups { + groups { + displayName + id + roles { + roles { + roleId + name + } + } + } + } + } + } + } + } + } + } + ``` + +
-For more information about Teams, see our [Teams documentation](/docs/service-architecture-intelligence/teams/teams/). +For more information about Teams, see the [Teams documentation](/docs/service-architecture-intelligence/teams/teams/). diff --git a/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-tutorial.mdx b/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-tutorial.mdx index 0753cfbf21c6..3e748b3efe9c 100644 --- a/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-tutorial.mdx +++ b/src/content/docs/apis/nerdgraph/examples/nerdgraph-teams-tutorial.mdx @@ -11,7 +11,7 @@ freshnessValidatedDate: never As an alternative to setting up New Relic teams in the UI, you can set them up programmatically with our NerdGraph API. -For an easy way to get started, use our [NerdGraph API explorer](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) to create and edit teams information. Definitions are available in NerdGraph for each of the fields in the examples below. If you need help using the GraphiQL IDE, see our [NerdGraph API explorer tutorial](/docs/apis/nerdgraph/get-started/nerdgraph-explorer/). +For an easy way to get started, use our [NerdGraph API explorer](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) to create and edit teams information. Definitions are available in NerdGraph for each of the fields in the examples below. If you need help using the GraphiQL IDE, see our [NerdGraph API explorer tutorial](/docs/apis/nerdgraph/get-started/nerdgraph-explorer/). If you need to set up custom permissions for managing Teams, see [Create custom roles for Teams](/docs/apis/nerdgraph/examples/nerdgraph-teams-custom-role-tutorial). ## Create a team [#create-a-team] @@ -362,7 +362,6 @@ mutation { } ``` - diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/broken-links-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/broken-links-monitor.mdx index a517ffbd48d1..733091b93336 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/broken-links-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/broken-links-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [broken links monitors](/docs/synth ## Create a broken links monitor [#create-broken-links] -You can create a broken links monitor using the `syntheticsCreateBrokenLinksMonitor` mutation. This mutation allows you to set up monitoring for broken links on any webpage. +You can create a broken links monitor using the `syntheticsCreateBrokenLinksMonitor` mutation. This mutation allows you to set up monitoring for broken links on any webpage. ### Input parameters @@ -120,7 +120,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a broken links monitor [#update-broken-links] -You can update an existing broken links monitor using the `syntheticsUpdateBrokenLinksMonitor` mutation. This allows you to modify the configuration of a broken links monitor that has already been created. +You can update an existing broken links monitor using the `syntheticsUpdateBrokenLinksMonitor` mutation. This allows you to modify the configuration of a broken links monitor that has already been created. ### Input parameters @@ -230,6 +230,17 @@ If there are any issues updating the monitor, the `errors` array will contain ob ## Delete a broken links monitor [#delete-monitor] -When a broken links monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. +When a broken links monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. -To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. \ No newline at end of file +To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. + +## Query broken links monitors [#query-broken-links-monitors] + +Use NerdGraph to retrieve metadata, map IDs, or check the status of your broken links monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. \ No newline at end of file diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/certificate-check-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/certificate-check-monitor.mdx index 48b890b6c958..5dd552730093 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/certificate-check-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/certificate-check-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [certificate check monitors](/docs/ ## Create a certificate check monitor [#create-certificate-check] -You can create a certificate check monitor using the `syntheticsCreateCertCheckMonitor` mutation. This mutation allows you to set up monitoring for SSL certificate expiration on any domain. +You can create a certificate check monitor using the `syntheticsCreateCertCheckMonitor` mutation. This mutation allows you to set up monitoring for SSL certificate expiration on any domain. ### Input parameters @@ -120,7 +120,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a certificate check monitor [#update-certificate-check] -You can update an existing certificate check monitor using the `syntheticsUpdateCertCheckMonitor` mutation. This allows you to modify the configuration of a certificate check monitor that has already been created. +You can update an existing certificate check monitor using the `syntheticsUpdateCertCheckMonitor` mutation. This allows you to modify the configuration of a certificate check monitor that has already been created. ### Input parameters @@ -227,6 +227,17 @@ If there are any issues updating the monitor, the `errors` array will contain ob ## Delete a certificate check monitor [#delete-monitor] -When a certificate check monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. +When a certificate check monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. + +## Query certificate check monitors [#query-certificate-check-monitors] + +Use NerdGraph to retrieve metadata, map IDs, or check the status of your certificate check monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/monitor-downtimes.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/monitor-downtimes.mdx index deadc1ddcf80..da371a6bce6d 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/monitor-downtimes.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/monitor-downtimes.mdx @@ -17,7 +17,7 @@ Monitor downtimes let you schedule periods when your synthetic monitors stop run ## Create a one-time monitor downtime [#create-once-downtime] -You can create a one-time monitor downtime using the `syntheticsCreateOnceMonitorDowntime` mutation. Use this for planned maintenance or events that happen only once. +You can create a one-time monitor downtime using the `syntheticsCreateOnceMonitorDowntime` mutation. Use this for planned maintenance or events that happen only once. ### Input parameters @@ -95,7 +95,7 @@ mutation { ## Create a daily recurring monitor downtime [#create-daily-downtime] -You can create a daily recurring monitor downtime using the `syntheticsCreateDailyMonitorDowntime` mutation. Use this for regular maintenance windows that occur every day. +You can create a daily recurring monitor downtime using the `syntheticsCreateDailyMonitorDowntime` mutation. Use this for regular maintenance windows that occur every day. ### Input parameters @@ -187,7 +187,7 @@ mutation { ## Create a weekly recurring monitor downtime [#create-weekly-downtime] -You can create a weekly recurring monitor downtime using the `syntheticsCreateWeeklyMonitorDowntime` mutation. Use this for maintenance windows that occur on specific days of the week. +You can create a weekly recurring monitor downtime using the `syntheticsCreateWeeklyMonitorDowntime` mutation. Use this for maintenance windows that occur on specific days of the week. ### Input parameters @@ -287,7 +287,7 @@ mutation { ## Create a monthly recurring monitor downtime [#create-monthly-downtime] -You can create a monthly recurring monitor downtime using the `syntheticsCreateMonthlyMonitorDowntime` mutation. Use this for maintenance windows that occur on specific days each month. +You can create a monthly recurring monitor downtime using the `syntheticsCreateMonthlyMonitorDowntime` mutation. Use this for maintenance windows that occur on specific days each month. ### Input parameters @@ -399,7 +399,7 @@ mutation { ## Update a monitor downtime [#update-downtime] -You can update an existing monitor downtime using the `syntheticsEditMonitorDowntime` mutation. This allows you to modify any downtime type (once, daily, weekly, or monthly) using this single mutation. +You can update an existing monitor downtime using the `syntheticsEditMonitorDowntime` mutation. This allows you to modify any downtime type (once, daily, weekly, or monthly) using this single mutation. ### Input parameters @@ -532,7 +532,7 @@ mutation { ## Delete a monitor downtime [#delete-downtime] -You can delete a monitor downtime using the `syntheticsDeleteMonitorDowntime` mutation. Once deleted, the scheduled downtime will be removed and monitors will resume their normal schedule. +You can delete a monitor downtime using the `syntheticsDeleteMonitorDowntime` mutation. Once deleted, the scheduled downtime will be removed and monitors will resume their normal schedule. ### Input parameters @@ -566,3 +566,12 @@ mutation { } } ``` + +## Query monitor downtimes [#query-monitor-downtimes] + +Use NerdGraph to retrieve downtime schedules, configurations, and metadata. + +For more information, refer to: +- [Query monitor downtimes](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitor-downtimes) - Get all scheduled monitor downtimes with their configurations. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/overview.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/overview.mdx index 1fb903c2e62c..7206ebdd5761 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/overview.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/overview.mdx @@ -112,13 +112,10 @@ In addition to monitors, you can manage supporting infrastructure and configurat Use [query operations](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) to retrieve information about your synthetic monitoring setup: -* Query all monitors in your account -* Retrieve private location configurations -* List secure credentials (metadata only) -* View scheduled monitor downtimes -* Get monitor scripts and step configurations -* Map monitor IDs to entity GUIDs -* Check runtime upgrade status for legacy monitors +* **General queries**: Query all monitors in your account with filtering options +* **Monitor-specific queries**: Retrieve the script from a scripted monitor, or the ordered steps from a step monitor +* **Supporting entity queries**: Retrieve private location configurations, secure credential metadata, and scheduled monitor downtimes +* **Advanced queries**: Map legacy monitor IDs to entity GUIDs and check runtime upgrade status for legacy monitors ## Related resources [#related-resources] diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor.mdx index ce78660ccacd..e645ec6e65b8 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [ping monitors](/docs/synthetics/sy ## Create a ping monitor [#create-ping-monitor] -You can create a ping monitor using the `syntheticsCreateSimpleMonitor` mutation. This mutation allows you to configure monitoring for any publicly accessible URL or endpoint. +You can create a ping monitor using the `syntheticsCreateSimpleMonitor` mutation. This mutation allows you to configure monitoring for any publicly accessible URL or endpoint. ### Input parameters @@ -132,7 +132,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a ping monitor [#update-ping-monitor] -You can update an existing ping monitor using the `syntheticsUpdateSimpleMonitor` mutation. This allows you to modify the configuration of a ping monitor that has already been created. +You can update an existing ping monitor using the `syntheticsUpdateSimpleMonitor` mutation. This allows you to modify the configuration of a ping monitor that has already been created. ### Input parameters @@ -269,7 +269,7 @@ If there are any issues updating the monitor, the `errors` array will contain ob ## Delete a synthetic monitor [#delete-monitor] -This API allows you to delete an existing monitor using the `syntheticsDeleteMonitor` mutation with the guid parameter. +This API allows you to delete an existing monitor using the `syntheticsDeleteMonitor` mutation with the guid parameter. ### Input parameters @@ -320,4 +320,15 @@ A successful deletion returns the GUID of the deleted monitor: If there are any issues deleting the monitor, an error will be returned with details about what went wrong. +## Query ping monitors [#query-ping-monitors] + +Use NerdGraph to retrieve metadata, map IDs, or check the status of your ping monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. + diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/private-locations.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/private-locations.mdx index 84c786070ee6..6694926bf47a 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/private-locations.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/private-locations.mdx @@ -13,7 +13,7 @@ freshnessValidatedDate: never ## Create a private location [#create-private-location] -You can create a private location using the `syntheticsCreatePrivateLocation` mutation. This mutation allows you to set up a new private location in your monitoring infrastructure where you can deploy private minions or job managers. +You can create a private location using the `syntheticsCreatePrivateLocation` mutation. This mutation allows you to set up a new private location in your monitoring infrastructure where you can deploy private minions or job managers. ### Input parameters @@ -99,7 +99,7 @@ If there are any issues creating the private location, the `errors` array will c ## Update a private location [#update-private-location] -You can update an existing private location using the `syntheticsUpdatePrivateLocation` mutation. This allows you to modify the configuration of a private location that has already been created. +You can update an existing private location using the `syntheticsUpdatePrivateLocation` mutation. This allows you to modify the configuration of a private location that has already been created. If a location is shared and used by other accounts in your organization to run synthetic monitors, you cannot unshare this private location until those monitors are disabled. @@ -184,7 +184,7 @@ If there are any issues updating the private location, the `errors` array will c ## Purge a private location job queue [#purge-private-location] -You can clear the job queue for a private location using the `syntheticsPurgePrivateLocationQueue` mutation. This is useful when you need to remove a backlog of queued synthetic monitor jobs that may have accumulated due to performance issues or temporary connectivity problems. +You can clear the job queue for a private location using the `syntheticsPurgePrivateLocationQueue` mutation. This is useful when you need to remove a backlog of queued synthetic monitor jobs that may have accumulated due to performance issues or temporary connectivity problems. Use this operation carefully as it will permanently remove all queued jobs. Jobs currently running will not be affected. @@ -244,7 +244,7 @@ If there are any issues purging the queue, the `errors` array will contain objec ## Delete a private location [#delete-private-location] -When a private location is no longer needed, you can permanently remove it using the `syntheticsDeletePrivateLocation` mutation. +When a private location is no longer needed, you can permanently remove it using the `syntheticsDeletePrivateLocation` mutation. Before deleting a private location, ensure no monitors are assigned to it. Deleting a private location that has active monitors assigned will cause those monitors to fail. @@ -301,3 +301,12 @@ A successful response returns `null` for errors: ``` If there are any issues deleting the private location, the `errors` array will contain objects with `description` and `type` fields explaining what went wrong. + +## Query private locations [#query-private-locations] + +Use NerdGraph to retrieve location metadata and configuration details. + +For more information, refer to: +- [Query private locations](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-private-locations) - Get all private locations with their configuration details. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data.mdx index f9e1ae756e79..7582230eb47d 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data.mdx @@ -11,186 +11,161 @@ freshnessValidatedDate: never After setting up your monitoring infrastructure, you can use queries to retrieve information about your synthetic entities. Queries make requests to fetch data about monitors, private locations, credentials, and downtimes. This tutorial provides examples of how to use the NerdGraph API to query synthetic monitoring data. + + **Quick Navigation**: Use the links below to jump to specific query types: + - [General monitor queries](#query-monitors): Query all monitors or specific types + - [Monitor-specific queries](#query-monitor-script): Retrieve the script from a scripted monitor, or the ordered steps from a step monitor + - [Supporting entity queries](#query-private-locations): Query private locations, secure credentials, and monitor downtimes + - [Advanced queries](#query-guid-mapping): Map legacy monitor IDs and check runtime upgrade status + + To learn additional query capabilities available to your synthetic entities, check out [NerdGraph entities API tutorial](/docs/apis/nerdgraph/examples/nerdgraph-entities-api-tutorial/). -## Query monitors [#query-monitors] - -This query retrieves all synthetic monitors in your account, returning essential information including the monitor's GUID, name, account ID, monitor type, and associated tags. The tags contain additional configuration details and metadata about each monitor. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'MONITOR'` to retrieve all synthetic monitors.
- -### Sample query - -```graphql -{ - actor { - entitySearch(query: "domain = 'SYNTH' AND type = 'MONITOR'") { - results { - entities { - ... on SyntheticMonitorEntityOutline { - guid - name - accountId - monitorType - tags { - key - values +## General monitor queries [#general-monitor-queries] + + + + + This query retrieves all synthetic monitors in your account, returning essential information including the monitor's GUID, name, account ID, monitor type, and associated tags. The tags contain additional configuration details and metadata about each monitor. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'MONITOR'` to retrieve all synthetic monitors.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch(query: "domain = 'SYNTH' AND type = 'MONITOR'") { + results { + entities { + ... on SyntheticMonitorEntityOutline { + guid + name + accountId + monitorType + tags { + key + values + } } } } } } } -} -``` - -## Query private locations [#query-private-locations] - -This query retrieves all private locations in your account, returning essential information including the location's GUID, name, account ID, and associated tags. Private locations allow you to monitor applications behind your firewall, and their configuration details are accessible through the tags. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'PRIVATE_LOCATION'` to retrieve all private locations.
- -### Sample query - -```graphql -{ - actor { - entitySearch(query: "domain = 'SYNTH' AND type = 'PRIVATE_LOCATION'") { - results { - entities { - accountId - guid - name - tags { - key - values - } - } - } - } - } -} -``` - -## Query monitor downtimes [#query-monitor-downtimes] - -This query retrieves all monitor downtimes in your account, returning essential information including the downtime's GUID, name, account ID, and associated tags. Monitor downtimes are scheduled periods when synthetic monitors stop running, useful during planned maintenance or known outages. Configuration details such as schedule type, timezone, and recurrence patterns are stored in tags. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'MONITOR_DOWNTIME'` to retrieve all monitor downtimes.
- -### Sample query - -```graphql -{ - actor { - entitySearch(query: "domain = 'SYNTH' AND type = 'MONITOR_DOWNTIME'") { - results { - entities { - accountId - guid - name - tags { - key - values + ``` +
+
+ +## Entity support queries [#supporting-entity-queries] + + + + + This query retrieves all private locations in your account, returning essential information including the location's GUID, name, account ID, and associated tags. Private locations allow you to monitor applications behind your firewall, and their configuration details are accessible through the tags. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'PRIVATE_LOCATION'` to retrieve all private locations.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch(query: "domain = 'SYNTH' AND type = 'PRIVATE_LOCATION'") { + results { + entities { + accountId + guid + name + tags { + key + values + } } } } } } -} -``` - -## Query secure credentials [#query-secure-credentials] - -This query retrieves all secure credentials in your account, returning metadata information including the credential's GUID, name, account ID, tags, and last update timestamp. Secure credentials help store, protect, and centrally manage sensitive information like passwords, API keys, or encoded certificates. For security reasons, querying secure credentials returns metadata only, but not the actual credential values themselves. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'SECURE_CRED'` to retrieve all secure credentials.
- -### Sample query - -```graphql -{ - actor { - entitySearch(query: "domain = 'SYNTH' AND type = 'SECURE_CRED'") { - results { - entities { - ... on SecureCredentialEntityOutline { + ``` +
+ + + + This query retrieves all monitor downtimes in your account, returning essential information including the downtime's GUID, name, account ID, and associated tags. Monitor downtimes are scheduled periods when synthetic monitors stop running, useful during planned maintenance or known outages. Configuration details such as schedule type, timezone, and recurrence patterns are stored in tags. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'MONITOR_DOWNTIME'` to retrieve all monitor downtimes.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch(query: "domain = 'SYNTH' AND type = 'MONITOR_DOWNTIME'") { + results { + entities { accountId guid name @@ -198,250 +173,326 @@ This query retrieves all secure credentials in your account, returning metadata key values } - updatedAt } } } } } -} -``` - -## Query monitor script [#query-monitor-script] - -This query retrieves the script content used in a scripted API or scripted browser monitor. The script contains the JavaScript code that defines the monitor's behavior, such as API calls, browser interactions, or custom validation logic. This query only works with scripted monitor types - other monitor types (simple, ping, step, certificate check, broken links) will return an error since they don't use custom scripts. - -### Input parameters - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`id` (account)IntegerYesThe New Relic account ID that contains the monitor.
`monitorGuid`StringYesThe unique entity GUID of the scripted monitor whose script you want to retrieve.
- -### Sample query - -```graphql -{ - actor { - account(id: ACCOUNT_ID) { - synthetics { - script(monitorGuid: "ENTITY_GUID") { - text + ``` +
+ + + + This query retrieves all secure credentials in your account, returning metadata information including the credential's GUID, name, account ID, tags, and last update timestamp. Secure credentials help store, protect, and centrally manage sensitive information like passwords, API keys, or encoded certificates. For security reasons, querying secure credentials returns metadata only, but not the actual credential values themselves. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'SECURE_CRED'` to retrieve all secure credentials.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch(query: "domain = 'SYNTH' AND type = 'SECURE_CRED'") { + results { + entities { + ... on SecureCredentialEntityOutline { + accountId + guid + name + tags { + key + values + } + updatedAt + } + } } } } } -} -``` - -## Query monitor steps [#query-monitor-steps] - -This query retrieves the steps configured for a step monitor. Step monitors provide codeless, multi-step browser-based monitoring through a sequence of predefined actions like navigation, clicks, form inputs, and assertions. Each step has an ordinal position, a type that defines the action, and values that contain the step's configuration data. This query only works with step monitors - other monitor types will return an error since they don't use step-based configurations. - -### Input parameters - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`id` (account)IntegerYesThe New Relic account ID that contains the monitor.
`monitorGuid`StringYesThe unique entity GUID of the step monitor whose steps you want to retrieve.
- -### Sample query - -```graphql -{ - actor { - account(id: ACCOUNT_ID) { - synthetics { - steps(monitorGuid: "ENTITY_GUID") { - ordinal - type - values + ``` +
+
+ +## Monitor-specific queries [#monitor-specific-queries] + + + + + This query retrieves the script content used in a scripted API or scripted browser monitor. The script contains the JavaScript code that defines the monitor's behavior, such as API calls, browser interactions, or custom validation logic. This query only works with scripted monitor types: other monitor types (simple, ping, step, certificate check, broken links) will return an error since they don't use custom scripts. + + ### Input parameters + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`id` (account)IntegerYesThe New Relic account ID that contains the monitor.
`monitorGuid`StringYesThe unique entity GUID of the scripted monitor whose script you want to retrieve.
+ + ### Sample query + + ```graphql + { + actor { + account(id: ACCOUNT_ID) { + synthetics { + script(monitorGuid: "ENTITY_GUID") { + text + } } } } } -} -``` - -## Query to map monitor ID to entity GUID [#query-guid-mapping] - -This query retrieves the entity GUID for a synthetic monitor using the monitor ID. This is useful when you have the legacy numeric monitor ID and need to convert it to the entity GUID format required for most NerdGraph operations. The entity GUID is the modern identifier used for updates, deletions, and other monitor management tasks, while the monitor ID is the older numeric identifier that may appear in URLs or legacy integrations. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to find the monitor. Use `domainId = 'MONITOR_ID'` where MONITOR_ID is the numeric ID of the monitor you want to find.
- -### Sample query - -```graphql -{ - actor { - entitySearch( - query: "(domainId = 'MONITOR_ID')" - ) { - results { - entities { - ... on SyntheticMonitorEntityOutline { - guid - name - monitorId + ``` +
+ + + + This query retrieves the steps configured for a step monitor. Step monitors provide codeless, multi-step browser-based monitoring through a sequence of predefined actions like navigation, clicks, form inputs, and assertions. Each step has an ordinal position, a type that defines the action, and values that contain the step's configuration data. This query only works with step monitors: other monitor types will return an error since they don't use step-based configurations. + + ### Input parameters + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`id` (account)IntegerYesThe New Relic account ID that contains the monitor.
`monitorGuid`StringYesThe unique entity GUID of the step monitor whose steps you want to retrieve.
+ + ### Sample query + + ```graphql + { + actor { + account(id: ACCOUNT_ID) { + synthetics { + steps(monitorGuid: "ENTITY_GUID") { + ordinal + type + values } } } } } -} -``` - -## Query runtime upgrade status (all monitors) [#query-runtime-upgrade-all] - -This query retrieves the status of all runtime upgrade tests for legacy runtime monitors in your account. These tests validate whether monitors using older runtimes (like Chrome 72 or Node.js API legacy) can successfully run on newer runtimes (Chrome 100+ or Node.js 16.10). The results populate the [runtime upgrades UI](/docs/synthetics/synthetic-monitoring/using-monitors/runtime-upgrade-ui/) and help you identify which monitors are ready for upgrade. The test result is stored in the `validationStatus` tag, and if the upgrade test failed, detailed error information is available in the `validationError` tag. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION'` to retrieve all runtime upgrade test results.
- -### Sample query - -```graphql -{ - actor { - entitySearch(query: "domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION'") { - results { - entities { - accountId - guid - name - tags { - key - values + ``` +
+
+ +## Advanced queries [#advanced-queries] + + + + + This query retrieves the entity GUID for a synthetic monitor using the monitor ID. This is useful when you have the legacy numeric monitor ID and need to convert it to the entity GUID format required for most NerdGraph operations. The entity GUID is the modern identifier used for updates, deletions, and other monitor management tasks, while the monitor ID is the older numeric identifier that may appear in URLs or legacy integrations. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to find the monitor. Use `domainId = 'MONITOR_ID'` where `MONITOR_ID` is the numeric ID of the monitor you want to find.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch( + query: "(domainId = 'MONITOR_ID')" + ) { + results { + entities { + ... on SyntheticMonitorEntityOutline { + guid + name + monitorId + } } } } } } -} -``` - -## Query runtime upgrade status (specific monitor) [#query-runtime-upgrade-specific] - -This query retrieves the status of a runtime upgrade test for a specific legacy runtime monitor using the monitor ID. This is useful when you want to check the upgrade readiness of a particular monitor rather than all monitors in your account. The test validates whether the monitor can successfully run on newer runtimes and these results populate the [runtime upgrades UI](/docs/synthetics/synthetic-monitoring/using-monitors/runtime-upgrade-ui/). The test result is stored in the `validationStatus` tag, and if the upgrade test failed, detailed error information is available in the `validationError` tag. - -### Input parameters - - - - - - - - - - - - - - - - - - -
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION' AND domainId = 'MONITOR_ID'` where MONITOR_ID is the numeric ID of the specific monitor.
- -### Sample query - -```graphql -{ - actor { - entitySearch( - query: "domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION' AND domainId = 'MONITOR_ID'" - ) { - results { - entities { - accountId - guid - name - tags { - key - values + ``` +
+ + + + This query retrieves the status of all runtime upgrade tests for legacy runtime monitors in your account. These tests validate whether monitors using older runtimes (like Chrome 72 or Node.js API legacy) can successfully run on newer runtimes (Chrome 100+ or Node.js 16.10). The results populate the [runtime upgrades UI](/docs/synthetics/synthetic-monitoring/using-monitors/runtime-upgrade-ui/) and help you identify which monitors are ready for upgrade. The test result is stored in the `validationStatus` tag, and if the upgrade test failed, detailed error information is available in the `validationError` tag. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION'` to retrieve all runtime upgrade test results.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch(query: "domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION'") { + results { + entities { + accountId + guid + name + tags { + key + values + } + } + } + } + } + } + ``` +
+ + + + This query retrieves the status of a runtime upgrade test for a specific legacy runtime monitor using the monitor ID. This is useful when you want to check the upgrade readiness of a particular monitor rather than all monitors in your account. The test validates whether the monitor can successfully run on newer runtimes and these results populate the [runtime upgrades UI](/docs/synthetics/synthetic-monitoring/using-monitors/runtime-upgrade-ui/). The test result is stored in the `validationStatus` tag, and if the upgrade test failed, detailed error information is available in the `validationError` tag. + + ### Input parameters + + + + + + + + + + + + + + + + + + +
ParameterData TypeIs it Required?Description
`query`StringYesThe search query to filter entities. Use `domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION' AND domainId = 'MONITOR_ID'` where `MONITOR_ID` is the numeric ID of the specific monitor.
+ + ### Sample query + + ```graphql + { + actor { + entitySearch( + query: "domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION' AND domainId = 'MONITOR_ID'" + ) { + results { + entities { + accountId + guid + name + tags { + key + values + } } } } } } -} -``` + ``` +
+
diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-api-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-api-monitor.mdx index 39a73618a70d..ffaf46ab38cd 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-api-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-api-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [scripted API monitors](/docs/synth ## Create a scripted API monitor [#create-scripted-api] -You can create a scripted API monitor using the `syntheticsCreateScriptApiMonitor` mutation. This mutation allows you to set up custom API testing that executes your JavaScript code to validate API endpoints. +You can create a scripted API monitor using the `syntheticsCreateScriptApiMonitor` mutation. This mutation allows you to set up custom API testing that executes your JavaScript code to validate API endpoints. ### Input parameters @@ -136,7 +136,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a scripted API monitor [#update-scripted-api] -You can update an existing scripted API monitor using the `syntheticsUpdateScriptApiMonitor` mutation. This allows you to modify the configuration of a scripted API monitor that has already been created. +You can update an existing scripted API monitor using the `syntheticsUpdateScriptApiMonitor` mutation. This allows you to modify the configuration of a scripted API monitor that has already been created. ### Input parameters @@ -441,6 +441,18 @@ If there are any issues moving the monitor, the `errors` array will contain obje ## Delete a scripted API monitor [#delete-monitor] -When a scripted API monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. +When a scripted API monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. + +## Query scripted API monitors [#query-scripted-api-monitors] + +Use NerdGraph to retrieve metadata, scripts, map IDs, or check the status of your scripted API monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. +- [Query monitor script](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitor-script) - Retrieve JavaScript code from scripted monitors. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-browser-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-browser-monitor.mdx index fc5b12350934..cc43bc71e17c 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-browser-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/scripted-browser-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [scripted browser monitors](/docs/s ## Create a scripted browser monitor [#create-scripted-browser] -You can create a scripted browser monitor using the `syntheticsCreateScriptBrowserMonitor` mutation. This mutation allows you to set up custom scripted monitoring that executes your JavaScript code in a browser. +You can create a scripted browser monitor using the `syntheticsCreateScriptBrowserMonitor` mutation. This mutation allows you to set up custom scripted monitoring that executes your JavaScript code in a browser. ### Input parameters @@ -46,10 +46,10 @@ You can create a scripted browser monitor using the `syntheticsCreateScriptBrows Devices that the monitor will use to execute jobs. Supported devices: `DESKTOP`, `MOBILE_LANDSCAPE`, `MOBILE_PORTRAIT`, `TABLET_LANDSCAPE`, `TABLET_PORTRAIT`. - `monitor.locations.public` - Array + `monitor.locations` + Object Yes - Array of [public location](/docs/synthetics/synthetic-monitoring/using-monitors/add-edit-monitors/#setting-location) identifiers where the monitor will run checks (e.g., `["US_EAST_1", "US_WEST_1"]`). + The geographic locations where the monitor will execute. `monitor.location` allows two values: private locations and public locations. You can select either private locations, public locations, or both:
• `private`: Private location GUIDs (e.g., `{ private: ["PRIVATE_LOCATION_GUID"] }`)
• `public`: Public location identifiers (e.g., `{ public: ["US_EAST_1", "US_WEST_1"] }`) `monitor.name` @@ -157,7 +157,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a scripted browser monitor [#update-scripted-browser] -You can update an existing scripted browser monitor using the `syntheticsUpdateScriptBrowserMonitor` mutation. This allows you to modify the configuration of a scripted browser monitor that has already been created. +You can update an existing scripted browser monitor using the `syntheticsUpdateScriptBrowserMonitor` mutation. This allows you to modify the configuration of a scripted browser monitor that has already been created. ### Input parameters @@ -190,10 +190,10 @@ You can update an existing scripted browser monitor using the `syntheticsUpdateS Devices that the monitor will use to execute jobs. Supported devices: `DESKTOP`, `MOBILE_LANDSCAPE`, `MOBILE_PORTRAIT`, `TABLET_LANDSCAPE`, `TABLET_PORTRAIT`. - `monitor.locations.public` - Array + `monitor.locations` + Object No - Array of [public location](/docs/synthetics/synthetic-monitoring/using-monitors/add-edit-monitors/#setting-location) identifiers where the monitor will run checks (e.g., `["US_EAST_1", "US_WEST_1"]`). + The geographic locations where the monitor will execute. `monitor.location` allows two values. 1. is private locations and 2. is public locations. You can select either private locations, public locations, or both:
• `private`: Private location GUIDs (e.g., `{ private: ["PRIVATE_LOCATION_GUID"] }`)
• `public`: Public location identifiers (e.g., `{ public: ["US_EAST_1", "US_WEST_1"] }`) `monitor.name` @@ -388,6 +388,18 @@ If there are any issues upgrading the monitor runtime, the `errors` array will c ## Delete a scripted browser monitor [#delete-monitor] -When a scripted browser monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. +When a scripted browser monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. + +## Query scripted browser monitors [#query-scripted-browser-monitors] + +Use NerdGraph to retrieve metadata, scripts, map IDs, or check the status of your scripted browser monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. +- [Query monitor script](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitor-script) - Retrieve JavaScript code from scripted monitors. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/secure-credentials.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/secure-credentials.mdx index 1e811177951b..68980ef2c6cb 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/secure-credentials.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/secure-credentials.mdx @@ -13,7 +13,7 @@ freshnessValidatedDate: never ## Create a secure credential [#create-secure-credential] -You can create a secure credential using the `syntheticsCreateSecureCredential` mutation. This mutation allows you to securely store sensitive information that your synthetic monitors can access during script execution. +You can create a secure credential using the `syntheticsCreateSecureCredential` mutation. This mutation allows you to securely store sensitive information that your synthetic monitors can access during script execution. ### Input parameters @@ -90,7 +90,7 @@ If there are any issues creating the secure credential, the `errors` array will ## Update a secure credential [#update-secure-credential] -You can update an existing secure credential using the `syntheticsUpdateSecureCredential` mutation. This allows you to modify the value and description while keeping the same key name. +You can update an existing secure credential using the `syntheticsUpdateSecureCredential` mutation. This allows you to modify the value and description while keeping the same key name. ### Input parameters @@ -171,7 +171,7 @@ If there are any issues updating the secure credential, the `errors` array will ## Delete a secure credential [#delete-secure-credential] -You can delete a secure credential using the `syntheticsDeleteSecureCredential` mutation. Once deleted, any monitors referencing this credential will fail until updated. +You can delete a secure credential using the `syntheticsDeleteSecureCredential` mutation. Once deleted, any monitors referencing this credential will fail until updated. Before deleting a secure credential, make sure no active monitors are using it. Deleting a credential that's in use will cause those monitors to fail. @@ -235,3 +235,12 @@ A successful response returns `null` for errors: ``` If there are any issues deleting the secure credential, the `errors` array will contain objects with `description` and `type` fields explaining what went wrong. + +## Query secure credentials [#query-secure-credentials] + +Use NerdGraph to retrieve credential metadata. + +For more information, refer to: +- [Query secure credentials](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-secure-credentials) - Get secure credential metadata (names, GUIDs, last updated). + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/simple-browser-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/simple-browser-monitor.mdx index fc5001a30c6e..7077bbcd1df4 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/simple-browser-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/simple-browser-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [simple browser monitors](/docs/syn ## Create a simple browser monitor [#create-simple-browser] -You can create a simple browser monitor using the `syntheticsCreateSimpleBrowserMonitor` mutation. +You can create a simple browser monitor using the `syntheticsCreateSimpleBrowserMonitor` mutation. ### Input parameters @@ -180,7 +180,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a simple browser monitor [#update-simple-browser] -You can update an existing simple browser monitor using the `syntheticsUpdateSimpleBrowserMonitor` mutation. This allows you to modify the configuration of a simple browser monitor that has already been created. +You can update an existing simple browser monitor using the `syntheticsUpdateSimpleBrowserMonitor` mutation. This allows you to modify the configuration of a simple browser monitor that has already been created. ### Input parameters @@ -434,6 +434,17 @@ If there are any issues upgrading the monitor runtime, the `errors` array will c ## Delete a simple browser monitor [#delete-monitor] -When a simple browser monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. +When a simple browser monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. + +## Query simple browser monitors [#query-simple-browser-monitors] + +Use NerdGraph to retrieve metadata, map IDs, or check the status of your simple browser monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/nerdgraph/examples/synthetics-api/step-monitor.mdx b/src/content/docs/apis/nerdgraph/examples/synthetics-api/step-monitor.mdx index 762eada36302..2469088424d4 100644 --- a/src/content/docs/apis/nerdgraph/examples/synthetics-api/step-monitor.mdx +++ b/src/content/docs/apis/nerdgraph/examples/synthetics-api/step-monitor.mdx @@ -13,7 +13,7 @@ New Relic allows you use NerdGraph to create [step monitors](/docs/synthetics/sy ## Create a step monitor [#create-step-monitor] -You can create a step monitor using the `syntheticsCreateStepMonitor` mutation. This mutation allows you to set up multi-step browser monitoring with a series of predefined actions. +You can create a step monitor using the `syntheticsCreateStepMonitor` mutation. This mutation allows you to set up multi-step browser monitoring with a series of predefined actions. ### Input parameters @@ -160,7 +160,7 @@ If there are any issues creating the monitor, the `errors` array will contain ob ## Update a step monitor [#update-step-monitor] -You can update an existing step monitor using the `syntheticsUpdateStepMonitor` mutation. This allows you to modify the configuration of a step monitor that has already been created. +You can update an existing step monitor using the `syntheticsUpdateStepMonitor` mutation. This allows you to modify the configuration of a step monitor that has already been created. ### Input parameters @@ -308,6 +308,18 @@ If there are any issues updating the monitor, the `errors` array will contain ob ## Delete a step monitor [#delete-monitor] -When a step monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. +When a step monitor is no longer needed, you can permanently remove it using the `syntheticsDeleteMonitor` mutation. To delete a monitor, refer to the [Delete Synthetic monitor](/docs/apis/nerdgraph/examples/synthetics-api/ping-monitor/#delete-monitor) section. + +## Query step monitors [#query-step-monitors] + +Use NerdGraph to retrieve metadata, steps configuration, map IDs, or check the status of your step monitors. + +For more information, refer to: +- [Query all monitors](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitors): To list all synthetic monitors and their configurations. +- [Map monitor ID to entity GUID](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-guid-mapping): To migrate legacy monitor IDs to entity GUIDs. +- [Runtime upgrade status](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-runtime-upgrade-all): To check if your monitors are ready for the latest runtime upgrades. +- [Query monitor steps](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data#query-monitor-steps) - Retrieve step configurations from step monitors. + +To view complete list of query examples, refer to the [Query synthetics data](/docs/apis/nerdgraph/examples/synthetics-api/query-synthetics-data) document. diff --git a/src/content/docs/apis/rest-api-v2/account-examples-v2/listing-users-your-account.mdx b/src/content/docs/apis/rest-api-v2/account-examples-v2/listing-users-your-account.mdx index bd79599aca42..a75d02f0eb85 100644 --- a/src/content/docs/apis/rest-api-v2/account-examples-v2/listing-users-your-account.mdx +++ b/src/content/docs/apis/rest-api-v2/account-examples-v2/listing-users-your-account.mdx @@ -16,7 +16,7 @@ freshnessValidatedDate: never For New Relic users on our [original user model](/docs/accounts/original-accounts-billing/original-product-based-pricing/overview-user-models), we store a list of the users who can access your account in a database by their [email address](/docs/accounts-partnerships/accounts/account-setup/adding-updating-users), assigned [role](/docs/accounts-partnerships/accounts/account-setup/users-roles), and their first and last name if provided. You can view this data from New Relic's [user interface](/docs/accounts-partnerships/accounts/account-setup/adding-updating-users) and from the [API Explorer (v2)](/docs/apm/apis/api-explorer-v2/parts-api-explorer). - To obtain the same information from the [New Relic API Explorer (v2)](https://rpm.newrelic.com/api/explore), select **Users > GET List**. + To obtain the same information from the [New Relic API Explorer (v2)](https://api.newrelic.com/docs), select **Users > GET List**. ## Requirements [#requirements] diff --git a/src/content/docs/apis/rest-api-v2/api-explorer-v2/introduction-new-relics-rest-api-explorer.mdx b/src/content/docs/apis/rest-api-v2/api-explorer-v2/introduction-new-relics-rest-api-explorer.mdx index 1fd014ab063c..9101c188d2d7 100644 --- a/src/content/docs/apis/rest-api-v2/api-explorer-v2/introduction-new-relics-rest-api-explorer.mdx +++ b/src/content/docs/apis/rest-api-v2/api-explorer-v2/introduction-new-relics-rest-api-explorer.mdx @@ -41,7 +41,7 @@ For information on API key requirements, see [REST API keys](/docs/apis/rest-api />
- **[rpm.newrelic.com/api/explore](https://rpm.newrelic.com/api/explore)**: The New Relic API Explorer makes it easy to test and send requests for any API endpoint. After you select your account and your choice of functions for the type of API call (applications, browsers, users, etc.), the UI provides an interactive form to view requirements and test your parameter values. + **[api.newrelic.com/docs](https://api.newrelic.com/docs)**: The New Relic API Explorer makes it easy to test and send requests for any API endpoint. After you select your account and your choice of functions for the type of API call (applications, browsers, users, etc.), the UI provides an interactive form to view requirements and test your parameter values.
## Differences from API version 1 [#v1] diff --git a/src/content/docs/apis/rest-api-v2/api-explorer-v2/retrieve-metric-timeslice-data-your-app-explorer.mdx b/src/content/docs/apis/rest-api-v2/api-explorer-v2/retrieve-metric-timeslice-data-your-app-explorer.mdx index a763f68189c4..1bb57183a3ff 100644 --- a/src/content/docs/apis/rest-api-v2/api-explorer-v2/retrieve-metric-timeslice-data-your-app-explorer.mdx +++ b/src/content/docs/apis/rest-api-v2/api-explorer-v2/retrieve-metric-timeslice-data-your-app-explorer.mdx @@ -27,7 +27,7 @@ When using New Relic's REST API Explorer (v2) to get [metric timeslice data](/do To view your [app's ID](/docs/apm/apis/requirements/identification-code): -1. From the New Relic REST [API Explorer](https://rpm.newrelic.com/api/explore "Link opens in a new window"), select **Applications > GET List**. +1. From the New Relic REST [API Explorer](https://api.newrelic.com/docs "Link opens in a new window"), select **Applications > GET List**. 2. If you are not signed in to New Relic, provide an [API key](/docs/apis/rest-api-v2/requirements/rest-api-key#viewing) for your app. 3. Optional: From **Applications > List**, fill in values for the `name`, `ids`, or `language` filters. 4. Select **Send Request**. diff --git a/src/content/docs/apis/rest-api-v2/api-explorer-v2/use-api-explorer.mdx b/src/content/docs/apis/rest-api-v2/api-explorer-v2/use-api-explorer.mdx index 2d5c5d0b618d..dd92129dddbb 100644 --- a/src/content/docs/apis/rest-api-v2/api-explorer-v2/use-api-explorer.mdx +++ b/src/content/docs/apis/rest-api-v2/api-explorer-v2/use-api-explorer.mdx @@ -4,7 +4,7 @@ tags: - APIs - REST API v2 - API Explorer v2 -metaDescription: 'Before signing in to New Relic’s REST API Explorer v2 at https://rpm.newrelic.com/api/explore, activate API access and generate an API key for your account.' +metaDescription: 'Before signing in to New Relic’s REST API Explorer v2 at https://api.newrelic.com/docs, activate API access and generate an API key for your account.' redirects: - /docs/apis/using-the-api-explorer - /docs/apis/parts-of-the-api-explorer @@ -21,7 +21,7 @@ New Relic's REST API Explorer (v2) makes it easy to test and send requests for a ## API key requirements [#api-key] -Before you can use the [API Explorer](https://rpm.newrelic.com/api/explore), API access must be activated and an [User API key](/docs/apis/rest-api-v2/requirements/rest-api-key) must be generated for your account. +Before you can use the [API Explorer](https://api.newrelic.com/docs), API access must be activated and an [User API key](/docs/apis/rest-api-v2/requirements/rest-api-key) must be generated for your account. Tips: diff --git a/src/content/docs/apis/rest-api-v2/application-examples-v2/change-alias-your-application-v2.mdx b/src/content/docs/apis/rest-api-v2/application-examples-v2/change-alias-your-application-v2.mdx index 16a439e7cccd..7063e6cc0f6a 100644 --- a/src/content/docs/apis/rest-api-v2/application-examples-v2/change-alias-your-application-v2.mdx +++ b/src/content/docs/apis/rest-api-v2/application-examples-v2/change-alias-your-application-v2.mdx @@ -24,7 +24,7 @@ By default, the alias is the same as the name used in the agent configuration fi While the example utilizes New Relic's REST API v2, we recommend using [NerdGraph](/docs/apis/nerdgraph/examples/mobile-monitoring-config-nerdgraph) for mobile application monitoring. To explore its capabilities, check [the NerdGraph tutorials](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/#tutorials).
-To change the alias for the app name from the New Relic REST API (v2), use this command. You can also change the app alias from New Relic's [API Explorer](/docs/apis/rest-api-v2/api-explorer-v2/getting-started-new-relics-api-explorer) by selecting [**Applications > Update**](https://rpm.newrelic.com/api/explore/applications/update). +To change the alias for the app name from the New Relic REST API (v2), use this command. You can also change the app alias from New Relic's [API Explorer](/docs/apis/rest-api-v2/api-explorer-v2/getting-started-new-relics-api-explorer) by selecting [**Applications > Update**](https://api.newrelic.com/docs/#/Applications/put_applications__id__json). * You will need to supply the `${APP_ID}`, `${API_KEY}`, and the alias `name` you want the application to be displayed as in the New Relic UI. * You must also provide `APP_APDEX_THRESHOLD`, `BROWSER_APDEX_THRESHOLD`, and the monitoring enabled `BOOLEAN` (`true` or `false`) even if they are not being modified. diff --git a/src/content/docs/apis/rest-api-v2/application-examples-v2/get-average-cpu-usage-host-app.mdx b/src/content/docs/apis/rest-api-v2/application-examples-v2/get-average-cpu-usage-host-app.mdx index 5c518d4eddde..3cc6313a37aa 100644 --- a/src/content/docs/apis/rest-api-v2/application-examples-v2/get-average-cpu-usage-host-app.mdx +++ b/src/content/docs/apis/rest-api-v2/application-examples-v2/get-average-cpu-usage-host-app.mdx @@ -35,7 +35,7 @@ For additional detail: * Specify a different [time range](/docs/apis/rest-api-v2/requirements/specifying-time-range-v2). - To get the same information from the [New Relic API Explorer (v2)](https://rpm.newrelic.com/api/explore), select [**Application Hosts > GET Metric Data**](https://rpm.newrelic.com/api/explore/application_hosts/data), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). Add your [application ID](/docs/apm/apis/requirements/identification-code), [host id](/docs/apis/rest-api-v2/requirements/listing-host-instance-application-server-ids#locating_host_id), and the `names[]=CPU/User Time` and `values[]=percent` metrics in the appropriate fields. + To get the same information from the [New Relic API Explorer (v2)](https://api.newrelic.com/docs), select [**Application Hosts > GET Metric Data**](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__hosts__host_id__metrics_data_json), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). Add your [application ID](/docs/apm/apis/requirements/identification-code), [host id](/docs/apis/rest-api-v2/requirements/listing-host-instance-application-server-ids#locating_host_id), and the `names[]=CPU/User Time` and `values[]=percent` metrics in the appropriate fields. ## Get CPU usage for the entire app [#api-call] @@ -56,5 +56,5 @@ For additional detail: * Specify a different [time range](/docs/apis/rest-api-v2/requirements/specifying-time-range-v2). - To get the same information from the [New Relic API Explorer (v2)](https://rpm.newrelic.com/api/explore), select [**Applications > GET Metric Data**](https://rpm.newrelic.com/api/explore/applications/data), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). Add your [application ID](/docs/apm/apis/requirements/identification-code), and the `names[]=CPU/User Time` and `values[]=percent` metrics in the appropriate fields. + To get the same information from the [New Relic API Explorer (v2)](https://api.newrelic.com/docs), select [**Applications > GET Metric Data**](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__metrics_data_json), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). Add your [application ID](/docs/apm/apis/requirements/identification-code), and the `names[]=CPU/User Time` and `values[]=percent` metrics in the appropriate fields. diff --git a/src/content/docs/apis/rest-api-v2/application-examples-v2/get-host-memory-used-application.mdx b/src/content/docs/apis/rest-api-v2/application-examples-v2/get-host-memory-used-application.mdx index 738903a6090f..06ab58e55e7c 100644 --- a/src/content/docs/apis/rest-api-v2/application-examples-v2/get-host-memory-used-application.mdx +++ b/src/content/docs/apis/rest-api-v2/application-examples-v2/get-host-memory-used-application.mdx @@ -35,9 +35,9 @@ This example shows the time range for the [default time period](/docs/apis/rest- * Remove the `summarize=true` to obtain detailed [time series data.](/docs/apis/rest-api-v2/requirements/calculating-average-metric-values-summarize) * Specify a different [time range](/docs/apis/rest-api-v2/requirements/specifying-time-range-v2). -To obtain the same information from the [New Relic API Explorer (v2)](https://rpm.newrelic.com/api/explore): +To obtain the same information from the [New Relic API Explorer (v2)](https://api.newrelic.com/docs): -1. Select [**Application Hosts > GET Metric Data**](https://rpm.newrelic.com/api/explore/application_hosts/data), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). +1. Select [**Application Hosts > GET Metric Data**](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__hosts__host_id__metrics_data_json), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). 2. Add your [application ID](/docs/apm/apis/requirements/identification-code), [host id](/docs/apis/rest-api-v2/requirements/listing-host-instance-application-server-ids#locating_host_id), and the `names[]=Memory/Physical` and `values[]=used_mb_by_host` metrics in the appropriate fields. ## Get memory usage for the entire app [#api-call] @@ -55,7 +55,7 @@ For additional detail: * Remove the `summarize=true` to obtain detailed [time series data.](/docs/apis/rest-api-v2/requirements/calculating-average-metric-values-summarize) * Specify a different [time range](/docs/apis/rest-api-v2/requirements/specifying-time-range-v2). -To obtain the same information from the [New Relic API Explorer (v2)](https://rpm.newrelic.com/api/explore): +To obtain the same information from the [New Relic API Explorer (v2)](https://api.newrelic.com/docs): -1. Select [**Applications > GET Metric Data**](https://rpm.newrelic.com/api/explore/applications/data), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). +1. Select [**Applications > GET Metric Data**](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__metrics_data_json), and include your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key). 2. Add your [application ID](/docs/apm/apis/requirements/identification-code) and the `names[]=Memory/Physical` and `values[]=total_used_mb` metrics in the appropriate fields. diff --git a/src/content/docs/apis/rest-api-v2/browser-examples-v2/add-or-list-browser-apps-api-v2.mdx b/src/content/docs/apis/rest-api-v2/browser-examples-v2/add-or-list-browser-apps-api-v2.mdx index 6f6a3b449c1b..7f81b92c171b 100644 --- a/src/content/docs/apis/rest-api-v2/browser-examples-v2/add-or-list-browser-apps-api-v2.mdx +++ b/src/content/docs/apis/rest-api-v2/browser-examples-v2/add-or-list-browser-apps-api-v2.mdx @@ -24,7 +24,7 @@ Here are examples of how to use the New Relic REST API (v2) to add apps to [**[rpm.newrelic.com/api/explore](https://rpm.newrelic.com/api/explore) > Browser applications > POST create**. +To add an app to New Relic, replace `$API_KEY` with your [New Relic API key](/docs/apis/rest-api-v2/requirements/api-keys#rest-api-key), and replace `${STRING}` with the app's name in the following command. To accomplish the same task from the API Explorer, use your API key and go to **[api.newrelic.com/docs](https://api.newrelic.com/docs) > Browser applications > POST create**. Use the following command: @@ -120,7 +120,7 @@ The API returns an array of data where the element is a browser application and ## List all browser apps [#list-browser-apps] -To view a list of your browser-monitored apps, replace `$API_KEY` with your [New Relic API key](/docs/apis/rest-api-v2/requirements/api-keys#rest-api-key) in the following command. To accomplish the same task from the API Explorer, use your API key and go to **[rpm.newrelic.com/api/explore](https://rpm.newrelic.com/api/explore) > Browser Applications > GET List**. +To view a list of your browser-monitored apps, replace `$API_KEY` with your [New Relic API key](/docs/apis/rest-api-v2/requirements/api-keys#rest-api-key) in the following command. To accomplish the same task from the API Explorer, use your API key and go to **[api.newrelic.com/docs](https://api.newrelic.com/docs) > Browser Applications > GET List**. Use the following command: diff --git a/src/content/docs/apis/rest-api-v2/get-started/list-application-id-host-id-instance-id.mdx b/src/content/docs/apis/rest-api-v2/get-started/list-application-id-host-id-instance-id.mdx index 5c37ddb24b18..ffc5e6f82355 100644 --- a/src/content/docs/apis/rest-api-v2/get-started/list-application-id-host-id-instance-id.mdx +++ b/src/content/docs/apis/rest-api-v2/get-started/list-application-id-host-id-instance-id.mdx @@ -56,9 +56,8 @@ IDs for the host and physical server are not the same. Each host ID is unique an Use the `$HOST_ID` to retrieve summary metrics for the host as well as specific metric timeslice values. For more information about available metrics: -1. Go to **[rpm.newrelic.com](https://rpm.newrelic.com)**. -2. Go to the [API Explorer](https://rpm.newrelic.com/api/explore/application_hosts/list), then select your account name from the **Select an account** dropdown. -3. Go to the API Explorer's **Application host** page at [rpm.newrelic.com/api/explore/application_hosts/names](https://rpm.newrelic.com/api/explore/application_hosts/names). +1. Go to the [API Explorer](https://api.newrelic.com/docs), then select your account name from the **Select an account** dropdown. +2. Go to the API Explorer's **Application host** page at [api.newrelic.com/docs](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__hosts_json). To use the API Explorer to return a list of every `$HOST_ID` for a particular application, you will need the [`$APP_ID`](/docs/apis/rest-api-v2/requirements/finding-product-id). - 1. Go to the [API Explorer](https://rpm.newrelic.com/api/explore/application_hosts/list), then select your account name from the **Select an account** dropdown. + 1. Go to the [API Explorer](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__hosts_json), then select your account name from the **Select an account** dropdown. 2. Enter the specific [`$APP_ID`](/docs/apis/rest-api-v2/requirements/finding-product-id) in the following command: ```sh @@ -128,7 +127,7 @@ Use the `$HOST_ID` to retrieve summary metrics for the host as well as specific ## List instance IDs [#locating_instance_id] -The instance ID meaning depends on the New Relic language agent being used. You can list this ID from the REST API. For Java, you can also [view the instance ID (JVM)](#UI) from APM's **Overview** page. +The instance ID meaning depends on the New Relic language agent being used. You can list this ID from the REST API. @@ -216,7 +215,7 @@ The instance ID meaning depends on the New Relic language agent being used. You
-You can retrieve summary metrics for the instance as well as specific metric timeslice values using the `INSTANCE_ID`. For details about available metrics, use the [REST API Explorer Application Instance](https://rpm.newrelic.com/api/explore/application_instances/names) page. +You can retrieve summary metrics for the instance as well as specific metric timeslice values using the `INSTANCE_ID`. For details about available metrics, use the [REST API Explorer Application Instance](https://api.newrelic.com/docs/#/Applications/get_applications__application_id__instances__instance_id__metrics_json) page. To use the API Explorer to return a list of every `$INSTANCE_ID` for a particular application, you will need the [`$APP_ID`](/docs/apis/rest-api-v2/requirements/finding-product-id). - 1. Go to the [API Explorer](https://rpm.newrelic.com/api/explore/application_hosts/list), then select your account name from the **Select an account** dropdown. + 1. Go to the [API Explorer](https://api.newrelic.com/docs), then select your account name from the **Select an account** dropdown. 2. Enter the specific [`$APP_ID`](/docs/apis/rest-api-v2/requirements/finding-product-id) in the following command: ```sh @@ -278,22 +277,6 @@ You can retrieve summary metrics for the instance as well as specific metric tim . . . ``` - - - Java apps: To locate a specific JVM `$INSTANCE_ID` in New Relic: - - 1. Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > APM & services > Applications > (select an app) > JVMs**. - 2. Select the name of the instance. - - In the URL, the number after the `_i` designator represents the Java JVM instance: - - ``` - https://rpm.newrelic.com/accounts/$ACCOUNT_ID/applications/$APP_ID_i$INSTANCE_ID - ``` - ## REST API application list example [#app-list-example] diff --git a/src/content/docs/apis/rest-api-v2/mobile-examples-v2/mobile-crash-count-crash-rate-example-v2.mdx b/src/content/docs/apis/rest-api-v2/mobile-examples-v2/mobile-crash-count-crash-rate-example-v2.mdx index d10598c7cb81..cafafdd8bafb 100644 --- a/src/content/docs/apis/rest-api-v2/mobile-examples-v2/mobile-crash-count-crash-rate-example-v2.mdx +++ b/src/content/docs/apis/rest-api-v2/mobile-examples-v2/mobile-crash-count-crash-rate-example-v2.mdx @@ -19,7 +19,7 @@ While the examples utilize New Relic's REST API v2, we recommend using [NRQL fun These examples use the default time period of the last 30 minutes. To obtain crash data for a different [time range](/docs/apis/rest-api-v2/requirements/specifying-time-range-v2), add the time period to the commands. - You can also use the New Relic API Explorer to retrieve [mobile metric data](https://rpm.newrelic.com/api/explore/mobile_applications/metric_data). + You can also use the New Relic API Explorer to retrieve [mobile metric data](https://api.newrelic.com/docs/#/Mobile%20Applications/get_mobile_applications__mobile_application_id__metrics_data_json). ## Prerequisites [#prereqs] diff --git a/src/content/docs/apm/agents/java-agent/configuration/java-agent-config-file-template.mdx b/src/content/docs/apm/agents/java-agent/configuration/java-agent-config-file-template.mdx index 7ca2e663fb63..b814b3ea6a54 100644 --- a/src/content/docs/apm/agents/java-agent/configuration/java-agent-config-file-template.mdx +++ b/src/content/docs/apm/agents/java-agent/configuration/java-agent-config-file-template.mdx @@ -231,11 +231,11 @@ common: &default_settings # When true, attributes will be sent to New Relic. The default is true. enabled: true - #A comma separated list of attribute keys whose values should + #A comma separated list of attribute keys whose values should # be sent to New Relic. #include: - # A comma separated list of attribute keys whose values should + # A comma separated list of attribute keys whose values should # not be sent to New Relic. #exclude: @@ -267,12 +267,10 @@ common: &default_settings # Controls the addition of comments to the beginning of executed SQL # statements to be used by the New Relic Query Performance Monitoring - # product for entity linking. An empty String disables SQL comments - # (default setting). - # Allowed options are: - # nr_service_guid - The GUID of the New Relic entity this agent is instrumenting + # product for entity linking. Default is false. + # # A resulting comment would resemble this: - # /*nr_service_guid=MTE3NDc2MDB8QVBNfEFQUExJQ0FUSU9OfDI4MTc5NDEIEA*/ + # /*nr_service_guid=MTE3NDc2MDB8QVBNfAAAAAxJQEEEEE9OfDI4MTc5NDEIEA*/ sql_metadata_comments: # For large SQL statements, executing the regular expressions that attempt to parse exec and @@ -305,7 +303,7 @@ common: &default_settings # Default is true. explain_enabled: true - # Threshold for query execution time below which query plans will + # Threshold for query execution time below which query plans will # not be captured. Relevant only when `explain_enabled` is true. # Default is 0.5 seconds. explain_threshold: 0.5 @@ -339,7 +337,7 @@ common: &default_settings ignore_status_codes: 404 # Transaction events are used for histograms and percentiles. Non-aggregated data is collected - # for each web transaction and sent to the server on harvest. + # for each web transaction and sent to the server on harvest. transaction_events: # Set to false to disable transaction events. @@ -421,7 +419,7 @@ common: &default_settings # New Relic Real User Monitoring (RUM) gives you insight into the performance real users are # experiencing with your website. This is accomplished by measuring the time it takes for # your users' browsers to download and render your web pages by injecting a small amount - # of JavaScript code into the header and footer of each page. + # of JavaScript code into the header and footer of each page. browser_monitoring: # By default the agent automatically inserts API calls in compiled JSPs to @@ -462,7 +460,7 @@ common: &default_settings # All instrumentation modules can be found here: https://github.com/newrelic/newrelic-java-agent/tree/main/instrumentation class_transformer: - # This instrumentation reports the name of the user principal returned from + # This instrumentation reports the name of the user principal returned from # HttpServletRequest.getUserPrincipal() when servlets and filters are invoked. com.newrelic.instrumentation.servlet-user: enabled: false @@ -554,6 +552,11 @@ common: &default_settings # Default is 250000 queue_size: 250000 + # If true, the JFR host name will be set to the value in the process_host.display_name config. + # Note that if the process_host.display_name value is empty/null, the default hostname + # resolution logic will be used. Default is false. + use_display_name: false + # User-configurable custom labels for this agent. Labels are name-value pairs. # There is a maximum of 64 labels per agent. Names and values are limited to 255 characters. # Names and values may not contain colons (:) or semicolons (;). diff --git a/src/content/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file.mdx b/src/content/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file.mdx index 864b715c5df7..ca78a01a53a2 100644 --- a/src/content/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file.mdx +++ b/src/content/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file.mdx @@ -3993,6 +3993,41 @@ Configure real-time profiling in the `jfr` section in the agent YAML. These conf The maximum number of JFR events stored in the agent's memory queue. Increasing this value can help prevent gaps in JFR data, but it will also increase the agent's resource consumption. If the queue is too large, data may be dropped if backend pipline limits are exceeded. Default value is set to 250000. For more information, refer to [event API ingest limits](/docs/data-apis/ingest-apis/event-api/introduction-event-api/#limits). + + This applies to Java agent [version 8.17.0 or higher](/docs/release-notes/agent-release-notes/java-release-notes). + +
+ + + + + + + + + + + + + + + +
+ Type + + Boolean +
+ Default + + `false` +
+ + The maximum number of JFR events stored in the agent's memory queue. Increasing this value can help prevent gaps in JFR data, but it will also increase the agent's resource consumption. If the queue is too large, data may be dropped if backend pipline limits are exceeded. + Default value is set to 250000. For more information, refer to [event API ingest limits](/docs/data-apis/ingest-apis/event-api/introduction-event-api/#limits). + This applies to Java agent [version 8.17.0 or higher](/docs/release-notes/agent-release-notes/java-release-notes). @@ -6681,14 +6716,11 @@ Set the transaction tracer options in the `transaction_tracer` section. These op - Controls the addition of comments to the beginning of executed SQL statements to be used by the New Relic Query Performance Monitoring - product for entity linking. An empty String disables SQL comments (default setting). - Allowed options are: - - * `nr_service_guid` - The GUID of the New Relic entity the agent is instrumenting - + Controls the addition of comments to the beginning of executed SQL statements to be used by the New Relic Query Performance Monitoring + product for entity linking. Default is false. + A resulting comment would resemble this: - `/*nr_service_guid=MTE3NDc2MDB8QVBNfEFQUExJQ0FUSU9OfDI4MTc5NDEIEA*/` + /*nr_service_guid=MTE3NDc2MDB8QVBNfAAAAAxJQEEEEE9OfDI4MTc5NDEIEA*/
If you have version 8.12.0 or higher of Java agent, you can collect AI data from certain AI libraries and frameworks. See our [AI Monitoring documentation](/docs/ai-monitoring/intro-to-ai-monitoring) for more information. * AWS Bedrock 2.20.157 to latest + * MCP Java SDK 1.0.0 to latest + * Spring AI Chat Completions 1.0.0-RC1 to latest + * Spring AI Embeddings 1.0.0-M7 to latest * Java Completable futures 8 to latest * Java Process 8 to latest + * Java XML RPC 8 to latest * JSP 2.0 to latest * OpenEJB 3.0 to latest * OpenJPA 1.0 to latest diff --git a/src/content/docs/apm/agents/java-agent/troubleshooting/no-data-appears-java.mdx b/src/content/docs/apm/agents/java-agent/troubleshooting/no-data-appears-java.mdx index 45d8b603d064..72354667fb43 100644 --- a/src/content/docs/apm/agents/java-agent/troubleshooting/no-data-appears-java.mdx +++ b/src/content/docs/apm/agents/java-agent/troubleshooting/no-data-appears-java.mdx @@ -51,7 +51,7 @@ After sending a request to your web application, data should appear in the APM U 7. Verify that your app is reporting to the expected name: In your New Relic log files, search for `"reporting to"`, then select the link in the message. For example: ```json - {"message":"Reporting to: https://rpm.newrelic.com/accounts/000/applications/000000"} + {"message":"Reporting to: https://one.newrelic.com/redirect/entity/"} ``` If you are reporting to [multiple application names](/docs/apm/new-relic-apm/installation-configuration/using-multiple-names-app), look for multiple lines with this message. diff --git a/src/content/docs/apm/agents/net-agent/getting-started/net-agent-approaches-lambda.mdx b/src/content/docs/apm/agents/net-agent/getting-started/net-agent-approaches-lambda.mdx index 0f99a1e4298d..9579d2702346 100644 --- a/src/content/docs/apm/agents/net-agent/getting-started/net-agent-approaches-lambda.mdx +++ b/src/content/docs/apm/agents/net-agent/getting-started/net-agent-approaches-lambda.mdx @@ -157,17 +157,19 @@ In a Lambda function, the agent will switch into a "serverless mode" that will d Since the agent automatically instruments most lambda functions, you can use the [agent NuGet package](https://www.nuget.org/packages/NewRelic.Agent#readme-body-tab) to monitor your lambda functions. You need to manually configure environment variables for your chosen deployment method (see our [installation guide](/install/dotnet/?deployment=nuget#nuget-linux)). This still requires that you set up either the [New Relic Lambda Extension or CloudWatch integration](/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/introduction-lambda/#how) to send your data to New Relic. -Automatic instrumentation is available for the following AWS Lambda function types (as of agent version 10.29.0): +The following AWS Lambda function types are automatically detected and instrumented without any additional configuration (as of agent version 10.29.0): * `Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction` * `Amazon.Lambda.AspNetCoreServer.APIGatewayHttpApiV2ProxyFunction` * `Amazon.Lambda.AspNetCoreServer.ApplicationLoadBalancerFunction` +Other handler types (such as SQS, SNS, Kinesis, S3, DynamoDB triggers, and custom handlers) are also instrumented when you set the `NEW_RELIC_LAMBDA_HANDLER` environment variable to the fully qualified handler path (for example, `MyAssembly::MyNamespace.MyClass::MyMethod`). This includes any handler method that accepts an `ILambdaContext` parameter. + Limitations: * Generic lambda Methods are not instrumented automatically. If your lambda method is a generic method, such as `Task MyMethod(TRequest, ILambdaContext)`, the .NET agent is currently not able to instrument that method. * The [Lambda Annotations Framework](https://aws.amazon.com/blogs/developer/net-lambda-annotations-framework/) is currently not supported. * [ApiGatewayV2](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format) events are missing some context required for distributed tracing. -* Outbound distributed tracing for different AWS SDK calls (such as SQS) are not supported. +* Inbound distributed tracing from SQS requires the upstream producer to inject W3C trace headers (`traceparent`, `tracestate`) as SQS message attributes. The agent reads these automatically when present. * If your Lambda function handler does not include an [`ILambdaContext`](https://docs.aws.amazon.com/lambda/latest/dg/csharp-context.html) parameter, the .NET agent will not be able to gather all of the expected information about your Lambda function. * .NET Lambda functions built with the [Native AOT deployment method](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=net7%2Cwindows) are not supported. diff --git a/src/content/docs/apm/agents/net-agent/getting-started/net-agent-compatibility-requirements.mdx b/src/content/docs/apm/agents/net-agent/getting-started/net-agent-compatibility-requirements.mdx index ef8643fd6c92..60b82893b06c 100644 --- a/src/content/docs/apm/agents/net-agent/getting-started/net-agent-compatibility-requirements.mdx +++ b/src/content/docs/apm/agents/net-agent/getting-started/net-agent-compatibility-requirements.mdx @@ -415,7 +415,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co The .NET agent `v9.2.0` or higher automatically instruments the [Microsoft.Azure.Cosmos](https://www.nuget.org/packages/Microsoft.Azure.Cosmos) library. * Minimum supported version: 3.17.0 - * Latest verified compatible version: 3.59.0 + * Latest verified compatible version: 3.61.0 * Versions 3.35.0 and higher are supported beginning with .NET agent v10.32.0 @@ -520,7 +520,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Minimum supported version: 2.3.0 - Latest verified compatible version: 3.8.0 + Latest verified compatible version: 3.9.0 Versions 3.0.0 and higher are supported beginning with .NET agent v10.40.0. @@ -557,7 +557,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co **MySqlConnector** * Minimum supported version: 1.0.1 - * Latest verified compatible version: 2.5.0 + * Latest verified compatible version: 2.6.0 @@ -575,7 +575,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Minimum supported version: 1.0.488 - Latest verified compatible version: 2.12.14 + Latest verified compatible version: 3.0.0 @@ -626,7 +626,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Use [EnyimMemcachedCore](https://www.nuget.org/packages/EnyimMemcachedCore). * Minimum supported version: 2.0.0 - * Latest verified compatible version: 3.5.0 + * Latest verified compatible version: 3.5.1 @@ -646,7 +646,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Use [AWSSDK.DynamoDBv2](https://www.nuget.org/packages/AWSSDK.DynamoDBv2). * Minimum supported version: 3.5.0 - * Latest verified compatible version: 4.0.17.8 + * Latest verified compatible version: 4.0.21.3 * Minimum agent version required: 10.33.0 @@ -667,7 +667,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Use [System.Data.Odbc](https://www.nuget.org/packages/System.Data.Odbc/). * Minimum supported version: 8.0.0 - * Latest verified compatible version: 10.0.6 + * Latest verified compatible version: 10.0.9 * Minimum agent version required: 10.35.0 @@ -774,7 +774,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co 10.37.0 (`InvokeModelAsync`, `ConverseAsync`) - 4.0.17.5 + 4.0.20.6 @@ -880,7 +880,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co 9.7.0 - 6.1.2 + 6.1.3 @@ -895,7 +895,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co 10.0.0 - 10.0.7 + 10.0.9 @@ -938,7 +938,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 1.4.0 - * Latest verified compatible version: 2.14.0 + * Latest verified compatible version: 2.14.2 @@ -952,7 +952,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 5.0 - * Latest verified compatible version: 10.1.4 + * Latest verified compatible version: 10.2.5 @@ -1006,7 +1006,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 3.7.0 - * Latest verified compatible version: 4.0.2.25 + * Latest verified compatible version: 4.0.3.4 @@ -1020,7 +1020,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 3.7.0 - * Latest verified compatible version: 4.0.8.11 + * Latest verified compatible version: 4.0.9.4 @@ -1034,7 +1034,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 3.7.0 - * Latest verified compatible version: 4.0.3.24 + * Latest verified compatible version: 4.0.5 @@ -1512,7 +1512,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co The .NET agent `v9.2.0` or higher automatically instruments [Microsoft.Azure.Cosmos](https://www.nuget.org/packages/Microsoft.Azure.Cosmos) library. * Minimum supported version: 3.17.0 - * Latest verified compatible version: 3.59.0 + * Latest verified compatible version: 3.61.0 * Versions 3.35.0 and higher are supported beginning with .NET agent v10.32.0 @@ -1639,7 +1639,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Minimum supported version: 2.3.0 - Latest verified compatible version: 3.8.0 + Latest verified compatible version: 3.9.0 Versions 3.0.0 and higher are supported beginning with .NET agent v10.40.0. @@ -1676,7 +1676,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co **MySqlConnector** * Minimum supported version: 1.0.1 - * Latest verified compatible version: 2.5.0 + * Latest verified compatible version: 2.6.0 @@ -1752,7 +1752,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 1.0.488 - * Latest verified compatible version: 2.12.14 + * Latest verified compatible version: 2.13.17 @@ -1824,7 +1824,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co Use [AWSSDK.DynamoDBv2](https://www.nuget.org/packages/AWSSDK.DynamoDBv2). * Minimum supported version: 3.5.0 - * Latest verified compatible version: 4.0.17.8 + * Latest verified compatible version: 4.0.18.6 * Minimum agent version required: 10.33.0 @@ -1992,7 +1992,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co 10.37.0 (`InvokeModelAsync`, `ConverseAsync`) - 4.0.17.5 + 4.0.20.6 @@ -2113,7 +2113,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co 9.7.0 - 10.0.7 + 10.0.9 @@ -2233,7 +2233,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 3.7.0 - * Latest verified compatible version: 4.0.2.25 + * Latest verified compatible version: 4.0.2.33 @@ -2247,7 +2247,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 3.7.0 - * Latest verified compatible version: 4.0.8.11 + * Latest verified compatible version: 4.0.8.19 @@ -2261,7 +2261,7 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co * Minimum supported version: 3.7.0 - * Latest verified compatible version: 4.0.3.24 + * Latest verified compatible version: 4.0.3.32 diff --git a/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/apollo-server-plugin-nodejs.mdx b/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/apollo-server-plugin-nodejs.mdx index ac7f265491f8..a4a4b6caa85e 100644 --- a/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/apollo-server-plugin-nodejs.mdx +++ b/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/apollo-server-plugin-nodejs.mdx @@ -11,9 +11,15 @@ redirects: freshnessValidatedDate: never --- + + Starting with 14.0.0 of the Node.js agent, Apollo Server customers no longer need to install and use `@newrelic/apollo-server-plugin`. The instrumentation is automatically applied to every Apollo Server instance. + + See our [Apollo Server Migration Guide](/docs/apm/agents/nodejs-agent/installation-configuration/update-nodejs-agent/#apollo-server-migration-guide) for more details. + + The New Relic Apollo Server plugin instruments your Apollo Server applications to give visibility into your GraphQL payloads. This helps you uncover and diagnose the cause of your slow [GraphQL queries](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph). The supported Apollo Server version is 2.14 or later. -Our plugin records overall timings for queries and uses [distributed tracing](/docs/understand-dependencies/distributed-tracing/get-started/how-new-relic-distributed-tracing-works) to uncover the route problem. Use this instrumentation to see if the problem arises from resolving a piece of requested data or if it stems from work done on other services or databases. +The plugin records overall timings for queries and uses [distributed tracing](/docs/understand-dependencies/distributed-tracing/get-started/how-new-relic-distributed-tracing-works) to uncover route problems. Use this instrumentation to see whether the problem arises from resolving a piece of requested data or from work done on other services or databases. ## Compatibility @@ -31,6 +37,506 @@ The New Relic plugin works with the following Apollo Server modules: Other plugins may work, depending on their underlying implementation, but they have not been verified. -## GitHub documentation [#github] +## Metrics + +Two new metrics have been introduced to understand the behavior of your GraphQL operations within and across transactions. Read more on those below or jump down to the [Visualizations](#visualizations) section to see some recommended ways to use this data. + +For more information on querying metrics and creating charts, see the [Resources](#resources) section. + +### Operation Metrics + +`/GraphQL/operation/ApolloServer/[operation-type]/[operation-name]/[deepest-unique-path]` + +Operation metrics include the operation type, operation name, and deepest path. These metrics represent the durations of individual queries or mutations. Use them to compare performance outside the context of individual transactions, which may contain multiple queries. + +**Operation Type:** Indicates if the operation was a query or a mutation. + +**Operation Name:** The operation name when provided or ``. + +**Deepest Unique Path:** The deepest path included in the selection set of a query where only one field was selected at each level. Since operation names may be reused, this helps further determine uniqueness of a given operation. See the description on the [transactions](#deepest-unique-path) section for more details. + +### Field Resolve Metrics + +`/GraphQL/resolve/ApolloServer/[parent-type].[field-name]` + +Resolve metrics capture the duration spent resolving a particular piece of requested GraphQL data. Use them to find specific resolvers that may contribute to slowing down incoming queries, to distinguish field resolvers with the same name on different types, or to identify the same resolver applied across different types. + +These differ slightly in naming from their segment and span counterparts. To better visualize relationships, the full path to a field is represented in segments and spans (for example, `libraries.books.title`). To understand the duration aggregated across all usages and transactions, these metrics use the field name without the full path. + +### Field and Argument Metrics + +`/GraphQL/field/ApolloServer/[parent-type].[field-name]` +`/GraphQL/arg/ApolloServer/[parent-type].[field-name]/[arg-name]` + +Field metrics are only captured when `config.apollo_server.field_metrics` is `true`. Unlike field resolve metrics, this captures every time a field or resolver argument is seen. Use these metrics to determine whether a field in a GraphQL schema is still in use and safe to remove. + +#### All fields and args that have been requested within the last day + +```sql +FROM Metric SELECT count(newrelic.timeslice.value) where appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/{kind}/ApolloServer/{field}' where kind = 'arg' or kind = 'field' FACET kind, field limit max since 1 day ago +``` + +### Visualizations [#visualizations] + +The following queries use these metrics to help you understand the behavior of your Apollo GraphQL applications. + +#### Top 10 Operations + +To get a list of the top 10 slowest operations, use the following query on demand or as part of a dashboard. + +```sql +FROM Metric SELECT average(newrelic.timeslice.value) * 1000 WHERE appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/operation/ApolloServer/{operation}' FACET operation LIMIT 10 +``` + +The **Bar** chart type gives a visualization similar to the transaction overview. + +A **Table** chart type is also useful for showing a breakdown of operations. Use the `METRIC_FORMAT` for additional sorting and visualization flexibility. The following query generates columns for operation type, operation name, deepest path, and **AVG Duration (MS)**. + +```sql +FROM Metric SELECT average(newrelic.timeslice.value) * 1000 as 'AVG Duration (MS)' WHERE appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/operation/ApolloServer/{type}/{name}/{deepest-path}' FACET type, name, `deepest-path` LIMIT 20 +``` + +#### Average Operation Time + +To track the average duration over time for operations, use a similar query with `TIMESERIES`. + +```sql +FROM Metric SELECT average(newrelic.timeslice.value) WHERE appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/operation/ApolloServer/{operation}' TIMESERIES FACET operation +``` + +View this with the **Line** chart type, which lets you see all operations or toggle individual ones. + +#### Top 10 Resolvers + +To get a list of the top 10 slowest resolvers, use the following query on demand or as part of a dashboard. + +```sql +FROM Metric +SELECT average(newrelic.timeslice.value) * 1000 as 'Average Duration (MS)' WHERE appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/resolve/ApolloServer/{type}.{field}' FACET field LIMIT 20 +``` + +If you would like to include the parent type: + +```sql +FROM Metric +SELECT average(newrelic.timeslice.value) * 1000 as 'Average Duration (MS)' WHERE appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/resolve/ApolloServer/{field}' FACET field LIMIT 20 +``` + +The **Bar** chart type gives a visualization similar to the transaction overview. The **Table** chart type is also useful for showing a breakdown of field and **Average Duration (MS)**. + +#### Average Resolver Time + +To track the average duration over time for resolvers, use a similar query with `TIMESERIES`. + +```sql +FROM Metric +SELECT average(newrelic.timeslice.value) * 1000 as 'Average Duration (MS)' TIMESERIES WHERE appName = 'YOUR_APP_NAME' WITH METRIC_FORMAT 'GraphQL/resolve/ApolloServer/{field}' FACET field +``` + +View this with the **Line** chart type, which lets you see all resolvers or toggle individual ones. + +### Resources [#resources] + +* [Query APM metric timeslice data with NRQL](/docs/data-apis/understand-data/metric-data/query-apm-metric-timeslice-data-nrql/) + +* [Add and customize metric charts](/docs/nrql/get-started/introduction-nrql-new-relics-query-language/) + +## Segments and Spans + +Segments and spans (when distributed tracing is enabled) are captured for GraphQL operations, field resolution, and additional instrumented work that occurs as part of field resolution, such as making a query to a database. + +### Operation Segments/Spans + +`/GraphQL/operation/ApolloServer/[operation-type]/[operation-name]/[deepest-unique-path]` + +Operation segments and spans include the operation type, operation name, and deepest unique path. These represent the individual duration and attributes of a specific invocation within a transaction or trace. + +For more details on the parts, see the [transactions](#details) section. + +**Attributes** + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ **Name** + + **Description** + + **Default** +
+ `graphql.operation.type` + + `query` or `mutation` + + Included +
+ `graphql.operation.name` + + Name given to the operation or `anonymous` + + Included +
+ `graphql.operation.query` + + The original GraphQL query with arguments obfuscated + + Included +
+ +To exclude the query attribute (or any attribute), add the attribute name to the `attributes` exclude list or to the segment and span attributes exclude lists individually. + +For more information on including and excluding attributes, see the [attributes documentation](/docs/apm/agents/nodejs-agent/attributes/nodejs-agent-attributes/#configure-attributes). + +### Field Resolve Segments/Spans + +`/GraphQL/resolve/ApolloServer/[path]` + +Resolve segments and spans use the resolution path of the individual field to best differentiate within a given trace or transaction. For example, the path `libraries.books` is used instead of just `books`. These represent the individual duration and attributes of a specific field being resolved as part of the GraphQL operation. + +**Attributes** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ **Name** + + **Description** + + **Default** +
+ `graphql.field.name` + + Name of the resolved field + + Included +
+ `graphql.field.returnType` + + Return type (`Book!`, `[String]`, etc.) of the resolved field + + Included +
+ `graphql.field.parentType` + + Type of the parent of this field (`[Book]`) + + Included +
+ `graphql.field.path` + + Full resolve path of the field (`libraries.books`) + + Included +
+ `graphql.field.args` + + Arg passed to the GraphQL query or mutation for this resolver captured as key/value pairs + + Excluded +
+ +To capture args attributes, add `graphql.field.args.*` to the `attributes` include list or to the segment and span attributes include lists individually. + +For more information on including and excluding attributes, see the [attributes documentation](/docs/apm/agents/nodejs-agent/attributes/nodejs-agent-attributes/#configure-attributes). + +## Transactions + +```graphql +query { + libraries { + books { + title + author { + name + } + } + } +} +``` + +`post /query//libraries.books` + +Transactions are captured as web transactions, associated with the underlying framework (Express, Koa, etc.), and named based on the GraphQL operations executed. + +The agent uses several details to group unique query representations in a transaction name: HTTP method, operation type, operation name, and the deepest path resolved (the first, if multiple). + +The raw representation of a transaction looks like the following: `/WebTransaction/{framework-name}/POST//{operation-type}/{operation-name}/{deepest-unique-path}` + +For an Express usage of Apollo Server, that may look like: `/WebTransaction/Expressjs/POST//query//libraries.books` + +The transaction on New Relic One will ultimately display similar to: `post /query//libraries.books`. + +### Details [#details] + +#### HTTP method + +The HTTP method for the web request. Requests can arrive via GET or POST, surfacing them similarly to other web transactions. + +#### Operation Type + +Indicates if the operation was a query or a mutation. + +#### Operation Name + +The operation name when provided or ``. + +`query { libraries }` would use the operation name `` because a name was not provided. + +A named query such as `query GetLibraries { libraries }` would use the operation name `GetLibraries`. + +#### Deepest Unique Path [#deepest-unique-path] + +The deepest path included in the selection set of a query where only one field was selected at each level. Since operation names may be reused, this helps further determine uniqueness of a given operation. + +The agent uses the deepest unique path (instead of the deepest path) to avoid making an arbitrary naming decision that might imply or hide details about what causes slowness in an application. + +For the query: + +```graphql +query { + libraries { + branch + booksInStock { + isbn, + title, + author + } + magazinesInStock { + issue, + title + } + } +} +``` + +The deepest unique path resolves to `libraries` because multiple fields are selected beyond that point. Any resolver executed beyond that point may contribute to the performance characteristics of the transaction. + +If the query selects only one field per resolver, the full path is used because each selection set is unique. + +The query: + +```graphql +query { + libraries { + booksInStock { + title + } + } +} +``` + +Results in the deepest unique path: `libraries.booksInStock.title`. + +`id` and `__typename` fields are automatically excluded from the naming decision. + +For example, a federated subgraph query: + +```graphql +query { + libraries { + branch + __typename + id + } +} +``` + +Results in the deepest unique path: `libraries.branch`. + +### Union Types and Inline Fragments + +For union types that use inline fragments, the transaction name uses `< ... >` brackets to indicate the underlying selected field when only one result type is specified in the query. + +For the following schema: + +```graphql +union SearchResult = Book | Author + +type Book { + title: String! +} + +type Author { + name: String! +} + +type Query { + search(contains: String): [SearchResult!] +} +``` + +And the following query: + +```graphql +query example { + search(contains: "author") { + __typename + ... on Author { + name + } + } +} +``` + +Results in the following transaction name: + +`post /query/example/search.name` + +However, if the query returns both Book and Author: + +```graphql +query example { + search(contains: "author") { + __typename + ... on Author { + name + } + ... on Book { + title + } + } +} +``` + +The resulting transaction name is: + +`post /query/example/search` + +### Naming on Error + +Errors parsing or validating a GraphQL request can impact transaction naming. + +#### Validation Errors + +If a request parsed but failed validation, the agent names the transaction based on what was attempted. For example, this occurs when a field in the incoming GraphQL query does not exist. + +In this situation, the agent uses the parsed document to indicate each intended piece, including calculating the deepest intended path. + +Here is an example of querying for a field that does not exist (`doesnotexist`) and what that looks like in NR One. + +```graphql +query GetBooksByLibrary { + libraries { + books { + doesnotexist { + name + } + } + } +} +``` + +`post /query/GetBooksByLibrary/libraries.books.doesnotexist.name` + +#### Parsing Errors + +If a requested operation can't be parsed, the agent names the transaction using a wildcard (`*`) in place of the usual operation pieces. In this situation, the query is invalid and there are no identifiable pieces to go on. + +Here is an example missing a closing `}` that cannot parse and what that looks like in NR One. + +```graphql +query GetBooksByLibrary { + libraries { + books { + title + author { + name + } + } + } +// missing closing } +``` + +`post /*` + +In these situations, the `query` attribute on the operation span associated with the error is the best way to identify the particular offender. + +#### Batch Queries + +Apollo Server supports batch queries. In these situations, there are multiple operations in play that affect naming. + +To best identify transaction groupings, the agent aggregates operation names after an additional `/batch` indicator. These names can be quite long. + +Here is an example of a batch query and what that looks like in NR One. + +``` +[ + { + query: query GetBookForLibrary { + library(branch: "downtown") { + books { + title + author { + name + } + } + } + } + }, + { + query: mutation { + addThing(name: "added thing!") + } + } +] +``` + +`post /batch/query/GetBookForLibrary/library.books/mutation//addThing` -For detailed information about installation, configuration, transaction details, metrics, segments, errors, testing, troubleshooting, and more, see New Relic's [Apollo Server plugin documentation on GitHub](https://github.com/newrelic/newrelic-node-apollo-server-plugin/blob/main/README.md). +Here you see `batch/` followed by `query/GetBookForLibrary/library.books` and `mutation//addThing`. diff --git a/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/nextjs-instrumentation.mdx b/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/nextjs-instrumentation.mdx new file mode 100644 index 000000000000..196ff998ea13 --- /dev/null +++ b/src/content/docs/apm/agents/nodejs-agent/extend-your-instrumentation/nextjs-instrumentation.mdx @@ -0,0 +1,173 @@ +--- +title: Next.js instrumentation with the hybrid agent +tags: + - Agents + - Nodejs agent + - Extend your instrumentation +metaDescription: The New Relic Node.js agent can intercept native Next.js OpenTelemetry spans and produce necessary telemetry within New Relic. +freshnessValidatedDate: never +--- + +The recommended way to monitor a Next.js application is to rely on the native OpenTelemetry spans emitted by Next.js together with the Node.js agent's hybrid agent feature, rather than the agent's built-in Next.js instrumentation. This page explains how to enable the hybrid agent, points to example applications, and covers common questions about injecting the browser agent and deploying to cloud providers. + + + Native Next.js OpenTelemetry support requires Node.js agent version [14.1.0](https://github.com/newrelic/node-newrelic/releases/tag/v14.1.0) or later. The hybrid agent only instruments the Node.js runtime; the Next.js edge runtime is not supported, which is why the `register()` example below exits early unless `NEXT_RUNTIME` is `nodejs`. + + +The Node.js agent has had Next.js instrumentation since 2022 through [@newrelic/next](https://github.com/newrelic/newrelic-node-nextjs/releases/tag/v0.1.0), and that instrumentation was bundled into the agent in [12.0.0](https://github.com/newrelic/node-newrelic/releases/tag/v12.0.0). However, it was limited and didn't work when deploying to cloud providers like [Vercel](https://vercel.com/frameworks/nextjs), [AWS Amplify](https://aws.amazon.com/amplify/), [Netlify](https://www.netlify.com/with/nextjs/), or [Azure Static Web Apps](https://azure.microsoft.com/en-us/products/app-service/static). With the introduction of the [hybrid agent](/docs/apm/agents/manage-apm-agents/opentelemetry-api-support), the Node.js agent can intercept OpenTelemetry spans and synthesize the telemetry that drives the New Relic experience. Native Next.js OpenTelemetry instrumentation was added in [14.1.0](https://github.com/newrelic/node-newrelic/releases/tag/v14.1.0). + +## Enable the hybrid agent [#enable] + +To enable the hybrid agent and disable the agent instrumentations that conflict with Next.js, set the following configuration in `newrelic.js`: + +```js +'use strict' + +exports.config = { + app_name: ['Your application name'], + license_key: 'your-license-key', + opentelemetry: { + enabled: true + }, + instrumentation: { + http: { + enabled: false + }, + next: { + enabled: false + }, + undici: { + enabled: false + } + } +} +``` + + + If you make native `fetch` calls, you must disable `undici` instrumentation as shown above. Next.js wraps `fetch` and creates its own client spans, so leaving `undici` enabled produces duplicate client spans in your traces. + + +If you prefer to use environment variables: + +```ini +NEW_RELIC_LICENSE_KEY= +NEW_RELIC_APP_NAME= +NEW_RELIC_OPENTELEMETRY_ENABLED=true +NEW_RELIC_INSTRUMENTATION_NEXT_ENABLED=false +NEW_RELIC_INSTRUMENTATION_HTTP_ENABLED=false +NEW_RELIC_INSTRUMENTATION_UNDICI_ENABLED=false +``` + +You must also add an `instrumentation.js` file (or `instrumentation.ts` for TypeScript) to load the agent before the rest of your application: + +```js +async function loadNewRelicAgent() { + const { default: newrelic } = await import('newrelic') + const agent = newrelic?.agent + if (!agent || agent.collector?.isConnected?.()) { + return + } + + await new Promise((resolve) => { + const done = () => { + clearTimeout(timer) + agent.removeListener('started', done) + agent.removeListener('errored', done) + resolve() + } + const timer = setTimeout(done, 8000) + agent.once('started', done) + agent.once('errored', done) + }) +} + +export async function register() { + // The agent only instruments the Node.js runtime, not the edge runtime. + if (process.env.NEXT_RUNTIME !== 'nodejs') { + return + } + + await loadNewRelicAgent() +} +``` + +Check out the Next.js App Router [example application](https://github.com/newrelic/newrelic-node-examples/tree/9fa74c516926014fa33758cbd6e3737334ed4f98/nextjs/nextjs-app-router) for a more complete example of this setup. + +## Next.js instrumentation in Vercel [#vercel] + +Deploying to Vercel splits static and dynamic pages into different environments. Instead of relying on `.env` and `newrelic.js` to load agent configuration, define the following [environment variables](https://vercel.com/docs/environment-variables) in the Vercel console under **Environment Variables**: + +```ini +NEW_RELIC_LICENSE_KEY= +NEW_RELIC_APP_NAME= +NEW_RELIC_OPENTELEMETRY_ENABLED=true +NEW_RELIC_INSTRUMENTATION_NEXT_ENABLED=false +NEW_RELIC_INSTRUMENTATION_HTTP_ENABLED=false +NEW_RELIC_INSTRUMENTATION_UNDICI_ENABLED=false +``` + +You still need the `instrumentation.js` file described above; only the source of the configuration changes on Vercel. + +Check out the Next.js App Router [example application](https://github.com/newrelic/newrelic-node-examples/tree/9fa74c516926014fa33758cbd6e3737334ed4f98/nextjs/nextjs-app-router) for a more complete example of this setup. + +## Inject the browser agent [#browser-agent] + +Since Next.js is a full-stack framework, most customers want observability on both the client and the server. The following example shows how to inject the New Relic browser agent into every page. + +Edit the root layout file within `app/` and add the following: + +```js +import Script from 'next/script'; + +async function loadNewRelicAgent() { + const { default: newrelic } = await import('newrelic') + const agent = newrelic?.agent + if (!agent || agent.collector?.isConnected?.()) { + return newrelic + } + + await new Promise((resolve) => { + const done = () => { + clearTimeout(timer) + agent.removeListener('started', done) + agent.removeListener('errored', done) + resolve() + } + const timer = setTimeout(done, 8000) + agent.once('started', done) + agent.once('errored', done) + }) + + return newrelic +} + +export default async function RootLayout({ + children, +}){ + // Wait for the agent to connect before requesting the browser timing header. + const newrelic = await loadNewRelicAgent() + const browserTimingHeader = newrelic.getBrowserTimingHeader({ + hasToRemoveScriptWrapper: true, + allowTransactionlessInjection: true, + }) + + return ( + + {children} +