-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cayla/various-search-bugs
- Loading branch information
Showing
28 changed files
with
987 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# NEW RELIC, INC | ||
|
||
## INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT | ||
|
||
Thank you for your interest in contributing to the open source projects of New Relic, Inc. (“New Relic”). In order to clarify the intellectual property license granted with Contributions from any person or entity, New Relic must have a Contributor License Agreement ("Agreement") on file that has been signed by each Contributor, indicating agreement to the license terms below. This Agreement is for your protection as a Contributor as well as the protection of New Relic; it does not change your rights to use your own Contributions for any other purpose. | ||
|
||
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to New Relic. Except for the licenses granted herein to New Relic and recipients of software distributed by New Relic, You reserve all right, title, and interest in and to Your Contributions. | ||
|
||
## Definitions | ||
|
||
1. "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is entering into this Agreement with New Relic. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. | ||
2. "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to New Relic for inclusion in, or documentation of, any of the products managed or maintained by New Relic (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to New Relic or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, New Relic for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." | ||
3. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. | ||
4. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to New Relic and to recipients of software distributed by New Relic a perpetual, worldwide, non-exclusive, no-charge, royalty-free, transferable, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contributions alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. | ||
5. You represent that You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to New Relic, or that Your employer has executed a separate Agreement with New Relic. | ||
6. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. | ||
7. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. | ||
8. Should You wish to submit work that is not Your original creation, You may submit it to New Relic separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". | ||
9. You agree to notify New Relic of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
--- | ||
path: '/guides/5-min-tag-resources' | ||
duration: '5 min' | ||
title: 'Quickly tag a set of resources' | ||
template: 'GuideTemplate' | ||
description: 'Add tags to applications you instrument for easier filtering and organization.' | ||
--- | ||
|
||
<Intro> | ||
|
||
[Tags](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/tagging-use-tags-organize-group-what-you-monitor) help you group, search, filter, and focus the data about your [entities](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/what-entity-new-relic), which can be anything from applications to hosts to services. Tagging entities using the New Relic CLI is a good candidate for automation. | ||
|
||
In this 5-minute guide, you are going to use the New Relic CLI to add multiple tags to one of your entities. | ||
|
||
</Intro> | ||
|
||
## Before you begin | ||
|
||
For this guide you need your New Relic [personal API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#personal-api-key): Create it at the **Account settings** screen of your New Relic account. | ||
|
||
<Steps> | ||
<Step> | ||
|
||
## Install the New Relic CLI | ||
|
||
You can download the New Relic CLI via [Homebrew](https://brew.sh/) (macOS), [Scoop](https://scoop.sh/) (Windows), and [Snapcraft](https://snapcraft.io/) (Linux). You can also download [pre-built binaries](https://github.com/newrelic/newrelic-cli/releases) for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer. | ||
|
||
* #### Linux | ||
|
||
With [Snapcraft](https://snapcraft.io/) installed, run: | ||
|
||
`sudo snap install newrelic-cli` | ||
|
||
* #### macOS | ||
|
||
With [Homebrew](https://brew.sh/) installed, run: | ||
|
||
`brew install newrelic-cli` | ||
|
||
* #### Windows | ||
|
||
With [Scoop](https://scoop.sh/) installed, run: | ||
|
||
`scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git`<br /> | ||
`scoop install newrelic-cli` | ||
|
||
</Step><Step> | ||
|
||
## Create your New Relic CLI profile | ||
|
||
New Relic CLI profiles contain credentials and settings that you can apply to any CLI command. | ||
|
||
To create your first CLI profile, run the [`profiles add`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_profile_add.md) command. Don't forget to set the [region](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers) of your New Relic account: use `-r` to set either `us` or `eu` (this is required). | ||
|
||
```bash lineNumbers=false | ||
# Create the tutorial account for the US region | ||
newrelic profiles add -n tutorial --apiKey API_KEY -r us | ||
# Set the profile as default | ||
newrelic profiles default -n tutorial | ||
``` | ||
|
||
</Step><Step> | ||
|
||
## Search for an entity | ||
|
||
Your New Relic account may have hundreds of entities: Have a quick look by opening the [Entity explorer](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/ui-data/new-relic-one-entity-explorer-view-performance-across-apps-services-hosts). | ||
|
||
In the terminal, run [`entity search`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_search.md) to retrieve a list of entities from your account as JSON. In the example, you're searching for all entities with "test" in their name. | ||
|
||
```bash lineNumbers=false | ||
# Change the `name` to match any of your existing entities | ||
newrelic entity search --name "test" | ||
``` | ||
|
||
</Step><Step> | ||
|
||
If there are matching entities in your account, the query yields data in JSON format, similar to this workload example. | ||
|
||
Select an entity from the results and look for its `guid` value; the `guid` is the unique identifier of the entity. Write it down. | ||
|
||
```json lineNumbers=false copy=false | ||
{ | ||
"accountId": 123456789, | ||
"domain": "NR1", | ||
"entityType": "WORKLOAD_ENTITY", | ||
"guid": "F7B7AE59FDED4204B846FB08423DB18E", | ||
"name": "Test workload", | ||
"reporting": true, | ||
"type": "WORKLOAD" | ||
}, | ||
``` | ||
</Step><Step> | ||
|
||
## Add tags and tag lists to your entity | ||
|
||
With your entity `guid`, you can add tags right away. You can do so by invoking the [`entities tags create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_create.md) command. | ||
|
||
What if you want to add multiple tags? You can use tag sets for that: While tags are key-value pairs separated by colons, tag sets are comma-separated lists of tags. For example: | ||
|
||
`tag1:value1,tag2:value2` | ||
|
||
<Important>Adding tags is an asynchronous operation: it could take a little while for the tags to get created.</Important> | ||
|
||
```bash lineNumbers=false | ||
# Adding a single tag | ||
newrelic entity tags create --guid GUID --tag key:value | ||
# Adding multiple tags | ||
newrelic entity tags create --guid GUID --tag tag1:test,tag2:test | ||
``` | ||
</Step><Step> | ||
|
||
## Check that the tags are there | ||
|
||
To make sure that the tags have been added to your entities, retrieve them using the [`entity tags get`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_get.md) command. All tags associated with your entity are retrieved as a JSON array. | ||
|
||
`newrelic entity tags get --guid GUID` | ||
|
||
<Tip> | ||
|
||
Tags can be deleted at any time by invoking the [`entity tags delete`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_delete.md) command followed by the same arguments you used to create them. | ||
|
||
</Tip> | ||
|
||
|
||
```json lineNumbers=false | ||
[ | ||
{ | ||
"Key": "tag1", | ||
"Values": [ | ||
"true" | ||
] | ||
}, | ||
{ | ||
"Key": "tag2", | ||
"Values": [ | ||
"test" | ||
] | ||
}, | ||
{ | ||
"Key": "tag3", | ||
"Values": [ | ||
"testing" | ||
] | ||
} | ||
// ... | ||
] | ||
``` | ||
</Step></Steps> | ||
|
||
## Next steps | ||
|
||
Have a look at [all the New Relic CLI commands](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic.md). For example, you could create a [New Relic workflow](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/new-relic-one-workloads-isolate-resolve-incidents-faster) using [`workload create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_workload_create.md). | ||
|
||
If you'd like to engage with other community members, visit our [New Relic Explorers Hub](https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit) page. We welcome feature requests or bug reports on [GitHub](https://github.com/newrelic/newrelic-cli). | ||
|
||
## Related info | ||
|
||
- [Understanding Entity Explorer (Video)](https://www.youtube.com/watch?v=IGZQup8ZEmE) | ||
- [Tagging: Use tags to organize and group what you monitor](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/tagging-use-tags-organize-group-what-you-monitor) | ||
- [New Relic CLI commands reference](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic.md) | ||
- [New Relic CLI repository on GitHub](https://github.com/newrelic/newrelic-cli) | ||
|
Oops, something went wrong.