Skip to content

Commit

Permalink
fix: updated directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mehreentahir16 committed Sep 28, 2021
1 parent 5d64738 commit 547019f
Show file tree
Hide file tree
Showing 61 changed files with 82 additions and 104 deletions.
14 changes: 7 additions & 7 deletions src/data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@
- title: See all open source apps
url: https://opensource.newrelic.com/nerdpacks/

- title: Instant observability
- title: Contribute to Instant Observability
icon: zap
url: '/instant-observability'
url: '/contribute-to-io'
pages:
- title: Build a quickstart
url: '/instant-observability/build-a-quickstart'
url: '/contribute-to-io/build-a-quickstart'
pages:
- title: Deploy your application
url: /instant-observability/build-a-quickstart/deploy-your-application
url: /contribute-to-io/build-a-quickstart/deploy-your-application
- title: Create a dashboard
url: /instant-observability/build-a-quickstart/create-a-dashboard
url: /contribute-to-io/build-a-quickstart/create-a-dashboard
- title: Create alerts
url: /instant-observability/build-a-quickstart/create-alerts
url: /contribute-to-io/build-a-quickstart/create-alerts
- title: Create a quickstart
url: /instant-observability/build-a-quickstart/create-quickstart
url: /contribute-to-io/build-a-quickstart/create-quickstart
- title: Try our APIs
icon: nr-share
url: '/try-our-apis'
Expand Down
Binary file added src/images/contribute-to-io/chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
path: '/instant-observability/build-a-quickstart/create-a-dashboard'
path: '/contribute-to-io/build-a-quickstart/create-a-dashboard'
title: 'Create a dashboard'
template: 'GuideTemplate'
description: 'create a dashboard to observe your data in New Relic'
Expand All @@ -8,9 +8,9 @@ duration: '15 min'

<Callout variant="course" title="Lab">

This procedure is a part of lab that teaches you how to build a quickstart. If you haven't already, checkout the [_lab introduction_](/instant-observability/build-a-quickstart)
This procedure is a part of lab that teaches you how to build a quickstart. If you haven't already, checkout the [_lab introduction_](/contribute-to-io/build-a-quickstart)

Each procedure in this lab builds on top of the last one, so make sure you [_Deploy your application_](/instant-observability/build-a-quickstart/deploy-your-application) before proceeding with this one.
Each procedure in this lab builds on top of the last one, so make sure you [_Deploy your application_](/contribute-to-io/build-a-quickstart/deploy-your-application) before proceeding with this one.

</Callout>

Expand All @@ -22,15 +22,15 @@ In this procedure, you create a dashboard in New Relic.

Navigate to [New Relic](https://one.newrelic.com/) and sign in with your account. Here, you see different tabs such as **Browse Data**, **Dashboards**, **Alerts & AI**.

![New Relic UI](../../../images/instant-observability/newrelic-homepage.png)
![New Relic UI](../../../images/contribute-to-io/newrelic-homepage.png)

Move to **Dashboards** and click **Create a dashboard** in the top right corner.

![create a dashboard](../../../images/instant-observability/create-dashboard.png)
![create a dashboard](../../../images/contribute-to-io/create-dashboard.png)

Name your dashboard "FlashDB" and click create.

![name your dashboard](../../../images/instant-observability/name-dashboard.png)
![name your dashboard](../../../images/contribute-to-io/name-dashboard.png)

## Add charts to your dashboard

Expand All @@ -46,50 +46,50 @@ Once the dashboard is in place, you can start creating charts. You're going to a

Hover over the dashboard and click **Add a new chart**.

![add a new chart](../../../images/instant-observability/add-new-chart.png)
![add a new chart](../../../images/contribute-to-io/add-new-chart.png)

From this screen, you add charts using our query builder, or you choose to add text, images, or links using Markdown. Click **Add a chart**.

![add a chart](../../../images/instant-observability/add-a-chart.png)
![add a chart](../../../images/contribute-to-io/add-a-chart.png)

It may open the query builder option. Switch to the NRQL editor and edit the query as follows:

```sql
SELECT count(*) FROM fdb_method FACET method
```

![database methods chart](../../../images/instant-observability/fdb-methods.png)
![database methods chart](../../../images/contribute-to-io/fdb-methods.png)

Click **Run** to see above results.

Here, you see the count of each FlashDB query, grouped by method. You can choose to present your results in different formats such as table, billboard, or pie chart.

![chart formats](../../../images/instant-observability/chart-formats.png)
![chart formats](../../../images/contribute-to-io/chart-formats.png)

Change the chart type to pie, name your chart "Database methods", and click save.

![pie chart](../../../images/instant-observability/piechart.png)
![pie chart](../../../images/contribute-to-io/piechart.png)

The chart is now visible on your dashboard.

![piechart dashboard](../../../images/instant-observability/piechart-dashboard.png)
![piechart dashboard](../../../images/contribute-to-io/piechart-dashboard.png)

You can add more charts to your dashboard following the same pattern. To do so, click **+** in upper right hand corner.

![add more charts](../../../images/instant-observability/add-more-charts.png)
![add more charts](../../../images/contribute-to-io/add-more-charts.png)

This takes you to the same **Add to your dashboard** page. Add another chart to your dashboard.

### Average response time
Run the following query to observe the average response time of flashDB queries.
Run the following query to observe the average response time of FlashDB queries.

```sql
SELECT average(fdb_create_responses), average(fdb_read_responses), average(fdb_update_responses), average(fdb_delete_responses) FROM Metric TIMESERIES
```

![average response time chart](../../../images/instant-observability/average-response-time-chart.png )
![average response time chart](../../../images/contribute-to-io/average-response-time-chart.png )

Here, you observe the average response time for different flashDB queries. Click **Save** to add this chart to your dashboard. Follow the same procedure to add the rest of the charts.
Here, you observe the average response time for different FlashDB queries. Click **Save** to add this chart to your dashboard. Follow the same procedure to add the rest of the charts.

### Errors

Expand All @@ -101,7 +101,7 @@ SELECT sum(fdb_create_errors), sum(fdb_read_errors), sum(fdb_update_errors), sum

Here, you observe errors for all database queries.

![errors chart](../../../images/instant-observability/errors-chart.png )
![errors chart](../../../images/contribute-to-io/errors-chart.png )

### Database size

Expand All @@ -111,19 +111,19 @@ Use the following query to get Database size chart.
SELECT latest(fdb_size) FROM Metric
```

![database size chart](../../../images/instant-observability/latest-database-size.png )
![database size chart](../../../images/contribute-to-io/latest-database-size.png )

This chart shows you the database size.

### Cache hits

For the cache hits charts, use the following query:
For the Cache hits chart, use the following query:

```sql
SELECT sum(fdb_cache_hits) FROM Metric TIMESERIES
```

![cache hits chart](../../../images/instant-observability/cache-hits-chart.png )
![cache hits chart](../../../images/contribute-to-io/cache-hits-chart.png )

Here, you observe the total number of cache hits using a line chart.

Expand All @@ -135,20 +135,20 @@ Use the following query to count the number of keys in your database.
SELECT count(fdb_keys) FROM Metric TIMESERIES
```

![keys chart](../../../images/instant-observability/keys-chart.png )
![keys chart](../../../images/contribute-to-io/keys-chart.png )

Here, you observe the flashDB key count.
Here, you observe the FlashDB key count.

Your final dashboard will look similar to the following:

![dashboard with charts](../../../images/instant-observability/final-flashdb-dashboard.png )
![dashboard with charts](../../../images/contribute-to-io/final-flashdb-dashboard.png )

## Summary

In this procedure, you created a dashboard and added multiple charts to it to observe your services in New Relic.

<Callout variant="course" title="Lab">

This procedure is a part of lab that teaches you how to build a quickstart. Continue on to next procedure: [_Create alerts_](/instant-observability/build-a-quickstart/create-alerts).
This procedure is a part of lab that teaches you how to build a quickstart. Continue on to next procedure: [_Create alerts_](/contribute-to-io/build-a-quickstart/create-alerts).

</Callout>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
path: '/instant-observability/build-a-quickstart/create-quickstart'
path: '/contribute-to-io/build-a-quickstart/create-quickstart'
title: 'Create a quickstart'
template: 'GuideTemplate'
description: 'Package up your dashboards and alerts and create a quickstart'
Expand All @@ -8,35 +8,35 @@ duration: '30 min'

<Callout variant="course" title="Lab">

This procedure is a part of lab that teaches you how to build quickstart. If you haven't already, checkout the [_lab introduction_](/instant-observability/build-a-quickstart)
This procedure is a part of lab that teaches you how to build quickstart. If you haven't already, checkout the [_lab introduction_](/contribute-to-io/build-a-quickstart)

As this procedure builds on top of the last ones in the lab, make sure you create a [dashboard](instant-observability/build-a-quickstart/create-a-dashboard) and [alerts](/instant-observability/build-a-quickstart/create-alerts) before proceeding with this one.
As this procedure builds on top of the last ones in the lab, make sure you create a [dashboard](contribute-to-io/build-a-quickstart/create-a-dashboard) and [alerts](/contribute-to-io/build-a-quickstart/create-alerts) before proceeding with this one.

</Callout>

New Relic One quickstarts allow you to quickly and easily observe and monitor your services since they include observability building blocks like dashboards and alerts. You can package your dashboards and alerts into a quickstart and contribute it to New Relic One catalog.

To get started, navigate to GitHub repository of [New Relic One Quickstarts](https://github.com/newrelic/newrelic-observability-packs) and fork it.

![fork github quickstart repo](../../../images/instant-observability/fork-github-quickstart.png)
![fork github quickstart repo](../../../images/contribute-to-io/fork-github-quickstart.png)

Now, clone your own repository to your local machine using `git clone` command and open it in the IDE of your choice.

Notice the directory structure. __template_ folder is of special importance since it contains the templates for observability building blocks in the quickstart.

![quickstart template](../../../images/instant-observability/quickstart-template-directory.png)
![quickstart template](../../../images/contribute-to-io/quickstart-template-directory.png)

The _\_template_ directory contains the folders for dashboards, alerts, and instrumentation. Each of these folders contain a template or template directories that you can use to create entities for your quickstart.

## Add dashboards to quickstart

Copy the _\_template_ directory and it's content to a new directory within the _quickstarts_ folder. Name the directory as _flashdb_.

![flashdb quickstart directory](../../../images/instant-observability/flashdb-quickstart-template.png)
![flashdb quickstart directory](../../../images/contribute-to-io/flashdb-quickstart-template.png)

You're going to add existing dashboard to your quickstart. Move to your dashboard in New Relic and copy its JSON. Then save it as a JSON file in the _dashboards_ directory.

![dashboard'\s json](../../../images/instant-observability/copy-flashdb-dashboard-json.png)
![dashboard'\s json](../../../images/contribute-to-io/copy-flashdb-json.png)

Here, you copied your dashboard's JSON to clipboard. Replace the content of existing JSON file in _dashboards_ directory and rename it as _flashDB.json_. Your _flashDB.json_ file should contain the following content:

Expand Down Expand Up @@ -214,7 +214,7 @@ Here, you copied your dashboard's JSON to clipboard. Replace the content of exis

Next, create a screenshot of your dashboard and add it to _dashboards_ directory. Give it the same name as your JSON file. Your _dashboard_ directory should look similar to the following:

![flashDB dashboard](../../../images/instant-observability/flashdb-quickstart-dashboard-directory.png)
![FlashDB dashboard](../../../images/contribute-to-io/flashdb-quickstart-dashboard-directory.png)

## Add alerts to quickstart

Expand All @@ -223,7 +223,7 @@ To help you populate your .yml alert files, you can use New Relic One's [Graphql

Open the Graphql API and select your account from the drop down.

![graphiql interface](../../../images/instant-observability/graphiql.png)
![graphiql interface](../../../images/contribute-to-io/graphiql.png)

Building a query is simple in graphiql. Check the appropriate boxes to build the query in Graphql. Your query should be same as follows:

Expand Down Expand Up @@ -256,7 +256,7 @@ Building a query is simple in graphiql. Check the appropriate boxes to build the

Running the above query in Graphql will respond with the details of your alert condition that you can use to update your quickstart.

![cache hit ratio in graphql](../../../images/instant-observability/cache-hit-ratio-graphql.png)
![cache hit ratio in graphql](../../../images/contribute-to-io/cache-hit-ratio-graphql.png)

For static condition, take the static-alert.yml file and start populating it using the information returned from above query.
First, name the file as **Cache Hit Ratio.yml** and populate it:
Expand Down Expand Up @@ -311,7 +311,7 @@ ___
Here, you added the pre-existing low cache hit ratio alert to the quickstart. Follow the same procedure to add the slow read response alert.
For your reference, here's the graphql response.

![slow read response graphql](../../../images/instant-observability/slow-read-response-graphql.png)
![slow read response graphql](../../../images/contribute-to-io/slow-read-response-graphql.png)

Create your **Read response.yml** file based on the above response.

Expand Down Expand Up @@ -374,7 +374,7 @@ name: flashdb
# Description of the pack (required)
description: |
Flashdb is the fastest database in the space.
The flashdb quickstart allows you to get visibility into the performance of flashdb with the help of following features:
The Flashdb quickstart allows you to get visibility into the performance of flashdb with the help of following features:
Dashboards:
- Database methods: Monitor the number of transactions for each database method
Expand Down Expand Up @@ -413,38 +413,16 @@ references:
```
Here's how your final _flashdb_ quickstart folder should look like.
![flashdb quickstart directory](../../../images/instant-observability/final-flashdb-quickstart.png)
## Test your quickstart
You use `importer` utility for testing quickstarts on your account. Run the utility using the _impor.sh_ script in the quickstarts.

Navigate to the root directory of New Relic Quickstarts. Modify _importer-config.sh_ script with your account number and New Relic API Key.

![modify importer config script](../../../images/instant-observability/modify-importer-script.png)

Now, run _import.sh_ from the root of the project:

```bash
./import.sh flashdb
```

<Callout variant='important'>

The importer spins up a docker container, so make sure the docker is running for this function.

</Callout>

Now, you see the dashboard and alert policy deployed in your account.
![flashdb quickstart directory](../../../images/contribute-to-io/final-flashdb-quickstart.png)
## Contribute quickstart to GitHub
Your quickstart is now ready to be published. You're going to commit your changes back to GitHub where it will be reviewed by New Relic.
Follow the [conventional commit syntax](https://github.com/newrelic/newrelic-observability-packs/blob/alerts-doc-update/CONTRIBUTING.md#using-conventional-commits) for New Relic to commit your changes.
```bash
git add -A
git commit -m "feat(flashdb): Added a quickstart for flashdb"
git add -A
git commit -m "feat(flashdb): Added a quickstart for flashdb"
```
<Callout variant="important">
Expand All @@ -456,12 +434,12 @@ To help us manage your contributions efficiently, we encourage you to label your

Push your changes to GitHub:
```bash
git Push
git push
```

Once you've pushed your changes to GitHub, you can [create a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).

![pull request](../../../images/instant-observability/create-pull-request.png)
![pull request](../../../images/contribute-to-io/create-pull-request.png)

Submit and wait for the review. Thanks a lot for your submission!

Expand Down
Loading

0 comments on commit 547019f

Please sign in to comment.