monitoring: Monitoring
The monitoring
utility is used for managing the data
presented by the Monitoring extension (former Advanced Monitoring).
Note: The utility is available when the Monitoring and Grafana extensions are installed in Plesk.
Usage
plesk ext monitoring <command> <operation> [options] [arguments]
Example
The following command sets the IIS memory usage threshold to 10%:
plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10
Commands
Command | Operation | Description | Example |
---|---|---|---|
--installation |
--get-status | --fix | --detect-hardware-changes
|
Manages the Monitoring installation. |
To check for changes made to the server hardware and reflect them (if any): plesk ext monitoring --installation --detect-hardware-changes |
--overview |
--list-panel-ids | --list-targets | --list-sections | --get-sources-map
|
Shows the main Monitoring data: panel IDs, threshold IDs, and tab IDs. |
To show the table of dependencies between panel IDs, tab IDs, and threshold IDs in the JSON format: plesk ext monitoring --overview --get-sources-map -format json |
--thresholds |
--list | --set | --set-from-json | --set-from-file | --unset | --restore-defaults
|
Manages thresholds in Monitoring. |
To restore the default threshold values: plesk ext monitoring --thresholds --restore-defaults |
--arrangement |
--list | --set | --set-from-json | --set-from-file | --restore-defaults
|
Manages the layout of panels on tabs in Monitoring. |
To display only the “Physical and virtual memory usage” panel on the “Overview” tab in Monitoring (by default, three panels are shown on this tab): plesk ext monitoring --arrangement --set -section overview -panel-ids memory_usage |
--help or -h
|
Displays the help on the utility usage. |
To see the help on the utility usage: plesk ext monitoring --help or plesk ext monitoring -h |
Operations
Operation | Option | Description | Example |
---|---|---|---|
--get-status |
Shows the result of the Monitoring installation. Used with the |
To show the result of the extension installation: plesk ext monitoring --installation --get-status |
|
--fix |
Detects and fixes Monitoring issues (if any). Used with the |
To detect and fix Monitoring issues (if any): plesk ext monitoring --installation --fix |
|
--detect-hardware-changes |
Checks for changes made to the server hardware and, if the changes exist, reflects them in Monitoring. Learn more about updating Monitoring after hardware change. Used with the |
To check for changes made to the server hardware and reflect them (if any): plesk ext monitoring --installation --detect-hardware-changes |
|
--list-panel-ids |
Lists the IDs of all panels in Monitoring.
For example, the “Plesk CPU usage” panel in the Plesk interface has the Used with the |
To list the IDs of all panels in Monitoring: plesk ext monitoring --overview --list-panel-ids |
|
--list-sections |
Lists the IDs of all tabs in Monitoring.
For example, the “Disk” tab in the Plesk interface has the Used with the |
To list the IDs of all tabs in Monitoring: plesk ext monitoring --overview --list-sections |
|
--list-targets |
Lists the IDs of all available thresholds in Monitoring. Used with the |
To list the IDs of all available thresholds in Monitoring in the JSON format: plesk ext monitoring --overview --list-targets -format json |
|
--get-sources-map |
Shows the table of dependencies between panel IDs, tab IDs, and threshold IDs in Monitoring.
The table shows that, for example, the Used with the |
To show the table of dependencies between panel IDs, tab IDs, and threshold IDs in the JSON format: plesk ext monitoring --overview --get-sources-map -format json |
|
--list |
If used with the --thresholds command, shows the table of all thresholds whose values have been set along with the exact values.
If used with the --arrangement command, shows the current layout of panels
(in which order panels are shown on Monitoring tabs). |
To show all set threshold values: plesk ext monitoring --thresholds --list |
|
--set (for the thresholds command) |
-panel-id <panel_ID> [-target <target>] [-operator <operator>] [-type <type>] -value <value> |
Sets or updates the threshold value. When the resource usage exceeds its threshold value, Monitoring will show notifications in the Plesk interface. |
To set the IIS memory usage threshold to 10%: plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10 |
--set (for the --arrangement command) |
-section <section> -panel-ids <panel_IDs> |
Changes which panels and in which order are shown on the Monitoring tab. Note: Monitoring has the default layout of tabs and panels related to them. You can change the order and visibility of the panels on a specific tab but you cannot place a panel on the tab where the panel is not meant to be according to the the default layout. Monitoring in the Plesk interface will not show the tab’s panels
whose IDs you do not specify as arguments for the |
To display only the “Physical and virtual memory usage” panel on the “Overview” tab in Monitoring (by default, three panels are shown on this tab): plesk ext monitoring --arrangement --set -section overview -panel-ids memory_usage |
--set-from-json |
-json <json_string> |
If used with the If used with the
Note:
You need to specify the whole list of all available threshold values/tabs.
|
To set or update all threshold values via a raw JSON string: plesk ext monitoring --thresholds --set-from-json -json "[{\"panelId\":"memory_usage\",\"target\":\"memory:memory-used:value\",\"operator\":\"greater_than\",\"type\":\"percent\",\"value\":90},...]" To change the layout of panels on all Monitoring tabs via a raw JSON string. plesk ext monitoring --arrangement --set-from-json -json "[{\"section\":\"overview\",\"panelIds\":[\"cpu_usage__cpu-0\",\"memory_usage\"]},...]" |
--set-from-file |
-path <path_to_file> |
If used with the If used with the
Note:
You need to specify the whole list of all available threshold values/tabs in a JSON file.
|
To set or update all threshold values using the data specified in the plesk ext monitoring --thresholds --set-from-file -path "C:\Program Files (x86)\Plesk\tmp\values.json" To change the layout of panels on all Monitoring tabs using the data specified in the plesk ext monitoring --arrangement --set-from-file -path "C:\Program Files (x86)\Plesk\tmp\arrangement.json" |
--unset |
-panel-id <panel_ID> |
Deactivates the threshold and deletes the threshold value. Monitoring stops tracking the resource whose threshold you deactivated. |
To stop tracking IIS memory usage: plesk ext monitoring --thresholds --unset -panel-id memory_usage__web |
--restore-defaults |
If used with the If used with the |
To restore the default threshold values: plesk ext monitoring --thresholds --restore-defaults To restore the default layout of Monitoring tabs: plesk ext monitoring --arrangement --restore-defaults |
Options
Option | Description | Example |
---|---|---|
-panel-id |
The panel ID. For example, the “IIS memory usage” panel in the Plesk interface has the The option is used with the |
To set the IIS memory usage threshold to 10%: plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10 |
-target |
The threshold ID related to the panel ID. For example, The option is used with the |
To set the IIS memory usage threshold to 10%: plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10 |
-operator |
The comparison operator. The supported values: The option is used with the |
To set the IIS memory usage threshold to 10%: plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10 |
-type |
The threshold value type. The supported values: The option is used with the |
To set the IIS memory usage threshold to 10%: plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10 |
-value |
The threshold value (a float number). The option is used with the |
To set the IIS memory usage threshold to 10%: plesk ext monitoring --thresholds --set -panel-id memory_usage__web -target service-Web:usedMemory -operator greater_than -type percent -value 10 |
-json |
A string in the JSON format. The option is used with the |
To change the layout of panels on all Monitoring tabs via a raw JSON string. plesk ext monitoring --arrangement --set-from-json -json "[{\"section\":\"overview\",\"panelIds\":[\"cpu_usage__cpu-0\",\"memory_usage\"]},...]" |
-path |
The path to the JSON file. The option is used with the |
To set or update all threshold values using the data specified in the plesk ext monitoring --thresholds --set-from-file -path "C:\Program Files (x86)\Plesk\tmp\values.json" |
-section |
The tab ID. For example, The option is used with the |
To display only the “Physical and virtual memory usage” panel on the “Overview” tab in Monitoring (by default, three panels are shown on this tab): plesk ext monitoring --arrangement --set -section overview -panel-ids memory_usage |
-panel-ids |
Panel IDs separated by commas. For example, The option is used with the |
To display only the “Physical and virtual memory usage” panel on the “Overview” tab in Monitoring: plesk ext monitoring --arrangement --set -section overview -panel-ids memory_usage |
General Options
Option | Description | Example |
---|---|---|
-v | -verbose
|
Shows the detailed output of the command. |
To show the detailed result of the Monitoring installation: plesk ext monitoring --installation --get-status -v |
-f | -format
|
Shows the output in a particular format. The supported formats: raw , json .
By default, all data is shown in the raw format. |
To list the IDs of all available thresholds in Monitoring in the JSON format: plesk ext monitoring --overview --list-targets -format json |