Variable, Save Querying and View
Variable
Variable allows you to dynamically display tracking information on a dashboard. With a single dashboard, you can select a value for the variable to view information on various objects.
To create a variable in a dashboard, follow the instructions below:
Access the Dashboard where you want to create a Variable, and select Create a variable
Select Add a variable
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-ad31eee6beb5362560b04d77cdfc4332917bd90e%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=a6afe5c6&sv=1)
3. Select/enter the following information:
Dimension Key: choose a dimension key that will provide a list of values for your variable, for example, hostname.
Name: name the variable, the system will automatically generate a suitable name based on the selected dimension key
Filter: you can filter the values of this variable with other dimension keys or variables
Default value: default value for the variable
Values: list of values for the variable, taken from the selected dimension key.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-4619f22e703493aecea15026df0a5701b266e291%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=4d4b74f4&sv=1)
Suppose here we choose the dimension key as hostname. You will see the values of the variable will be a list of all hosts in the system. Here you can select Dynamic by time range for the system to automatically include all hostnames based on the selected time range, or you can choose specific hostnames from the displayed list. For optimal performance, we recommend using Dynamic by time range.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-0c36705aad5143d473b60aeaee60dc47d2619e4c%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=ee0363ed&sv=1)
4. To apply this variable to widgets, you can manually add/edit the widget and include it in the filter section, or use the auto-add feature here. When you click +, the system will automatically add this variable to all widgets in the dashboard. Similarly, clicking - will automatically remove it.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-8cb133e249f342f8f0076c414e7f189a2a12e2e6%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e1d690b2&sv=1)
5. Select "Save" to create a variable
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-af92c221f694cabcb10a11241c70df08542cc64d%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e5947197&sv=1)
You will notice that using the auto-add feature ( + ), the widgets on the dashboard will automatically add $hostname to the filter. However, when using this feature, you should also review the list of selected dimensions to ensure they are appropriate and make adjustments accordingly.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-22378a1a700586c4b1d97a5b2bba45d3855a47c4%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=ae9ba27c&sv=1)
If you do not use the auto-add feature, you can manually add to the filter as usual, and the system will display the variable as a dimension key.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-a2a8584203b043df298dd30e241fb1b3df5871f4%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=c491f9c5&sv=1)
When the variable is successfully created, you will see it displayed on the dashboard and can select a value to display the dashboard according to the selected value.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-ee3f1e4156c09624b05c0a0deb02fd3bf219ad35%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e63da530&sv=1)
From here, you can choose different hosts to monitor parameters very flexibly without needing to create or view multiple dashboards.
View
View allows you to create perspectives for the dashboard, saving variable values for later use.
To create a View for a dashboard, follow the instructions below:
After you have a variable and want to save its value for convenient access later, use the View feature and click "Save view" to save it.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-10b268980192594dc8e3487dd89eed9fefc45df8%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=5fa47e10&sv=1)
2. Name the view, and when you select this view, the system will automatically populate the list of variables below.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-ce26cf66e77b2d0bc19bae2105af661469b8200d%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=8d0097a5&sv=1)
3. After successfully creating views, you will see a list of views to choose from. Suppose there are two views: host-storagegw and host-nginx
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-35bd8d3749cdc0821ba36fe869b851d200e70b79%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=352f5517&sv=1)
4. When you select view: host-nginx, the system will automatically load a list and different values for the variable.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fgit-blob-4528a07592a66e429b0c1d8a780920ac2de384e8%252Fimage.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=7b9d2707&sv=1)
To manage Views and Variables, you can click on the gear icon:
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252Fbp4PzZ7LRQ3F7QOHX8JK%252Fimage.png%3Falt%3Dmedia%26token%3Ddc7401b4-3e40-48df-a11b-c1f6e048e888&width=768&dpr=4&quality=100&sign=e176f679&sv=1)
Save query
vMonitor Platform provides you the ability to reuse a query that you have previously created through the Save query feature that we offer.
Save query
To save a query, follow the instructions below:
In the query command area, click the Save icon.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FSmu90EUU6HEwwbxZVJOx%252Fimage.png%3Falt%3Dmedia%26token%3D74f2af24-0a84-44e9-9586-c2247c60dd35&width=768&dpr=4&quality=100&sign=95bb6d29&sv=1)
Enter the Query name.
Select Save
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252F2ZxB2okWwWNXRrl09hjH%252Fimage.png%3Falt%3Dmedia%26token%3Dc3992473-ff3a-4b33-861f-b43e40cd85cb&width=768&dpr=4&quality=100&sign=ce4aae66&sv=1)
The query is now saved with the memorable name you entered.
Reuse existing queries
After you have saved the query, you can reuse this query by:
In the query command area, select the dropdown icon
(this icon is located next to the Save query icon).
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FfdM0BjqWM8XSGzeRHUYV%252Fimage.png%3Falt%3Dmedia%26token%3Dc1df6054-9ee8-4c62-ab15-373091725d08&width=768&dpr=4&quality=100&sign=ac9748c8&sv=1)
At this point, the system displays a list of saved queries, allowing you to reuse them by selecting the desired query.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FYhPI4TmrRLVw3y61jXxU%252Fimage.png%3Falt%3Dmedia%26token%3Df0eca9c1-47b6-47db-8668-bb91796c21e5&width=768&dpr=4&quality=100&sign=42eb070&sv=1)
You can edit this query and save it as a new independent query from the one you reused by selecting Save as new query.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FDgI8ZuRCrpTdfwoGubrL%252Fimage.png%3Falt%3Dmedia%26token%3D4fac6b21-ffdc-4206-9959-7ef1778c0e19&width=768&dpr=4&quality=100&sign=a10d013b&sv=1)
Query management
You can view the saved queries or delete a query by selecting Manage saved queries and choosing the Delete icon.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252F1V0OG3EiGXjAbjhZtESO%252Fimage.png%3Falt%3Dmedia%26token%3Da8c337d2-8178-43b9-b44c-8b329e210cf6&width=768&dpr=4&quality=100&sign=9b0b9ac4&sv=1)
Last updated