Skip to content

Commit a5af0f2

Browse files
author
mbrill-nt
committed
#61: Remove requirement for "aggregationType" template variable
1 parent d8dcad7 commit a5af0f2

File tree

16 files changed

+70
-98
lines changed

16 files changed

+70
-98
lines changed

README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@ Depending on the query result, the data provides the following fields:
4747
* **threshold**: The critical threshold in miliseconds for the response times of incoming requests.
4848

4949

50-
In order to use this data you simply have to follow the following steps:
51-
52-
1. Add a `template variable` in Grafana called `aggregationType` having the constant value `service`.
53-
2. After selecting the Novatec Service Dependency Graph in your panels' settings check the box called `Show Dummy Data`.
54-
3. Adapt the panel's `Data Mapping` according to the dummy data. You can use the following settings. Note: at least you have to specify the `Request Rate` mapping!
50+
In order to use this data you simply have to activate the Dummy Data Switch you can find in the General Settings. All necessary options will be applied.
51+
After activating the Dummy Data your Data Mapping should look like this:
5552

5653
| key | value |
5754
| --- | --- |
@@ -75,15 +72,11 @@ ___
7572

7673
If you now want to use your own data source you have make sure, that the data received is in the `TABLE` format and is structured as follows:
7774

78-
* The table requires a column which is named equal to the value of the `aggregationType` template variable. This column defines the component to which the data refers.
79-
**Example**: Assuming the `aggregationType` template variable is set to `app`, the data table has to provide a column named `app`.
80-
* The table requires at least one column which specifies the connection's origin or target. This column has the following requirements for its naming:
81-
* It requires a suffix which has to be equal to the `aggregationType` template variable.
82-
* In case an incoming connection should be represented, a prefix is required which is equal to the `Source Component Column Prefix` panel option. By default it is `origin_`.
83-
* In case an outcoming connection should be represented, a prefix is required which is equal to the `Target Component Column Prefix` panel option. By default it is `target_`.
84-
85-
**Example**: Assuming the `aggregationType` template variable is set to `app`, the previously mentioned column prefix options are in its default state (`origin_` or `target_`) and we want to represent an outgoing connection. In this case, the data table has to provide a column named: `target_app`
86-
* The data table can contain multiple value columns. These columns have to be mapped on specifc attributes using the panel's `Data Mappings` options.
75+
* The table requires a column which is named equal to the value of the `aggregationType` settings field. This column defines the component to which the data refers to.
76+
**Example**: Assuming the `aggregationType` variable is set to `app`, the data table has to provide a column named `app`.
77+
* The table requires at least one column which specifies the connection's source or target. The settings `Source Component Column` and `Target Component Column` need to be set to the exact namings of the respective fields.
78+
79+
* The data can contain multiple value columns. These columns have to be mapped on specifc attributes using the panel's `Data Mappings` options.
8780
**Example**: Assuming the data table contains a column named `req_rate` which values represents a request rate for the related connection in the current time window. In order to correctly visualize these values as a request rate, the `Request Rate Column` option has to be set to `req_rate` - the column's name.
8881

8982
#### Examples
@@ -98,13 +91,13 @@ If the previously described requirements are respected, a minimal table can be a
9891
| service a | service c | 75 |
9992
| service c | service d | 25 |
10093

101-
Assuming a `aggregationType` template variable is provided and set to `app` and the panel's settings are specified as seen in the screenshot, the panel will visualize the data as following:
94+
Assuming a `aggregationType` variable is provided and set to `app` and the panel's settings are specified as seen in the screenshot, the panel will visualize the data as following:
10295

10396
![Visualization of the minimal data table.](https://raw.githubusercontent.com/NovatecConsulting/novatec-service-dependency-graph-panel/master/src/img/data-example-1.png)
10497

10598
> Note: It is important to know that connections can only be generated if at least one request-rate column (incoming or outgoing) is defined.
10699
107-
The data mapping represents always the data from the point of view of the component which is specified by the column which name is equal to the `aggregationType` template variable. This means that if we want to represent an outgoing connection in this example, the `app` and `target_app` columns must be present. In case an incoming connection should be represented, the `app` and `origin_app` columns must be present.
100+
The data mapping represents always the data from the point of view of the component which is specified by the column which name is equal to the `aggregationType` variable. This means that if we want to represent an outgoing connection in this example, the `app` and `target_app` columns must be present. In case an incoming connection should be represented, the `app` and `origin_app` columns must be present.
108101

109102
##### Example 2
110103

dist/README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@ Depending on the query result, the data provides the following fields:
4747
* **threshold**: The critical threshold in miliseconds for the response times of incoming requests.
4848

4949

50-
In order to use this data you simply have to follow the following steps:
51-
52-
1. Add a `template variable` in Grafana called `aggregationType` having the constant value `service`.
53-
2. After selecting the Novatec Service Dependency Graph in your panels' settings check the box called `Show Dummy Data`.
54-
3. Adapt the panel's `Data Mapping` according to the dummy data. You can use the following settings. Note: at least you have to specify the `Request Rate` mapping!
50+
In order to use this data you simply have to activate the Dummy Data Switch you can find in the General Settings. All necessary options will be applied.
51+
After activating the Dummy Data your Data Mapping should look like this:
5552

5653
| key | value |
5754
| --- | --- |
@@ -75,15 +72,11 @@ ___
7572

7673
If you now want to use your own data source you have make sure, that the data received is in the `TABLE` format and is structured as follows:
7774

78-
* The table requires a column which is named equal to the value of the `aggregationType` template variable. This column defines the component to which the data refers.
79-
**Example**: Assuming the `aggregationType` template variable is set to `app`, the data table has to provide a column named `app`.
80-
* The table requires at least one column which specifies the connection's origin or target. This column has the following requirements for its naming:
81-
* It requires a suffix which has to be equal to the `aggregationType` template variable.
82-
* In case an incoming connection should be represented, a prefix is required which is equal to the `Source Component Column Prefix` panel option. By default it is `origin_`.
83-
* In case an outcoming connection should be represented, a prefix is required which is equal to the `Target Component Column Prefix` panel option. By default it is `target_`.
84-
85-
**Example**: Assuming the `aggregationType` template variable is set to `app`, the previously mentioned column prefix options are in its default state (`origin_` or `target_`) and we want to represent an outgoing connection. In this case, the data table has to provide a column named: `target_app`
86-
* The data table can contain multiple value columns. These columns have to be mapped on specifc attributes using the panel's `Data Mappings` options.
75+
* The table requires a column which is named equal to the value of the `aggregationType` settings field. This column defines the component to which the data refers to.
76+
**Example**: Assuming the `aggregationType` variable is set to `app`, the data table has to provide a column named `app`.
77+
* The table requires at least one column which specifies the connection's source or target. The settings `Source Component Column` and `Target Component Column` need to be set to the exact namings of the respective fields.
78+
79+
* The data can contain multiple value columns. These columns have to be mapped on specifc attributes using the panel's `Data Mappings` options.
8780
**Example**: Assuming the data table contains a column named `req_rate` which values represents a request rate for the related connection in the current time window. In order to correctly visualize these values as a request rate, the `Request Rate Column` option has to be set to `req_rate` - the column's name.
8881

8982
#### Examples
@@ -98,13 +91,13 @@ If the previously described requirements are respected, a minimal table can be a
9891
| service a | service c | 75 |
9992
| service c | service d | 25 |
10093

101-
Assuming a `aggregationType` template variable is provided and set to `app` and the panel's settings are specified as seen in the screenshot, the panel will visualize the data as following:
94+
Assuming a `aggregationType` variable is provided and set to `app` and the panel's settings are specified as seen in the screenshot, the panel will visualize the data as following:
10295

10396
![Visualization of the minimal data table.](https://raw.githubusercontent.com/NovatecConsulting/novatec-service-dependency-graph-panel/master/src/img/data-example-1.png)
10497

10598
> Note: It is important to know that connections can only be generated if at least one request-rate column (incoming or outgoing) is defined.
10699
107-
The data mapping represents always the data from the point of view of the component which is specified by the column which name is equal to the `aggregationType` template variable. This means that if we want to represent an outgoing connection in this example, the `app` and `target_app` columns must be present. In case an incoming connection should be represented, the `app` and `origin_app` columns must be present.
100+
The data mapping represents always the data from the point of view of the component which is specified by the column which name is equal to the `aggregationType` variable. This means that if we want to represent an outgoing connection in this example, the `app` and `target_app` columns must be present. In case an incoming connection should be represented, the `app` and `origin_app` columns must be present.
108101

109102
##### Example 2
110103

dist/img/data-example-1.png

7.94 KB
Loading

dist/img/data-example-2.png

15.2 KB
Loading

dist/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Webpack App</title>
6+
</head>
7+
<body>
8+
<script type="text/javascript" src="/module.js"></script></body>
9+
</html>

dist/module.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/img/data-example-1.png

7.94 KB
Loading

src/img/data-example-2.png

15.2 KB
Loading

src/options/DefaultSettings.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ export const DefaultSettings: PanelSettings = {
44
animate: true,
55

66
dataMapping: {
7-
sourceComponentPrefix: 'origin_',
8-
targetComponentPrefix: 'target_',
7+
aggregationType: 'service',
8+
sourceColumn: 'origin_service',
9+
targetColumn: 'target_service',
910

1011
responseTimeColumn: 'response-time',
1112
requestRateColumn: 'request-rate',

0 commit comments

Comments
 (0)