Skip to content

Commit

Permalink
Improve table docs (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: Madhushree Ray <[email protected]>
  • Loading branch information
misraved and madhushreeray30 authored Dec 12, 2023
1 parent ebfc941 commit d327d59
Show file tree
Hide file tree
Showing 19 changed files with 1,142 additions and 74 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/steampipe-anywhere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release Steampipe Anywhere Components

on:
push:
tags:
- 'v*'


jobs:
anywhere_publish_workflow:
uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main
secrets: inherit
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ from
+-----------+------+------------+---------------+---------------+
```

## Engines

This plugin is available for the following engines:

| Engine | Description
|---------------|------------------------------------------
| [Steampipe](https://steampipe.io/docs) | The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
| [Postgres FDW](https://steampipe.io/docs/steampipe_postgres/overview) | Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
| [SQLite Extension](https://steampipe.io/docs//steampipe_sqlite/overview) | Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
| [Export](https://steampipe.io/docs/steampipe_export/overview) | Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
| [Turbot Pipes](https://turbot.com/pipes/docs) | Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.

## Developing

Prerequisites:
Expand Down Expand Up @@ -106,11 +118,17 @@ Further reading:
- [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
- [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)

## Contributing
## Open Source & Contributing

This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) (source code) and [CC BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/2.0/) (docs) licenses. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!

[Steampipe](https://steampipe.io) is a product produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).

## Get Involved

Please see the [contribution guidelines](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md). All contributions are subject to the [Apache 2.0 open source license](https://github.com/turbot/steampipe-plugin-newrelic/blob/main/LICENSE).
**[Join #steampipe on Slack →](https://turbot.com/community/join)**

`help wanted` issues:
Want to help but don't know where to start? Pick up one of the `help wanted` issues:

- [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
- [New Relic Plugin](https://github.com/turbot/steampipe-plugin-newrelic/labels/help%20wanted)
402 changes: 402 additions & 0 deletions docs/LICENSE

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ short_name: "newrelic"
description: "Steampipe plugin for querying New Relic Alerts, Events and other resources."
og_description: Query New Relic with SQL! Open source CLI. No DB required.
og_image: "/images/plugins/turbot/newrelic-social-graphic.png"
engines: ["steampipe", "sqlite", "postgres", "export"]
---

# New Relic + Steampipe
Expand Down Expand Up @@ -87,7 +88,4 @@ export NEW_RELIC_API_KEY=NRAK-XX0X0XX00XXXX0000XXXXXXXXX0X
export NEW_RELIC_REGION=us
```

## Get involved

- Open source: https://github.com/turbot/steampipe-plugin-newrelic
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
25 changes: 22 additions & 3 deletions docs/tables/newrelic_account.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# Table: newrelic_account
---
title: "Steampipe Table: newrelic_account - Query New Relic Accounts using SQL"
description: "Allows users to query New Relic Accounts, specifically providing information about the account's ID, name, product, and other related details."
---

The newrelic_account table can be used to obtain information about all accounts your credentials have access to view.
# Table: newrelic_account - Query New Relic Accounts using SQL

New Relic is a performance management solution that enables developers to diagnose and fix application performance problems in real time. It provides visibility into the performance and usage of your software applications. New Relic helps you to understand how your applications are performing and where bottlenecks may be occurring.

## Table Usage Guide

The `newrelic_account` table provides insights into accounts within New Relic. As a developer or DevOps engineer, explore account-specific details through this table, including account ID, name, product, and other related details. Utilize it to uncover information about accounts, such as the products associated with each account, the status of those products, and the overall details of each account.

## Examples

### List all accounts
Explore which New Relic accounts are available and determine the types of reporting events associated with each. This can help with monitoring and understanding the types of alerts and events that are being generated.

```sql+postgres
select
id,
name,
reporting_event_types
from
newrelic_account;
```

```sql
```sql+sqlite
select
id,
name,
Expand Down
54 changes: 50 additions & 4 deletions docs/tables/newrelic_alert_channel.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
# Table: newrelic_alert_channel
---
title: "Steampipe Table: newrelic_alert_channel - Query New Relic Alert Channels using SQL"
description: "Allows users to query New Relic Alert Channels, specifically the configuration and status of each alert channel."
---

The `newrelic_alert_channel` table allows you to obtain information on Alert Notification Channels.
# Table: newrelic_alert_channel - Query New Relic Alert Channels using SQL

New Relic Alert Channels are part of the New Relic Alerts service that helps you monitor and respond to changes in your system. It provides a centralized way to manage alert notifications for various resources, enabling rapid response to system issues. Alert Channels allow you to define where and how you want to receive alert notifications.

## Table Usage Guide

The `newrelic_alert_channel` table provides insights into alert channels within New Relic Alerts service. As a DevOps engineer, explore channel-specific details through this table, including configuration, status, and associated metadata. Utilize it to manage and monitor your alert channels, ensuring timely and appropriate notifications for system issues.

## Examples

### List all alert channels
Explore various alert channels to understand their types, recipients, associated teams, and other related details. This is useful in gaining insights into how alerts are managed and disseminated within your organization.

```sql
```sql+postgres
select
id,
name,
type,
channel,
recipients,
teams,
tags,
url,
key,
route_key,
base_url,
payload_type,
region,
user_id,
policies
from
newrelic_alert_channel;
```

```sql+sqlite
select
id,
name,
Expand All @@ -28,8 +59,9 @@ from
```

### List all slack alert channels
Explore all the alert channels set up on Slack to gain insights into the distribution of alerts across different teams and regions. This can help in managing the alert system more efficiently and ensuring all relevant parties are notified.

```sql
```sql+postgres
select
name,
channel,
Expand All @@ -42,3 +74,17 @@ from
where
type = 'slack';
```

```sql+sqlite
select
name,
channel,
recipients,
region,
teams,
tags
from
newrelic_alert_channel
where
type = 'slack';
```
70 changes: 65 additions & 5 deletions docs/tables/newrelic_alert_condition.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,42 @@
# Table: newrelic_alert_condition
---
title: "Steampipe Table: newrelic_alert_condition - Query New Relic Alert Conditions using SQL"
description: "Allows users to query New Relic Alert Conditions, specifically the condition's name, status, and severity, providing insights into application performance and potential anomalies."
---

The `newrelic_alert_condition` table can be used to obtain information on conditions why alerts were raised.
# Table: newrelic_alert_condition - Query New Relic Alert Conditions using SQL

New Relic Alert Conditions is a feature within the New Relic platform that allows you to monitor and respond to issues across your applications and infrastructure. It provides a centralized way to set up and manage alerts based on various conditions, such as error rates, response times, and server load. New Relic Alert Conditions helps you stay informed about the health and performance of your applications and take appropriate actions when predefined conditions are met.

## Table Usage Guide

The `newrelic_alert_condition` table provides insights into alert conditions within the New Relic platform. As a DevOps engineer, explore condition-specific details through this table, including condition names, statuses, and severities. Utilize it to uncover information about conditions, such as those related to high error rates, slow response times, and overloaded servers, helping you to maintain optimal application performance.

## Examples

### List all alert conditions
Explore all the active alert conditions in your system to understand their configuration and status. This allows you to identify potential areas of concern and take proactive measures to prevent system failures.

```sql
```sql+postgres
select
id,
name,
type,
enabled,
entities,
metric,
runbook_url,
terms,
user_metric,
user_value_function,
scope,
gc_metric,
violation_close_timer,
policy_id
from
newrelic_alert_condition;
```

```sql+sqlite
select
id,
name,
Expand All @@ -27,8 +57,9 @@ from
```

### List only enabled alert conditions
Discover the segments that are active within the alert conditions. This can help you focus on the areas that are currently in use and require monitoring, ensuring efficient resource allocation.

```sql
```sql+postgres
select
name,
type,
Expand All @@ -42,9 +73,24 @@ where
enabled = true;
```

```sql+sqlite
select
name,
type,
metric,
user_metric,
user_value_function,
gc_metric
from
newrelic_alert_condition
where
enabled = 1;
```

### List only alert conditions for a specific metric
Determine the areas in which specific alert conditions are linked to CPU percentage metrics. This allows for targeted monitoring and management of system performance.

```sql
```sql+postgres
select
name,
type,
Expand All @@ -57,3 +103,17 @@ from
where
metric = 'cpu_percentage';
```

```sql+sqlite
select
name,
type,
metric,
user_metric,
user_value_function,
gc_metric
from
newrelic_alert_condition
where
metric = 'cpu_percentage';
```
62 changes: 58 additions & 4 deletions docs/tables/newrelic_alert_event.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
# Table: newrelic_alert_event
---
title: "Steampipe Table: newrelic_alert_event - Query New Relic Alert Events using SQL"
description: "Allows users to query New Relic Alert Events, providing insights into the alerts triggered in the New Relic system."
---

The `newrelic_alert_event` table can be used to obtain information on alert events that have occurred.
# Table: newrelic_alert_event - Query New Relic Alert Events using SQL

New Relic Alert Events is a service within New Relic that enables monitoring and responding to issues across your applications and infrastructure. It offers a centralized way to set up and manage alerts for various resources, helping you stay informed about the health and performance of your resources and take appropriate actions when predefined conditions are met.

## Table Usage Guide

The `newrelic_alert_event` table provides insights into alert events within New Relic. As a DevOps engineer or system administrator, you can explore event-specific details through this table, including alert policies, conditions, and associated metadata. Utilize it to uncover information about alert events, such as those triggered by specific conditions, the associated policies, and the overall status of your system's health.

## Examples

### List alert events for open incidents
Determine the areas in which alert events are linked to currently open incidents. This is useful for identifying ongoing issues that require immediate attention or further investigation.

```sql
```sql+postgres
select
id,
timestamp,
event_type,
product,
description,
entity_id,
entity_type,
entity_group_id,
priority,
incident_id
from
newrelic_alert_event
where
incident_id in (
select
id
from
newrelic_alert_incident
where
closed_at is null
);
```

```sql+sqlite
select
id,
timestamp,
Expand All @@ -32,8 +67,9 @@ where
```

### List alert events for a specific product
Explore alert events associated with a specific product to gain insights into incidents, their priority, and related entities. This can be particularly useful for troubleshooting product-related issues and understanding their impact.

```sql
```sql+postgres
select
id,
timestamp,
Expand All @@ -50,3 +86,21 @@ from
where
product = 'my-product';
```

```sql+sqlite
select
id,
timestamp,
event_type,
product,
description,
entity_id,
entity_type,
entity_group_id,
priority,
incident_id
from
newrelic_alert_event
where
product = 'my-product';
```
Loading

0 comments on commit d327d59

Please sign in to comment.