Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding documentation for DataSource NewRelic #638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/pages/kb/data-sources/newrelic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
category: querying
parent_category: data-sources
title: NewRelic
slug: newrelic-ds
---

# Setup

You need an **[Account ID](https://docs.newrelic.com/docs/accounts/accounts-billing/account-structure/account-id/)** provided by NewRelic, **[User API Token](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/)** and **[NewRelic GraphQL API URL](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/)** to connect to NewRelic GraphQL API. The token behaves like a password.


{% callout warning %}

This query runner only support **count** and **comparison** queries

{% endcallout %}

![](/assets/images/docs/gitbook/newrelic-setup.png)

# Querying

For a simple count query, one that returns single result:

```
{
"queryType": "count",
"nrql": "SELECT count(*) FROM Transactions"
}
```

For a comparison query, one that returns two results (current and previous)

```
{
"queryType": "comparison",
"nrql": "SELECT count(*) FROM Transactions COMPARE WITH 1 day ago"
}
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.