From 46aac3e3c6d30b79a1a28642358a5d1ca58c2c80 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Fri, 10 Mar 2023 10:14:29 +0100 Subject: [PATCH 01/15] added documentation for datasource v1 and v2 --- .../grafana-plugins/factoryinput-panel.md | 2 +- .../grafana-plugins/umh-datasource-v2.md | 51 ++++++++++++++++ .../grafana-plugins/umh-datasource.md | 59 ++++++++++--------- .../grafanaPluginsConfigurationPanel.png | 3 + .../grafanaPluginsConfiguringDatasourceV1.png | 3 + .../grafanaPluginsConfuguringDatasourceV2.png | 3 + .../grafanaPluginsSelectingConfiguration.png | 3 + .../grafanaPluginsSelectingOptions.png | 3 + .../grafanaPluginsSelectingV1.png | 3 + .../grafanaPluginsSelectingV2.png | 3 + .../grafanaPluginsSelectingValue.png | 3 + .../grafanaPluginsSelectingValuesV1.png | 3 + .../grafanaPluginsSelectingWorkCell.png | 3 + 13 files changed, 113 insertions(+), 29 deletions(-) create mode 100644 umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfigurationPanel.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingOptions.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV1.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV2.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValue.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png create mode 100644 umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md index 2e0e76bc6..8f6d25a74 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md @@ -3,7 +3,7 @@ title: "Factoryinput-panel" content_type: task description: | This page has the technical documentation of the microservice factoryinput-panel, which allows for easy execution of MQTT messages inside the UMH stack from a Grafana panel. -weight: 9000 +weight: 3000 --- {{% notice warning %}} diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md new file mode 100644 index 000000000..b736c12c5 --- /dev/null +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -0,0 +1,51 @@ +--- +title: "umh-datasource-v2" +content_type: task +description: | + The technical documentation of the microservice umh-datasource-v2, which allows for easy data extraction from factoryinsight. +weight: 1000 +--- + +## Get started + +The **UMH Datasource v2** comes preinstalled with the United Manufacturing Hub. + +## Usage + +1. When creating a new panel, select **umh-datasource-v2** from the Data source drop-down menu. It will then fetch the resources + from the database. The loading time may depend on your internet speed. + + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png/?width=85%) + +2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are placeholders + for the future implementation of the new data model. + + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png/?width=85%) + +3. Only the available values for the specified work cell will be fetched from the database. You can then select which data value you want to query. + + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png/?width=85%) + +4. Next you can specify how to transform the data, depending on what value you selected. + For example, all the custom tags will have the aggregation options available: + + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png/?width=85%) + + +## Configuration + +1. In Grafana, navigate to the Data sources configuration panel. + + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png/?width=15%) + +2. Select **umh-v2-datasource** to configure it. + + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) + +3. Configurations: + - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. + - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. + - API Key: authenticates the API calls to factoryinsight. + Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. + + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=85%) \ No newline at end of file diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md index aeaa03b04..05b0eb101 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md @@ -1,44 +1,47 @@ -+++ -title = "umh-datasource" -menuTitle = "umh-datasource" -chapter = false -weight = 5 -draft = false -description = "The technical documentation of the microservice umh-datasource, which allows for easy data extraction from factoryinsight." -+++ +--- +title: "umh-datasource" +content_type: task +description: | + The technical documentation of the microservice umh-datasource, which allows for easy data extraction from factoryinsight. +weight: 2000 +--- UMH Datasource provides a Grafana 8.X compatible plugin, allowing easy data extraction from the UMH factoryinsight microservice. +{{% notice note %}} +We are no longer maintaining this microservice. Use instead our new microservice datasource-v2 for data extraction from factoryinsight. +{{% /notice %}} + + ## Get started -For development, the steps to build the plugin from source are described here. +The **UMH Datasource** comes preinstalled with the United Manufacturing Hub. + +## Usage -1. Clone the datasource repository `git@github.com:united-manufacturing-hub/united-manufacturing-hub-datasource.git` +1. When creating a new panel, select **umh-datasource** from the Data source drop-down menu. It will then fetch the resources + from the database. The loading time may depend on your internet speed. -2. Install dependencies + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV1.png/?width=85%) -```bash -yarn install -``` +2. Select your query parameters **Location**, **Asset** and **Value** to build your query. -3. Build plugin in development mode or run in watch mode + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png/?width=85%) -```bash -yarn dev -``` -4. Build plugin in production mode (not recommended due to [Issue 32336](https://github.com/grafana/grafana/issues/32336)). -```bash -yarn build -``` -5. Move the resulting dis folder in your Grafana plugins directory. +## Configuration -- Windows: `C:\Program Files\GrafanaLabs\grafana\data\plugins` -- Linux: `/var/lib/grafana/plugins` +1. In Grafana, navigate to the Data sources configuration panel. -6. Rename the folder to umh-datasource. + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png/?width=15%) -7. Enable the [enable development mode](https://grafana.com/docs/grafana/latest/administration/configuration/) to load unsigned plugins. +2. Select **umh-datasource** to configure it. -8. restart your Grafana service. + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) +3. Configurations: + - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. + - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. + - API Key: authenticates the API calls to factoryinsight. + Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png/?width=85%) diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfigurationPanel.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfigurationPanel.png new file mode 100644 index 000000000..479604081 --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfigurationPanel.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f42f904dfbf2ed391a9d0b293baf166d0d505edf5e2a7060d451cce9dbe5ad8 +size 35529 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png new file mode 100644 index 000000000..7005d2630 --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c8b9eb3af68ae43bc823479eeb6fd5e7d93358ee4e78bd984f36d3a6665b5f7 +size 95751 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png new file mode 100644 index 000000000..13674be59 --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46d4d142d0cce71809e3b3902f341028cc077bafaa9c63a5508a38f6a4eb8301 +size 95584 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png new file mode 100644 index 000000000..779f9c44e --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:175a4b22bf36e60bffbf7c5961acd40eab203889df940e1cb330f4de314a5384 +size 72476 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingOptions.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingOptions.png new file mode 100644 index 000000000..4c30c302c --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingOptions.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfee66a3d0cead5653963cd1fbd1d12003f017149a76293831299fb54c5940a0 +size 45105 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV1.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV1.png new file mode 100644 index 000000000..4481827cf --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:384b16a8ac41b5b6e295baf55baaf4d398b78153054fad0575b1c9fdc0e6c7c0 +size 23092 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV2.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV2.png new file mode 100644 index 000000000..c3b0ceaf8 --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingV2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b3e67480ddb86e0f94b3f009e714b0463fb9df2e69b08e2218e7c9b282467dd +size 20034 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValue.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValue.png new file mode 100644 index 000000000..dd0d417a4 --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValue.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23caea414c870b3aaa9083c6c30ba9d89ae0a80015319b1fe815543ba184a970 +size 86940 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png new file mode 100644 index 000000000..0bbf3b0cb --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:211157f60b98f4bf8ad2cb24eb28bebf995590289359321623df891adf9ad2d6 +size 109032 diff --git a/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png new file mode 100644 index 000000000..4c92809be --- /dev/null +++ b/umh.docs.umh.app/static/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67fc9b26ca3d4553dccb83446ee9111eea6275aa745c01622911c6ffa061bbf1 +size 74066 From 9dbf63ffef9b97bfbee86eb4a121ea469a77fc27 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Fri, 10 Mar 2023 15:21:55 +0100 Subject: [PATCH 02/15] added matteos and jeremys feedback --- .../archetypes/grafana-plugins.md | 19 +++++++++ .../grafana-plugins/factoryinput-panel.md | 2 +- .../grafana-plugins/umh-datasource-v2.md | 40 +++++++++++-------- .../grafana-plugins/umh-datasource.md | 31 +++++++------- 4 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 umh.docs.umh.app/archetypes/grafana-plugins.md diff --git a/umh.docs.umh.app/archetypes/grafana-plugins.md b/umh.docs.umh.app/archetypes/grafana-plugins.md new file mode 100644 index 000000000..6b043e7f3 --- /dev/null +++ b/umh.docs.umh.app/archetypes/grafana-plugins.md @@ -0,0 +1,19 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +content_type: grafana-plugin +description: | +The technical documentation of the {{ .Name }} plugin, +which +weight: 0 +--- + + + + + + +## {{% heading "prerequisites" %}} + +## {{% heading "howitworks" %}} + +## {{% heading "configuration" %}} \ No newline at end of file diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md index 8f6d25a74..b7b1556ca 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md @@ -2,7 +2,7 @@ title: "Factoryinput-panel" content_type: task description: | - This page has the technical documentation of the microservice factoryinput-panel, which allows for easy execution of MQTT messages inside the UMH stack from a Grafana panel. + This page contains the technical documentation of the plugin factoryinput-panel, which allows for easy execution of MQTT messages inside the UMH stack from a Grafana panel. weight: 3000 --- diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index b736c12c5..c55c04731 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -1,23 +1,27 @@ --- -title: "umh-datasource-v2" -content_type: task +title: "Umh Datasource V2" +content_type: grafana-plugin description: | - The technical documentation of the microservice umh-datasource-v2, which allows for easy data extraction from factoryinsight. + This page contains the technical documentation of the umh-datasource-v2 plugin, + which allows for easy data extraction from factoryinsight. weight: 1000 --- -## Get started + -The **UMH Datasource v2** comes preinstalled with the United Manufacturing Hub. +The plugin, **umh-datasource-v2**, is a Grafana data source plugin that allows you to fetch +resources from a database and build queries for your dashboard. -## Usage + + +## {{% heading "howitworks" %}} 1. When creating a new panel, select **umh-datasource-v2** from the Data source drop-down menu. It will then fetch the resources from the database. The loading time may depend on your internet speed. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png/?width=85%) -2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are placeholders +2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are placeholders for the future implementation of the new data model. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png/?width=85%) @@ -27,14 +31,16 @@ The **UMH Datasource v2** comes preinstalled with the United Manufacturing Hub. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png/?width=85%) 4. Next you can specify how to transform the data, depending on what value you selected. - For example, all the custom tags will have the aggregation options available: + For example, all the custom tags will have the aggregation options available. For example if you query a **processValue**: + - **Time bucket**: lets you group data in a time bucket + - **Aggregates**: common statistical aggregations (maximum, minimum, sum or count) + - **Handling missing values**: lets you choose how missing data should be handled ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png/?width=85%) +## {{% heading "configuration" %}} -## Configuration - -1. In Grafana, navigate to the Data sources configuration panel. +1. In Grafana, navigate to the Data sources configuration panel. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png/?width=15%) @@ -43,9 +49,11 @@ The **UMH Datasource v2** comes preinstalled with the United Manufacturing Hub. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) 3. Configurations: - - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. - - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. - - API Key: authenticates the API calls to factoryinsight. - Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. + - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. + - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. + - API Key: authenticates the API calls to factoryinsight. + Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. + + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=85%) - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=85%) \ No newline at end of file + {{}} \ No newline at end of file diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md index 05b0eb101..51b5cdea5 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md @@ -1,23 +1,23 @@ --- -title: "umh-datasource" -content_type: task +title: "Umh Datasource" +content_type: grafana-plugin description: | - The technical documentation of the microservice umh-datasource, which allows for easy data extraction from factoryinsight. + This page contains the technical documentation of the plugin umh-datasource, which allows for easy data extraction from factoryinsight. weight: 2000 --- -UMH Datasource provides a Grafana 8.X compatible plugin, allowing easy data extraction from the UMH factoryinsight microservice. + -{{% notice note %}} +{{% notice warning %}} We are no longer maintaining this microservice. Use instead our new microservice datasource-v2 for data extraction from factoryinsight. {{% /notice %}} +The **umh datasource** is a Grafana 8.X compatible plugin, that allows you to fetch resources from a database +and build queries for your dashboard. -## Get started + -The **UMH Datasource** comes preinstalled with the United Manufacturing Hub. - -## Usage +## {{% heading "howitworks" %}} 1. When creating a new panel, select **umh-datasource** from the Data source drop-down menu. It will then fetch the resources from the database. The loading time may depend on your internet speed. @@ -28,8 +28,7 @@ The **UMH Datasource** comes preinstalled with the United Manufacturing Hub. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png/?width=85%) - -## Configuration +## {{% heading "configuration" %}} 1. In Grafana, navigate to the Data sources configuration panel. @@ -38,10 +37,10 @@ The **UMH Datasource** comes preinstalled with the United Manufacturing Hub. 2. Select **umh-datasource** to configure it. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) -3. Configurations: - - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. - - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. - - API Key: authenticates the API calls to factoryinsight. - Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. +3. Configurations: + - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. + - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. + - API Key: authenticates the API calls to factoryinsight. + Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png/?width=85%) From 666aa9b5eebed89729ece852c163bda6374b89e6 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Fri, 10 Mar 2023 15:35:13 +0100 Subject: [PATCH 03/15] shortcodes --- .../microservices/grafana-plugins/umh-datasource-v2.md | 6 +++--- .../microservices/grafana-plugins/umh-datasource.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index c55c04731..c5559336e 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -49,11 +49,11 @@ resources from a database and build queries for your dashboard. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) 3. Configurations: - - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. + - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. - API Key: authenticates the API calls to factoryinsight. - Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. + Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=85%) - {{}} \ No newline at end of file + {{< resource type="grafanaplugin" name="baseurlfactoryinsight" >}} \ No newline at end of file diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md index 51b5cdea5..552d7fbf7 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md @@ -38,9 +38,9 @@ and build queries for your dashboard. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) 3. Configurations: - - Base URL: the URL for the factoryinsight backend. Defaults to `http://united-manufacturing-hub-factoryinsight-service/`. + - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. - API Key: authenticates the API calls to factoryinsight. - Can be found with UMHLens by going to Secrets → factoryinsight-secret → apiKey. It should follow the format `Basic xxxxxxxx`. + Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png/?width=85%) From ebb1ffb0c853da70316b08946cb811ededde49d6 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Mon, 13 Mar 2023 10:50:34 +0100 Subject: [PATCH 04/15] added all options to transform queried data, also did matteos changes --- .../grafana-plugins/factoryinput-panel.md | 2 +- .../grafana-plugins/umh-datasource-v2.md | 20 ++++++++++--------- .../grafana-plugins/umh-datasource.md | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md index b7b1556ca..39ea8ccc0 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md @@ -7,7 +7,7 @@ weight: 3000 --- {{% notice warning %}} -This microservice is still in development and is not considered stable for production use +This plugin is still in development and is not considered stable for production use {{% /notice %}} diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index c5559336e..a0b34da4f 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -19,24 +19,28 @@ resources from a database and build queries for your dashboard. 1. When creating a new panel, select **umh-datasource-v2** from the Data source drop-down menu. It will then fetch the resources from the database. The loading time may depend on your internet speed. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png/?width=85%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png/?width=80%) 2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are placeholders for the future implementation of the new data model. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png/?width=85%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png/?width=80%) 3. Only the available values for the specified work cell will be fetched from the database. You can then select which data value you want to query. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png/?width=85%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png/?width=80%) 4. Next you can specify how to transform the data, depending on what value you selected. - For example, all the custom tags will have the aggregation options available. For example if you query a **processValue**: + Below you can find the options to transform the queried data: + - **Time bucket**: lets you group data in a time bucket - **Aggregates**: common statistical aggregations (maximum, minimum, sum or count) - **Handling missing values**: lets you choose how missing data should be handled + - **Keep state integer**. lets you keep the state as an integer instead of converting it into its corresponding string + - **Include running processes**: includes the running processes + - **Keep states**: keeps the state as an integer or string - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png/?width=85%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png/?width=80%) ## {{% heading "configuration" %}} @@ -46,7 +50,7 @@ resources from a database and build queries for your dashboard. 2. Select **umh-v2-datasource** to configure it. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=80%) 3. Configurations: - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. @@ -54,6 +58,4 @@ resources from a database and build queries for your dashboard. - API Key: authenticates the API calls to factoryinsight. Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=85%) - - {{< resource type="grafanaplugin" name="baseurlfactoryinsight" >}} \ No newline at end of file + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=80%) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md index 552d7fbf7..30df40916 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md @@ -9,7 +9,7 @@ weight: 2000 {{% notice warning %}} -We are no longer maintaining this microservice. Use instead our new microservice datasource-v2 for data extraction from factoryinsight. +We are no longer maintaining this plugin. Instead, use our new plugin datasource-v2 for data extraction from factoryinsight. {{% /notice %}} The **umh datasource** is a Grafana 8.X compatible plugin, that allows you to fetch resources from a database From 9dd9ec5feea8b66c419ede9022fe0515b8085435 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Mon, 13 Mar 2023 10:59:25 +0100 Subject: [PATCH 05/15] git lfs From ac9d8fefb83f1df49077f4a438500f747cfa7a1a Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Mon, 13 Mar 2023 11:56:33 +0100 Subject: [PATCH 06/15] git lfs From d942df9b52d026dcfc17427f6e2d137d26eaa672 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Mon, 13 Mar 2023 13:01:14 +0100 Subject: [PATCH 07/15] test --- .../microservices/grafana-plugins/umh-datasource-v2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index a0b34da4f..321def534 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -50,7 +50,7 @@ resources from a database and build queries for your dashboard. 2. Select **umh-v2-datasource** to configure it. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=80%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/) 3. Configurations: - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. @@ -58,4 +58,4 @@ resources from a database and build queries for your dashboard. - API Key: authenticates the API calls to factoryinsight. Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/?width=80%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/) From 445cdf805944c20115365a10fcbec077ad828105 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Mon, 13 Mar 2023 13:06:40 +0100 Subject: [PATCH 08/15] test --- .../microservices/grafana-plugins/umh-datasource-v2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 321def534..5c324a1c1 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -58,4 +58,4 @@ resources from a database and build queries for your dashboard. - API Key: authenticates the API calls to factoryinsight. Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png/) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png?width=80%) From 0977ebfc493b882302e6b2a99a85f11ab82e255e Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Mon, 13 Mar 2023 13:09:04 +0100 Subject: [PATCH 09/15] fixed pictures --- .../grafana-plugins/umh-datasource-v2.md | 12 ++++++------ .../microservices/grafana-plugins/umh-datasource.md | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 5c324a1c1..8b8a8e1a3 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -19,16 +19,16 @@ resources from a database and build queries for your dashboard. 1. When creating a new panel, select **umh-datasource-v2** from the Data source drop-down menu. It will then fetch the resources from the database. The loading time may depend on your internet speed. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png/?width=80%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png?width=80%) 2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are placeholders for the future implementation of the new data model. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png/?width=80%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png?width=80%) 3. Only the available values for the specified work cell will be fetched from the database. You can then select which data value you want to query. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png/?width=80%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png?width=80%) 4. Next you can specify how to transform the data, depending on what value you selected. Below you can find the options to transform the queried data: @@ -40,17 +40,17 @@ resources from a database and build queries for your dashboard. - **Include running processes**: includes the running processes - **Keep states**: keeps the state as an integer or string - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png/?width=80%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png?width=80%) ## {{% heading "configuration" %}} 1. In Grafana, navigate to the Data sources configuration panel. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png/?width=15%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png?width=15%) 2. Select **umh-v2-datasource** to configure it. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png?width=80%) 3. Configurations: - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md index 30df40916..f8be9a25d 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md @@ -22,25 +22,25 @@ and build queries for your dashboard. 1. When creating a new panel, select **umh-datasource** from the Data source drop-down menu. It will then fetch the resources from the database. The loading time may depend on your internet speed. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV1.png/?width=85%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV1.png?width=85%) 2. Select your query parameters **Location**, **Asset** and **Value** to build your query. - ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png/?width=85%) + ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValuesV1.png?width=85%) ## {{% heading "configuration" %}} 1. In Grafana, navigate to the Data sources configuration panel. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png/?width=15%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfigurationPanel.png?width=15%) 2. Select **umh-datasource** to configure it. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png/?width=85%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsSelectingConfiguration.png?width=85%) 3. Configurations: - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. - API Key: authenticates the API calls to factoryinsight. Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. - ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png/?width=85%) + ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfiguringDatasourceV1.png?width=85%) From d64c447c5cb4087ad1b54f2dbbd10f0abe273b02 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Tue, 14 Mar 2023 13:09:13 +0100 Subject: [PATCH 10/15] added timescale documentation and removed previous explanations --- .../grafana-plugins/umh-datasource-v2.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 8b8a8e1a3..97c9da0b5 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -33,12 +33,14 @@ resources from a database and build queries for your dashboard. 4. Next you can specify how to transform the data, depending on what value you selected. Below you can find the options to transform the queried data: - - **Time bucket**: lets you group data in a time bucket - - **Aggregates**: common statistical aggregations (maximum, minimum, sum or count) - - **Handling missing values**: lets you choose how missing data should be handled - - **Keep state integer**. lets you keep the state as an integer instead of converting it into its corresponding string - - **Include running processes**: includes the running processes - - **Keep states**: keeps the state as an integer or string + - **Time bucket** + - **Aggregates** + - **Handling missing values** + - **Keep state integer** + - **Include running processes** + - **Keep states** + + For more information on a specific option take a look at [the timescale documentation](https://docs.timescale.com/timescaledb/latest/how-to-guides/continuous-aggregates/). ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png?width=80%) From 7bf95a2763d35464d603def54146043dc932edc2 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Tue, 14 Mar 2023 13:28:15 +0100 Subject: [PATCH 11/15] added timescale documentation and removed previous explanations --- .../grafana-plugins/umh-datasource-v2.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 97c9da0b5..2d2a02886 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -33,12 +33,12 @@ resources from a database and build queries for your dashboard. 4. Next you can specify how to transform the data, depending on what value you selected. Below you can find the options to transform the queried data: - - **Time bucket** - - **Aggregates** - - **Handling missing values** - - **Keep state integer** - - **Include running processes** - - **Keep states** + - **Time bucket** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/) + - **Aggregates** [timescale documentation](https://docs.timescale.com/timescaledb/latest/overview/core-concepts/continuous-aggregates/) + - **Handling missing values** [timescale documentation](https://docs.timescale.com/timescaledb/latest/tutorials/grafana/visualize-missing-data/) + - **Keep state integer** + - **Include running processes** + - **Keep states** For more information on a specific option take a look at [the timescale documentation](https://docs.timescale.com/timescaledb/latest/how-to-guides/continuous-aggregates/). From 1b1b389efc8c973c0e23e1ac4351177bf770c3a4 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Tue, 14 Mar 2023 16:26:04 +0100 Subject: [PATCH 12/15] timescale documentation --- .../grafana-plugins/umh-datasource-v2.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 2d2a02886..4fbbf190e 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -33,14 +33,14 @@ resources from a database and build queries for your dashboard. 4. Next you can specify how to transform the data, depending on what value you selected. Below you can find the options to transform the queried data: - - **Time bucket** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/) - - **Aggregates** [timescale documentation](https://docs.timescale.com/timescaledb/latest/overview/core-concepts/continuous-aggregates/) - - **Handling missing values** [timescale documentation](https://docs.timescale.com/timescaledb/latest/tutorials/grafana/visualize-missing-data/) - - **Keep state integer** - - **Include running processes** - - **Keep states** - - For more information on a specific option take a look at [the timescale documentation](https://docs.timescale.com/timescaledb/latest/how-to-guides/continuous-aggregates/). + - **Time bucket** + - **Aggregates** + - **Handling missing values** + - **Keep state integer** + - **Include running processes** + - **Keep states** + + For more information on a specific option take a look at [the timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/). ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png?width=80%) From b5cd7c41f0f99ea01d71c7023f7d35d66579f969 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Thu, 16 Mar 2023 15:22:22 +0100 Subject: [PATCH 13/15] feedback jeremy and matteo --- .../grafana-plugins/umh-datasource-v2.md | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 4fbbf190e..ca257633c 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -31,16 +31,24 @@ resources from a database and build queries for your dashboard. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png?width=80%) 4. Next you can specify how to transform the data, depending on what value you selected. - Below you can find the options to transform the queried data: - - **Time bucket** - - **Aggregates** - - **Handling missing values** - - **Keep state integer** - - **Include running processes** - - **Keep states** + For **processValue**: + + - **Time bucket** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/) + - **Aggregates** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/statistical-and-regression-analysis/stats_agg-one-variable/) + - **Handling missing values** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/) + - **Include last datapoint before time interval** + - **Include next datapoint after time interval** + + For **state**: + + - **Keep state integer** If enabled, instead of showing the string representation of the state, it shows its integer value. e.g. instead of "No shifts", returns 160000. + + For **tables**: + + - **Include running processes** + - **Keep states** works the same way as **Keep state integer**, but only for availability tables, like availabilityHistogram and availabilityTotal. - For more information on a specific option take a look at [the timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/). ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png?width=80%) From 429238ca4bf37a31f34118bed55379d374f0e04f Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Fri, 28 Apr 2023 10:31:37 +0200 Subject: [PATCH 14/15] included Matteos Feedback --- .../grafana-plugins/factoryinput-panel.md | 2 +- .../grafana-plugins/umh-datasource-v2.md | 39 +++++++++++-------- .../grafana-plugins/umh-datasource.md | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md index 39ea8ccc0..277d725bb 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/factoryinput-panel.md @@ -1,5 +1,5 @@ --- -title: "Factoryinput-panel" +title: "Factoryinput Panel" content_type: task description: | This page contains the technical documentation of the plugin factoryinput-panel, which allows for easy execution of MQTT messages inside the UMH stack from a Grafana panel. diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index ca257633c..0a742eda6 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -2,7 +2,7 @@ title: "Umh Datasource V2" content_type: grafana-plugin description: | - This page contains the technical documentation of the umh-datasource-v2 plugin, + This page contains the technical documentation of the Grafana umh-datasource-v2 plugin, which allows for easy data extraction from factoryinsight. weight: 1000 --- @@ -16,38 +16,44 @@ resources from a database and build queries for your dashboard. ## {{% heading "howitworks" %}} -1. When creating a new panel, select **umh-datasource-v2** from the Data source drop-down menu. It will then fetch the resources +1. When creating a new panel, select umh-datasource-v2 from the Data source drop-down menu. It will then fetch the + resources from the database. The loading time may depend on your internet speed. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingV2.png?width=80%) -2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are placeholders +2. Select the resources in the cascade menu to build your query. **DefaultArea** and **DefaultProductionLine** are + placeholders for the future implementation of the new data model. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingWorkCell.png?width=80%) -3. Only the available values for the specified work cell will be fetched from the database. You can then select which data value you want to query. +3. Only the available values for the specified work cell will be fetched from the database. You can then select which + data value you want to query. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingValue.png?width=80%) 4. Next you can specify how to transform the data, depending on what value you selected. - For **processValue**: + For *processValue*: - - **Time bucket** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/) - - **Aggregates** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/statistical-and-regression-analysis/stats_agg-one-variable/) - - **Handling missing values** [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/) - - **Include last datapoint before time interval** - - **Include next datapoint after time interval** + - Time bucket: allows you to aggregate data into buckets of time. Read more on the [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/) + - Aggregates: allows you to choose between different aggregate functions like Average, Maximum, Minimum, Sum and + Count. Read more on the [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/statistical-and-regression-analysis/stats_agg-one-variable/) + - Handling missing values: allows you to configure how to handle missing values. Read more on the [timescale documentation](https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/) + - Include last datapoint before time interval + - Include next datapoint after time interval - For **state**: + For *state*: - - **Keep state integer** If enabled, instead of showing the string representation of the state, it shows its integer value. e.g. instead of "No shifts", returns 160000. + - Keep state integer: if enabled, instead of showing the string representation of the state, it shows its + integer value. e.g. instead of "No shifts", returns 160000. - For **tables**: + For *tables*: - - **Include running processes** - - **Keep states** works the same way as **Keep state integer**, but only for availability tables, like availabilityHistogram and availabilityTotal. + - Include running processes + - Keep states works the same way as Keep state integer, but only for availability tables, like + availabilityHistogram and availabilityTotal. ![selectingDatasource](/images/grafana-plugins/grafanaPluginsSelectingOptions.png?width=80%) @@ -66,6 +72,7 @@ resources from a database and build queries for your dashboard. - Base URL: the URL for the factoryinsight backend. Defaults to `http://{{< resource type="service" name="factoryinsight" >}}/`. - Enterprise name: previously **customerID** for the old datasource plugin. Defaults to **factoryinsight**. - API Key: authenticates the API calls to factoryinsight. - Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. It should follow the format `Basic xxxxxxxx`. + Can be found with UMHLens by going to Secrets → {{< resource type="secret" name="factoryinsight" >}} → apiKey. + It should follow the format `Basic xxxxxxxx`. ![selectingConfiguration](/images/grafana-plugins/grafanaPluginsConfuguringDatasourceV2.png?width=80%) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md index f8be9a25d..906852db4 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource.md @@ -12,7 +12,7 @@ weight: 2000 We are no longer maintaining this plugin. Instead, use our new plugin datasource-v2 for data extraction from factoryinsight. {{% /notice %}} -The **umh datasource** is a Grafana 8.X compatible plugin, that allows you to fetch resources from a database +The umh-datasource is a Grafana 8.X compatible plugin, that allows you to fetch resources from a database and build queries for your dashboard. From 14ed452eda50dee9a561f21a174128c2ffd9a535 Mon Sep 17 00:00:00 2001 From: krgrsebastian Date: Fri, 28 Apr 2023 11:16:51 +0200 Subject: [PATCH 15/15] included Matteos Feedback --- .../microservices/grafana-plugins/umh-datasource-v2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md index 0a742eda6..b835f0d9d 100644 --- a/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md +++ b/umh.docs.umh.app/content/en/docs/architecture/microservices/grafana-plugins/umh-datasource-v2.md @@ -2,14 +2,14 @@ title: "Umh Datasource V2" content_type: grafana-plugin description: | - This page contains the technical documentation of the Grafana umh-datasource-v2 plugin, + This page contains the technical documentation of the Grafana umh-datasource-v2 plugin, which allows for easy data extraction from factoryinsight. weight: 1000 --- -The plugin, **umh-datasource-v2**, is a Grafana data source plugin that allows you to fetch +The umh-datasource-v2 plugin is a Grafana data source plugin that allows you to fetch resources from a database and build queries for your dashboard.