# New Relic

This integration is provided as an Open Authorization API (OAA) connector package. Contact our support team for more information.

## Veza NewRelic Connector

Veza Connector for NewRelic. Enables discover of NewRelic Users along with Organizations, Groups and their Roles.

#### Veza Application Mapping

| NewRelic      | OAA Application  | Notes |
| ------------- | ---------------- | ----- |
| NewRelic.com  | Application      |       |
| Users         | Local User       |       |
| Organizations | Custom Resources |       |
| Groups        | Local Group      |       |
| Roles         | Local Role       |       |

#### Discovered Properties

| Entity       | Property        | Description                                                 |
| ------------ | --------------- | ----------------------------------------------------------- |
| User         | `id`            | User's ID provided by NewRelic                              |
| User         | `name`          | User's name                                                 |
| User         | `user_type`     | User's member type. It can be either Full platform or Basic |
| User         | `email`         | User's email address.                                       |
| User         | `last_login_at` | User's last active timestamp                                |
| Organization | `id`            | Organization's ID provided by NewRelic                      |
| Organization | `name`          | Name of the Organization.                                   |
| Organization | `customer_id`   | Customer Id of the Organization.                            |
| Role         | `id`            | Id of the Role.                                             |
| Role         | `display_name`  | Display Name of the Role.                                   |
| Role         | `name`          | Name of the Role.                                           |
| Role         | `scope`         | Scope of the Role. Scope can be `account` or `organization` |
| Role         | `type`          | Type of the Role. Example: `Role::V2::Standard`             |
| Group        | `id`            | Id of the Group.                                            |
| Group        | `name`          | Display Name of the Group.                                  |

### Setup

#### NewRelic

1. Follow the instructions to generate API Key (User key, used for querying and configuration) A user key is required to use NerdGraph, which is used for querying data and configuring features. Each user key is tied to a specific user.[Generate API Key here](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher)
2. Note the API key is need to run the Integration.

#### Veza

1. Generate an API key for your Veza user. API keys can be managed in the Veza interface under Administration -> API Keys. For detailed instructions consult the Veza User Guide.

### Running the Connector

#### Command Line

1. Install the requirements:

   ```
   pip3 install -r requirements.txt
   ```
2. Set the Secrets:

   ```
   export VEZA_API_KEY="ZXldTcj...JCWGU3Qlo1OHR3RTBfc00yN3lfSFk="
   export NEW_RELIC_KEY="6ed173a951f433d7c71214XXXXXXX"
   ```
3. Run the connector:

   ```
   ./veza_newrelic.py --veza-url https://<your-org>.vezacloud.com
   ```

#### Parameters

| CLI Parameter | Environment Variable | Description                                       |
| ------------- | -------------------- | ------------------------------------------------- |
| `--veza-url`  | `VEZA_URL`           | URL of Veza system                                |
|               | `VEZA_API_KEY`       | API key for Veza connection                       |
|               | `NEW_RELIC_KEY`      | New Relic API Key                                 |
| `--debug`     |                      | Enable verbose debug output                       |
| `--save-json` |                      | Save OAA Payload as local JSON file before upload |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/integrations/newrelic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
