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

doc: visualize metrics using grafana: upload.md updates #19

Open
wants to merge 5 commits into
base: main
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
26 changes: 13 additions & 13 deletions user-metrics/tutorial - visualize_metrics_using_grafana/Service.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# 2: Create a service

The make command in the preceding section also creates a service specification file (metrics-service.yml) in the user-metrics directory. When you execute a CREATE SERVICE statement to create the service, you include the contents of this file inline in that statement.
The `make` command in the preceding section also creates a service specification file (`metrics-service.yml`) in the user-metrics directory. When you execute a `CREATE SERVICE` statement to create the service, you can include the contents of this file inline in that statement.

1. To create the service, execute the following CREATE SERVICE command using SnowSQL CLI or Snowsight web interface. Make sure you use the test_role to execute the CREATE SERVICE command.
1. To create the service, execute the following `CREATE SERVICE` command using SnowSQL CLI or Snowsight web interface. Make sure you use the `test_role` to execute the `CREATE SERVICE` command.

```commandline
CREATE SERVICE metrics_visualizer
IN COMPUTE POOL tutorial_compute_pool
FROM SPECIFICATION $$
<copy/paste the specification from metrics-service.yml file>
$$;
```
```sql
CREATE SERVICE metrics_visualizer
IN COMPUTE POOL tutorial_compute_pool
FROM SPECIFICATION $$
<copy/paste the specification from metrics-service.yml file>
$$;
```

2. Call the SYSTEM$GET_SERVICE_STATUS function to verify that all of the service containers are running.
2. Run `SHOW SERVICE CONTAINERS IN SERVICE` statement to verify that all of the service containers are running.

```commandline
call SYSTEM$GET_SERVICE_STATUS('metrics_visualizer');
```
```sql
SHOW SERVICE CONTAINERS IN SERVICE metrics_visualizer;
```
20 changes: 14 additions & 6 deletions user-metrics/tutorial - visualize_metrics_using_grafana/Upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ git clone https://github.com/Snowflake-Labs/spcs-templates.git
docker login <registry_hostname> -u <username>
```
Note the following:
* The <registry_hostname> is the hostname part of the repository URL. For example, myorg-myacct.registry.snowflakecomputing.com.
* The `<registry_hostname>` is the hostname part of the repository URL. For example, myorg-myacct.registry.snowflakecomputing.com.

* <username> is your Snowflake username. Docker will prompt you for your password.
* `<username>` is your Snowflake username. Docker will prompt you for your password.

6. Use one of the following options to upload images to your image repository:
* Option 1: The easiest option is to upload the pre-built [Docker images](https://hub.docker.com/u/snowflakedb) that Snowflake provides on dockerhub.
Expand All @@ -29,7 +29,15 @@ Note the following:
```commandline
make build-all SNOW_REPO=<repository-url>
```
7. Call the SYSTEM$REGISTRY_LIST_IMAGES function to verify that the images are present in the repository.
```commandline
SELECT SYSTEM$REGISTRY_LIST_IMAGES('/tutorial_db/data_schema/tutorial_repository');
```
7. Run the `SHOW IMAGES IN IMAGE REPOSITORY` statement to verify that the images are present in the repository.

```commandline
SHOW IMAGES IN IMAGE REPOSITORY tutorial_db.data_schema.tutorial_repository;
```

The repository should contain four images:

- `grafana`
- `mdservice`
- `otel-prometheus`
- `prometheus`