Skip to content

Commit

Permalink
deploy: 6388240
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Phoen committed Oct 17, 2024
1 parent 4055ddb commit 4f1c5af
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
grr config set synthetic-monitoring.url https://synthetic-monitoring-api.grafana.net
</code></pre><p>You can find the URL and access token in the Synthetic Monitoring plugin&rsquo;s config page in Grafana.</p><h2 id=configuring-targets>Configuring Targets</h2><p>Grizzly supports a number of resource types (<code>grr providers</code> will list those supported). Often, however, we do not
wish to use all of these types. It is possible to set a list of &ldquo;target&rdquo; resource types that Grizzly should interact
with:</p><pre><code>grr config set targets Dashboards,DashboardFolders
with:</p><pre><code>grr config set targets Dashboard,DashboardFolder
</code></pre><p>These can be overriden on the command line with the <code>-t</code> or <code>--target</code> flag.</p><h2 id=configuring-output-formats>Configuring Output Formats</h2><p>Grizzly, when retrieving resources from Grafana, can present them in a range of formats. Currently, it supports
YAML and JSON. Default is YAML. It can be configured in contexts:</p><pre><code>grr config set output-format json
</code></pre><p>This can be overridden on the command line with <code>-o</code> or <code>--output</code>.</p><p>Also, Grizzly wraps resources into an &ldquo;envelope&rdquo; that provides a consistent way of specifying typing and metadata,
Expand All @@ -40,7 +40,7 @@
new context, whether <code>grr apply</code> to apply resources or <code>grr config set</code> to set configuration values.</p><h1 id=configuring-grizzly-with-environment-variables>Configuring Grizzly with environment variables</h1><p>In some circumstances (e.g. when used within automated pipelines) it makes sense to configure Grizzly directly
with environment variables as opposed to contexts. Environment variables, when set, take precedence over
Grizzly contexts as described above. Below are the variables that can be used for this.</p><table><thead><tr><th>Name</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>GRAFANA_URL</code></td><td>Fully qualified domain name of your Grafana instance.</td><td>true</td><td>-</td></tr><tr><td><code>GRAFANA_USER</code></td><td>Basic auth username if applicable.</td><td>false</td><td><code>api_key</code></td></tr><tr><td><code>GRAFANA_TOKEN</code></td><td>Basic auth password or API token.</td><td>false</td><td>-</td></tr></tbody></table><p>See Grafana&rsquo;s <a href=https://grafana.com/docs/grafana/latest/http_api/auth/>Authentication API
docs</a> for more info.</p><h2 id=grafana-cloud-prometheus-1>Grafana Cloud Prometheus</h2><p>To interact with Grafana Cloud Prometheus, you must have these environment variables set:</p><table><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>MIMIR_ADDRESS</code></td><td>URL for Grafana Cloud Prometheus instance</td><td>true</td></tr><tr><td><code>MIMIR_TENANT_ID</code></td><td>Tenant ID for your Grafana Cloud Prometheus account</td><td>true</td></tr><tr><td><code>MIMIR_API_KEY</code></td><td>Authentication token/api key</td><td>false</td></tr></tbody></table><p>Note, this will also work with other Mimir installations, alongside Grafana Cloud Prometheus.</p><h2 id=grafana-synthetic-monitoring-1>Grafana Synthetic Monitoring</h2><p>To interact with Grafana Synthetic Monitoring, you must have these environment variable set:</p><table><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>GRAFANA_SM_TOKEN</code></td><td>Authentication token/api key (must have MetricsPublisher permissions)</td><td>true</td></tr><tr><td><code>GRAFANA_SM_STACK_ID</code></td><td>Grafana instance/stack ID</td><td>true</td></tr><tr><td><code>GRAFANA_SM_LOGS_ID</code></td><td>Logs instance ID</td><td>true</td></tr><tr><td><code>GRAFANA_SM_METRICS_ID</code></td><td>Metrics instance ID</td><td>true</td></tr><tr><td><code>GRAFANA_SM_URL</code></td><td>Synthetic Monitoring instance URL</td><td>true</td></tr></tbody></table><p>Your stack ID is the number at the end of the url when you view your Grafana instance details, ie. <code>grafana.com/orgs/myorg/stacks/123456</code> would be <code>123456</code>. Your metrics and logs ID&rsquo;s are the <code>User</code> when you view your Prometheus or Loki instance details in Grafana Cloud.
docs</a> for more info.</p><h2 id=grafana-cloud-prometheus-1>Grafana Cloud Prometheus</h2><p>To interact with Grafana Cloud Prometheus, you must have these environment variables set:</p><table><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>MIMIR_ADDRESS</code></td><td>URL for Grafana Cloud Prometheus instance</td><td>true</td></tr><tr><td><code>MIMIR_TENANT_ID</code></td><td>Tenant ID for your Grafana Cloud Prometheus account</td><td>true</td></tr><tr><td><code>MIMIR_API_KEY</code></td><td>Authentication token/api key</td><td>false</td></tr><tr><td><code>MIMIR_AUTH_TOKEN</code></td><td>Authorization Bearer Token</td><td>false</td></tr></tbody></table><p>Note, this will also work with other Mimir installations, alongside Grafana Cloud Prometheus.</p><h2 id=grafana-synthetic-monitoring-1>Grafana Synthetic Monitoring</h2><p>To interact with Grafana Synthetic Monitoring, you must have these environment variable set:</p><table><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>GRAFANA_SM_TOKEN</code></td><td>Authentication token/api key (must have MetricsPublisher permissions)</td><td>true</td></tr><tr><td><code>GRAFANA_SM_STACK_ID</code></td><td>Grafana instance/stack ID</td><td>true</td></tr><tr><td><code>GRAFANA_SM_LOGS_ID</code></td><td>Logs instance ID</td><td>true</td></tr><tr><td><code>GRAFANA_SM_METRICS_ID</code></td><td>Metrics instance ID</td><td>true</td></tr><tr><td><code>GRAFANA_SM_URL</code></td><td>Synthetic Monitoring instance URL</td><td>true</td></tr></tbody></table><p>Your stack ID is the number at the end of the url when you view your Grafana instance details, ie. <code>grafana.com/orgs/myorg/stacks/123456</code> would be <code>123456</code>. Your metrics and logs ID&rsquo;s are the <code>User</code> when you view your Prometheus or Loki instance details in Grafana Cloud.
You can find your instance URL under your Synthetic Monitoring configuration.</p><h1 id=grizzly-configuration-file>Grizzly configuration file</h1><p>To get the path of the config file:</p><pre><code class=language-sh>grr config path
</code></pre><h1 id=other-configurations>Other Configurations</h1><h2 id=timeouts>Timeouts</h2><p>Grizzly has a 10 second timeout on some HTTP calls. To override this behavior, use the <code>GRIZZLY_HTTP_TIMEOUT=&lt;seconds></code> environment variable.</p><h2 id=http-proxy>HTTP PROXY</h2><p>To use a proxy with Grizzly, you must have the following environment variable set:</p><table><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>HTTPS_PROXY</code></td><td>This should be the full url/port of your proxy https://proxy:8080</td><td>true</td></tr></tbody></table></main><footer role=contentinfo><div style=display:none><label for=themer>dark theme: <input type=checkbox id=themer class=vh>
<span aria-hidden=true></span></label></div></footer></div></div></div><script src=/grizzly/js/dom-scripts.js></script><script src=/grizzly/js/prism.js></script><script src=/grizzly/js/search.7aef046a0cc8b0c532f1d20087b920459bc868c936bb48a6ae221eceefca2d07.js></script><link rel=stylesheet href=/grizzly/css/search.fe0cd54a21628574bff49d721c827d1bb165ab56b0f22dd55ae78addbe61c309.css></link></body></html>
10 changes: 9 additions & 1 deletion grafana/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@
name: sample
spec:
title: Special Sample Folder
</code></pre><p>A folder simply has a name and a title.</p><h3 id=placing-dashboards-in-folders>Placing Dashboards in Folders</h3><p>Dashboards can be placed into folders using the <code>folder</code> metadata field. Here, a
</code></pre><p>A folder simply has a name and a title.</p><h2 id=nested-folders>Nested Folders</h2><p>Grizzly supports the creation of nested folders.
To create one, specify the <em>uid</em> of the parent folder to a <code>DashboardFolder</code> definition:</p><pre><code class=language-yaml>apiVersion: grizzly.grafana.com/v1alpha1
kind: DashboardFolder
metadata:
name: nestedFolderSample
spec:
parentUid: sample
title: Nested folder
</code></pre><p>This will create a new folder &ldquo;Nested folder&rdquo; under the <code>sample</code> folder.</p><h3 id=placing-dashboards-in-folders>Placing Dashboards in Folders</h3><p>Dashboards can be placed into folders using the <code>folder</code> metadata field. Here, a
dashboard is placed into the folder defined above:</p><pre><code>apiVersion: grizzly.grafana.com/v1alpha1
kind: Dashboard
metadata:
Expand Down
8 changes: 4 additions & 4 deletions index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ The Grizzly server is configured the same way as other Grizzly commands. See the
When working in Jsonnet, Grizzly can detect resources within standardised JSON elements, following a convention of using hidden (::) elements for these.</description></item><item><title>Hidden Elements</title><link>https://grafana.github.io/grizzly/resources/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0000</pubDate><guid>https://grafana.github.io/grizzly/resources/</guid><description>NOTE: This functionality is deprecated. It was necessary to support the formats within Monitoring Mixins. However, k8s-style resources provide a cleaner and language agnostic way to describe resources and their metadata.
When working in Jsonnet, Grizzly can detect resources within standardised JSON elements, following a convention of using hidden (::) elements for these.
For example, to specify a simple dashboard:
{ grafanaDashboardFolder:: 'sample', grafanaDashboards+:: { 'my-dash.json': { uid: 'prod-overview', title: 'Production Overview', tags: ['templated'], timezone: 'browser', schemaVersion: 17, }, }, } The grafanaDashboardFolder hidden element specifies the folder that all dashboards will go into.</description></item><item><title>Installation</title><link>https://grafana.github.io/grizzly/installation/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0000</pubDate><guid>https://grafana.github.io/grizzly/installation/</guid><description>Grizzly is currently available for Linux and MacOS systems.
Download the latest release.
{ grafanaDashboardFolder:: 'sample', grafanaDashboards+:: { 'my-dash.json': { uid: 'prod-overview', title: 'Production Overview', tags: ['templated'], timezone: 'browser', schemaVersion: 17, }, }, } The grafanaDashboardFolder hidden element specifies the folder that all dashboards will go into.</description></item><item><title>Installation</title><link>https://grafana.github.io/grizzly/installation/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0000</pubDate><guid>https://grafana.github.io/grizzly/installation/</guid><description>Grizzly is currently available for Linux and MacOS systems Installing Grizzly on Linux Download the latest release.
Select and download an appropriate file for your operating system. Then:
sudo mv $DOWNLOADED_FILE /usr/local/bin/grr sudo chmod +x /usr/local/bin/grr If you wish to build the latest (as yet unreleased) version, assuming you have a recent Golang installed:
git clone https://github.com/grafana/grizzly.git cd grizzly make dev sudo mv grr /usr/local/bin/grr</description></item><item><title>Setup and Configuration</title><link>https://grafana.github.io/grizzly/configuration/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0000</pubDate><guid>https://grafana.github.io/grizzly/configuration/</guid><description>Grizzly can be configured in two ways: using environment variables and through Grizzly&amp;rsquo;s own &amp;lsquo;context&amp;rsquo; support (much like kubectl contexts).
sudo mv $DOWNLOADED_FILE /usr/local/bin/grr sudo chmod +x /usr/local/bin/grr Installing Grizzly on macOS via Homebrew Before you begin Install Homebrew on your computer.
Once Homebrew is installed, you can install Grizzly using the following command:
brew install grizzly Building from source If you wish to build the latest (as yet unreleased) version, assuming you have a recent Golang installed:</description></item><item><title>Setup and Configuration</title><link>https://grafana.github.io/grizzly/configuration/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0000</pubDate><guid>https://grafana.github.io/grizzly/configuration/</guid><description>Grizzly can be configured in two ways: using environment variables and through Grizzly&amp;rsquo;s own &amp;lsquo;context&amp;rsquo; support (much like kubectl contexts).
Environment variables are suitable for use against a single system, and best suited to CI and automation scenarios.
Grizzly contexts allow easy switching between multiple configurations and are best suited to workstation use.
Using Grizzly Contexts By default, the default context is used. We will discuss how to use the default context first, then explain how to use multiple contexts thereafter.</description></item><item><title>Synthetic Monitoring</title><link>https://grafana.github.io/grizzly/synthetic-monitoring/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0000</pubDate><guid>https://grafana.github.io/grizzly/synthetic-monitoring/</guid><description>Grafana Cloud Synthetic Monitoring Checks The only resource type currently configurable by Grizzly is a &amp;ldquo;check&amp;rdquo;, which tells Synthetic Monitoring to periodically check the status of an endpoint.
Expand Down
Loading

0 comments on commit 4f1c5af

Please sign in to comment.