Introduction
Using Remote Script Executor (RSE), you can execute scripts on both Linux and Windows workstations with different script types.
- User-defined external arguments support the script through custom attributes.
- Monitor Level script execution – Ability to pull more metrics in a single script execution.
- Ability to execute different types of scripts through custom script options apart from default options.
- Able to use Credentials attached to the device in the script using the dynamic macro support.
Prerequisite
- Gateway version 7.0.0.
- End device’s SSH Credentials must be assigned on End device itself, not on the Gateway device.
Create Metrics
Metrics enter the metadata to correlate the script output and must match the metrics names added to the Monitor.
Select a client from the All Clients list.
Go to Setup > Monitoring > Metrics.
From METRICS, click + Add and enter:
Metric Scope: Select Partner Metric or Client Specific Metric.
Adaptor Type: Select Application.
Application Type: Select Remote Script Executor.
Name: Unique Name for the metric. The recommended metric naming convention is
<vendorname>_<application name>_<component>_<metric>
. For example, apache_tomcat_webapps_count_Tag Name: User-defined tags for better filtering.
Display Name: Enter Display Name. For example, System Drive Free Space.
Description: Enter the reason for the metric.
Data Point type: Value chosen to plot data in the graph.
Units: Required values for Units. You can choose Units depending on the chosen Data Point Type.
Unit Multiplication Factor: Value chosen to multiply a value based on the chosen unit.
Data Point Conversion: One of the following options:
- Value: To populate data using values.
- Enumerated Map: To populate alert and graph details after adding the states such as Up or Down. The screen displays an more section where you can add the state descriptions and select Alerts and Graphs to populate data.
Metric Processing: One of the following values for processing the Metric:
- Graph
- Notification
- Graph and Notification
- None
Graph
Choose this option when user only needs a Graph for the metric without an alert.Notification
Choose this option when user only needs an Alert for the metric without a graph.
When selecting this option, a dynamic UI will appear to configure alert thresholds, as shown in the screenshot below:Configuring Alert Thresholds:
When setting up notifications, the following options are available for configuring alert thresholds:
Case 1: Enumerated Map
- If "Datapoint Value Conversion" is set to "Enumerated Map," users need to specify the oState column values for Warning and Critical thresholds.
- Warning Threshold: State [Specify State column Value]
- Critical Threshold: State [Specify State column Value]
- Setting Alert thresholds for Enumerated Map conversion from strings to integers:

- Setting Alert thresholds for Enumerated Map conversion from integers to strings:

- Case 2: Value
- If "Datapoint Value Conversion" is set to "Value" (the default setting), users need to specify the metric values for Warning and Critical thresholds.
- Warning Threshold: Value [Specify Warning-level Threshold Value for the metric]
- Critical Threshold: Value [Specify Critical-level Threshold Value for the metric]
- Additional Fields:
- Subject: The metric subject is populated by default but can be customized.
- Description: The metric description is populated by default but can be customized.
- 3. Graph and Notification:
- Choose this option when user needs both Alert and Graph for the metric.
- When selecting this option, a dynamic UI will appear to configure alert thresholds, as shown in the screenshot below:

- Configuring Alert Thresholds:
The alert threshold configuration options are the same as the Notification option.
- 4. None: Select this option when both alert and graph are not needed for the metric.
- Click Save.

Create monitor
Custom Remote Script Executor Monitor is a collection of Remote Script Executor metrics. You can create a template using the Remote Script Executor monitor.
When adding a metric to the monitor, ensure that the exact metric name used in the script is applied.
Prerequisite: Add the required custom parameters.
- From All Clients, select a client.
- Go to Setup > Monitoring > Monitors.
- From Monitors, click + Add.
- From CREATE A MONITOR, enter the details for the following parameters and click Save.
- Monitor Scope: Select Partner Monitor or Client Specific Monitor.
- Type: Select Application.
- Application Type: Select Remote Script Executor.
- Name: Enter a unique name for the monitor.
- Description: Enter the reason for creating the monitor.
- Script: Custom script in the Script text box. You can refer to Script and JSON output formats-example to view the example script.
- Metrics: To add Metrics:
- From Metrics, click Add Metrics.
- Search the metric and click Add Metrics. The Metrics section displays the selected metric.
- After adding the metrics, navigate to Configuration Parameters.
- Configuration Parameters: To add configuration Parameters:
- Enter Default Value for all the configuration parameters.
- Select the Configurable checkbox.
- Click +Add.
- Enter Configuration Parameters depending on the selected script type.
You can view the default value for the respective Name selected.
If you select the Custom value in Configuration Parameters, add the configuration parameter:custom.script.execution.path
. The custom.script.execution.path option allows users to execute various types of scripts beyond the default options (Bash/PowerShell/Python). For instance, if a user is using Perl for monitoring, they can select the Custom in theremote.server.scripttype
configuration parameter. - Click Add in Configuration Parameters.
- Select
custom.script.execution.path
, and provide the path to the Perl executable.
Note: By default, VmWare appliance do not have bash prompt, in such cases you can provide custom path for script execution by using this custom option.
Example: If you are using Python3 for monitoring, you can follow the same process and provide the path to the Python3 executable, such as /usr/bin/python3
. Using the executable path ensures that the correct interpreter is used to run the script.
MONITORS screen displays the new monitor.

Macros in Remote Script Executor
Macros are implemented to address the passing of dynamic arguments to scripts. Use the following macros to make available native attributes and custom attribute defined on the resource, in the script:
Static macros
Use static macros to override the resource values. See the Static macro reference for a list of static macros.
Dynamic macros
Macro | Description |
---|---|
${powershell.script.profile.flag} | If the Remote Server Script Type is PowerShell then use this macro: powershell.script.profile.flag For an example, when using PowerShell scripts on platforms with Custom PowerShell environments, choose No for the flag type to run scripts without loading user profiles. Choose Yes to execute scripts while loading user profiles. |
${customattributes.serviceName} | Get custom attributes of the device - If you want to use an argument in any script, apply the custom attributes on the device. For an example, you have a custom attribute on the device with `Key: serviceName` and `Value: oracledb`. During runtime, the Value: oracledb replaces the macro: ${customattributes.serviceName} in the script. |
${credentials.CredentialName.credentialField} | Get the credentials added to the device - You can use (macros) credentials in the script to avoid storing the original username and password in plain text. When you run the script, the macros replace the original credentials. For an example, if you define a credential set with a name JMXCred and added it to a device. You can use the macro ${credentials.JMXCred.username} in your script and macro will replace the original credentials in your script at runtime. |
${credential.type.all} | Use this macro to get all credential sets (assigned on the device) into the script. |
${credential.type.name} | Use this MACRO( ${credential.type.name}) to get specific credentials in the script. For an example, If the device has SSH, WMI and Database credentials and if user want to get only database credentails inside the script then need to use ${credential.type.database} inside the script. Similarly user can get any type of credentails into the script by replacing .name with the credentails type. Example: ${credential.type.SSH}, ${credential.type.SNMP}, ${credential.type.VMWARE} etc. |
${custom.script.arguments} | Use this macro to provide single or delimiter separated input arguments for RSE Template. You can pass up to 65,535 characters as input parameters(custom script arguments) for a template. |
${custom.script.multi.arguments} | Use this macro to create multiple custom script arguments in RSE. |
Credential Types
Below are the supported credential types:
Credential Types | Marcos | Sample Output |
---|---|---|
VMWARE | ${credential.type.VMWARE} | |
SSH | ${credential.type.SSH} |
The following are the remaining credential types:
SNMP, XEN, WINDOWS, JMX, HTTP, Database, CIM, NETAPP, NETAPPCLUSTER, HYPERFLEX, PURESTORAGE, FTP, CISCOUCS, EMCCLARIION, EMCVNX, EMCVNXE, EMCVMAX, IBM, HPEVA, REMOTE_CLI, TELNET, XTREMIO, VIPTELA, EMCVPLEX, EMCRPA, NUTANIX, HITACHIVSP, AZURESTACK, APPLICATION, and CITRIX_CVDA.
Script execution path for configuration parameters in Linux and Windows
Gateway | Target Platform | ||
---|---|---|---|
Script Type | Linux/SSH | Windows | |
Linux Gateway | Bash | bash -s | Not Applicable |
Powershell | Not Applicable | Not Applicable | |
Python | python - | Not Applicable | |
Perl | Perl - - | Not Applicable | |
Windows Gateway | Bash | bash -s | |
Powershell | Not Applicable | powershell.exe | |
Python | python - | python.exe | |
Perl | Perl - - | perl.exe |
If your runtime is not set as an environment variable, mention the absolute path of your runtime. For example, if Python is not set as an environment variable, enter the absolute path of Python such as /usr/lib/python
.
Create template
A template is an instance of a monitor and is applied to devices.
From All Clients, select a client.
Go to Setup > Monitoring >Templates.
Click + Add.
From MONITOR TEMPLATE, enter the details for the following parameters and click Save:
Select Template Scope: Template type.
Collector Type: Select Gateway.
Monitor Type: Select Monitors for G2 Templates.
Applicable for: Select Device.
Template Name: Name of the template.
Description: Summary of the template.
Generation: Generation that the template belongs to.
Tags: User-defined tags for better filtering.
Prerequisites: Essential things that you must consider while monitoring using the template. For example, check the SQL services while monitoring the SQL Parameters using the Windows templates.
Status: Active or End-of-life templates.
Notes: Information that you want to add to the template.
Template Family Name: Category that applies to the application. For example, Windows Server, Storage Server, and Network Server.
Deployment Type: One of the following methods to apply the template to the resources:
- Custom
- Optional
- Standard
After providing the template details, MONITOR TEMPLATE displays the Monitors section.
The user interface for the Monitors section varies with the option selected in the Collector Type.- Monitor: To add details in Monitors:
From the Monitors section, click Add.
Enter details for the following parameters:
- Frequency: Refer to the frequency to execute the template.
- Monitor Definition: Monitor type.
- When to Alert: Select Breach of a Threshold.
Select Availability and Alert checkbox to initiate monitoring. The TEMPLATES section displays the configured details.
Assign template to a device
You need to create credentials to assign a template to a device.
Create credentials
If the configuration parameter remote.server.operating system
is:
- Windows, you must consider Windows type credentials.
- LINUX or UNIX, you must consider SSH type credentials.
Select a client from the All Clients list.
Go to Infrastructure > Resources.
From the list of devices, select a device. Navigates to the device information page.
From the center pane, click Credentials.
Click +Add.
From Create new credential, provide details for the following parameters and click Save:
- Name: Name of the credential.
- Description: Description of the new credential.
- Type: Application type. Select Windows.
- Username: Username for the credential set.
- Password: Password that you set for the credential set.
- Confirm Password: Enter the same password.
- Port: Port used to connect to the application.
- Connection Time-out (ms): Time taken for the resource to connect to the application. The Credentials screen displays the new credentials.
Assign template
- From the left pane, click Infrastructure. The Infrastructure screen of the selected client is displayed.
- From the Resources tab, select a required resource from the list of resources. Or, use the search option to find the resource.
- Click the resource name to view details.
- From the left pane, click Monitors. Templates tab is displayed.
- From Templates tab, click +Assign Templates.
- From Apply Templates, select the templates. The selected Templates section displays the chosen templates.
- Click Assign. The template gets assigned to the selected device.
After assigning the template to a resource for monitoring, click Get Latest Metric Values to view the latest metric information.
Use the following global templates to monitor your Linux resources:
- Gateway - Linux OS Performance Remote Monitoring
- Gateway - Linux OS Performance Remote Monitoring - V2
- Gateway - Linux Network Remote Monitoring
View graphs
The gateway monitors the remote system using the assigned templates and displays the results in a graphical format.
- From the left pane, click Infrastructure. The Infrastructure screen of the selected client is displayed.
- From the Resources tab, select a required resource from the list of resources. Or, use the search option to find the resource.
- Click the resource name to view details.
- From the left pane, click Metrics. The Metrics page displays graphs generated by all monitoring templates assigned to a device.
- Search with the template name to filter the graphs.

Troubleshooting
- The device is accessible to the gateway.
- The appropriate port is available from the remote server.
Remote script executor example
Standard JSON Output formats: Remote script executor script
Format 1:
Description:
This format is used when the metric does not have any dynamic components or instances. In such cases, construct the JSON by using the metric name as the key and mapping that key to the appropriate value.
Format for the JSON output when there are no exceptions:
Or
Format for the JSON output when exceptions occur:
Example:
Format 2:
Description: This format is used, when one metric returns a string and another metric returns a number. In such cases, a JSON output is prepared by mapping those strings or metrics to their appropriate values.
Example:
Note: We recommend using numerical representation for String outputs by utilising Enumerated Map option of RSE.
Format 3:
Description: This format may be used, when the metric contains multiple components. In the below example, the data is fetched for multiple components of disks.
Format for the JSON output when there are no exceptions:
Or
Format for the JSON output when exceptions occur:
Example:
Explanation:
In this example, System_Windows_PhysicalDisk_WriteBytes_PerSec is a metric name that has two components, physicaldisk_1 and physicaldisk_2, with their values mapped inside the components key.
Similarly, System_Windows_PhysicalDisk_AvgDisk_SecPerWrite is another metric name organized in the same way.
Format 4:
Description: This format is used when user needs metric-level alertTokens for all metrics of the script. Alert tokens are used to specify more information about the metrics in alert subject or in alert description or in both.
Format for the JSON output when there are no exceptions:
Or
Format for the JSON output when exceptions occur:
Example:
Explanation:
In this example, the system_linux_memory_utilization metric includes a component real_memory_utilization with a value of 50. The alert tokens offer a summary at the metric level, indicating “Total memory: 16 GB, Used memory: 8 GB”. This information is included in the alert description, the alert subject, or both for the system_linux_memory_utilization metric.
Format 5:
Description: This format is used, when user needs alert tokens at metric-level, for only few of the metrics of the script.
Format:
Example:
Explanation:
The system_linux_services_status metric includes two alert tokens at the metric-level.
- Token 1, denoted as services.active.counts, provides the count of active services.
- Token 2, identified as services.inactive.counts, offers the count of inactive services.
These tokens provide valuable insights into the status of the services monitored under this metric.
On the other hand, the metric system_linux_services_count does not have any associated alert tokens. So, alerts for this metric will not include any additional descriptive information.
Format 6:
Description: This format is used, when user needs Component Level Alert Tokens. Alert token value for each metric component are specified separately, as mentioned below:
Format for the JSON output when there are no exceptions:
Or
Format for the JSON output when exceptions occur:
Example:
Explanation:
In this example, the JSON structure demonstrates the use of scriptExceptions along with component-level and normal metric-level alert token.
The system_linux_interfaces_count metric includes a component that counts the number of interfaces and a metric-level alert token listing the names of these interfaces.
For system_linux_network_interface_trafficIn, the components show the inbound traffic for specific interfaces, while the component-level alert token provides the MAC addresses of these interfaces, offering more details on the interface.
system_linux_network_interface_trafficOut presents outbound traffic data for the interfaces but does not include additional alert tokens.
Multiple Custom Script Arguments in Macro
For any RSE script, we can pass upto 5 different types of custom arguments and for each argument we can pass a maximum of 20 values.
Each Custom argument contains 3 fields:
- Name
- Description
- Default Value
Here, Name and Description are the mandatory fields for a custom script argument.
The Default value is an optional field, which we can specify only if we want to give any default value to the custom script argument.
Marco Name: ${custom.script.multi.arguments}
Prerequisites
- Multiple custom script arguments are supported with Agent and Gateway version 14.0 and above.
- Macro
custom.script.multi.arguments
will support Agent and Gateway collector types.
Windows Process Monitoring - Use Case
This is a real time use case for multiple custom scrpit aurgument usages.
Step 1- Create Metric: Refer to the Document to know how to create metric.

system.windows.process.handlecount
and system.windows.process.threadcount
Step 2- Create a Monitor: Refer to the Document to know how to create a monitor.
While creating a monitor, make the following changes:
- Under the Script section, use the below sample script.
- Under the Metric section, click +Add and use the metrics created in Step 1.
- Under the Configuration Parameters section, click + Add and select
custom.script.multi.arguments
as shown below.
Step 3- Pass multiple custom script arguments: In the Monitor Creation Page, we must pass the following multiple custom script arguments.
- Argument 1:
- Name: Process_Regex_Expression
- Description: Provide regex expression to match process name and arguments.(Ex: opsramp.*)
- Argument 2:
- Name: Process_Friendly_Name
- Description: Provide process friendly name to be used as metric component name.(Ex: Opsramp_Processes).

Finally, click Save to save the Monitor page.
Step 4- Create a Template: Refer the Document to know how to create a template.
Create the template with above created metrics and monitor.

Step 5- Assign a template: Refer the Document to know how to assign template.

Note
- When assigning the template to a device, the user can pass up to 20 values to the above custom script arguments.
- When the user wants to change the previously assigned values to the template, they can do so while re-assigning the template to the device.
Below is the final script output
Generate Alert Tokens in RSE
The Alert Tokens feature is applicable for RSE G2 based templates that utilize the Agent or Gateway collector types. This feature will be useful when you wish to include additional details about an alert in the alert Subject or Description.
To utilize the alertTokens feature for any RSE metric, the components key is essential. Below are examples that illustrate how to set up alert tokens for both a single metric and multiple metrics:
Example: Alert Tokens for a Single Metric
Example: Alert Tokens for Multiple Metrics
If you have multiple metrics that require alert tokens, the same structure applies for each metric. Here’s how you need to structure it:
(Here Mac Address will be shown in alert description of respective Network Interface.)
Windows Certificates Store Monitoring - Use Case
This is a real time use case to generate alert tokens in RSE.
Step 1- Create a Metric: Refer to the Document to know how to create a metric.
While creating a metric, make the following changes:
- Name: In this case, we named the metric as windows_certStore_certificates_expiry_inDays_v2.
- Metric Processing: Choose Graph and Notification.
- Description: In the description section, add a string as cert.info:$cert.info to display more information on the alert.

Now, we have created a metric successfully.
Step 2- Create a Monitor: Refer to the Document to know how to create a monitor.
While creating a monitor, make the following changes:
- Under the Metric section, click +Add and use the metrics created in Step 1.
- Under Script section, use the below sample RSE script.
Now, we have created a monitor successfully.
Step 3- Create a Template: Refer the Document to know how to create a template.
Create the template using above created metric and monitor.

Step 5- Assign a template: Refer the Document to know how to assign a template.
Assign the template to a device and provide any custom script arguments, if applicable. You can refer to the screenshot below for reference.

Note
- When assigning the template to a device, the user can pass up to 20 values to the above custom script arguments.
- When the user wants to change the previously assigned values to the template, they can do so while re-assigning the template to the device.
Below is the final script output
View the Alert Tokens
To view the Alert Tokens, follow these steps:
- Navigate to the Infrastructure > Resources section in the user interface.
- Select the desired resource for which you want to view the details.
- Navigate to the Details tab.
- You should be able to see the alert token information as shown in the figure.

Exception Handling In RSE
To capture additional logs and generate alerts for script failure reasons in custom scripts, users can utilise the scriptExceptions
option of RSE. This option allows for detailed logging and alert generation, helping to identify and address issues efficiently at monitor level.
The scriptExceptions
option provides flexibility for users to specify whether the alert state should be critical or warning. Users can customise the alert subject and description messages, and also decide if logging or alerting (or both) are necessary.
Script Exceptions are supported only from Agent & Gateway version 14.0.0 and above. If this option is used with versions below Agent & Gateway version 14.0.0, the template will not retrieve any data from the device.
Script exceptions should adhere to the following format. Note that all keys are case-sensitive.
Format for scriptExceptions when there are exceptions in script:
Possible values of each field:
- subject: The user can provide any meaningful alert subject here.
- description: This field should contain detailed information about the exception. It is recommended to include the metric name and the reason for the data collection failure.
- raiseAlert: Set this to true if an alert for the exception is needed; otherwise, set it to false. Alert will be generated on metric rse_metric_collection_failures, if it is set true.
- logRequired: Set this to true if a log entry for the exception is needed; otherwise, set it to false.
- alertState: Set this to critical for a critical alert, or warning if a warning alert is sufficient.
Including the metric name in the description is recommended to identify which metric the exception belongs to.
If there are multiple exceptions in the script, consolidate all of them into a single alert description, as shown above. The scriptExceptions payload should be returned only once per script execution and only if exceptions are encountered. If there are no exceptions, return only the metric data without including the scriptExceptions payload.
Few scenarios for Using Exception Handling:
- When the user doesn’t provide inputs as recommended.
- When the commands or queries used in script are not available or supported on the target device.
- When the user wants to add extra information to the logs.
- To handle any dynamic exceptions that may occur in the script.
Linux Network Interfaces Monitoring Use-Case:
This real-time use case demonstrates the use of scriptExceptions
and alertTokens
options in RSE.
Step 1:
First, create metrics needed for the RSE script, here we created four metrics named as below:
- system_linux_network_interface_errorsIn
- system_linux_network_interface_errorsOut
- system_linux_network_interface_discardsIn
Step 2:
- In the MONITOR page.
- Under Metrics section, add the above created metrics.
- Under script section, paste the below RSE Script.
Sample Script:
Step 3:
Create the template with above created metrics and monitor.
Step 4:
Assign the template to any device.
Below is the JSON Output for above Script when there are no exceptions:
Below is the JSON Output for above Script when exceptions occur:
In the provided JSON, the scriptExceptions block indicates that an exception occurred while collecting monitoring data, for the metric system_linux_network_interface_errorsIn, the failure reason was that the rx_errors attribute was not available for the interfaces ens160 and flannel.1. This block provides details on the exception, including the subject, alert state, and a description of the failure reasons.
For the system_linux_network_interface_errorsIn
metric, data for the cni0
interface was successfully collected since there was no exception for this specific interface. Since the other two metrics, system_linux_network_interface_errorsOut
, system_linux_network_interface_discardsIn
, did not encounter any exceptions, their data was successfully collected and printed without issues.
Below is the alert shown for device:

In Debug level logs we can see scriptExceptions as below:

Below is the screenshot of the heal alert after resolving the script exceptions:

Enumerated Mapping In RSE
This feature is particularly beneficial for the following scenarios:
Graph Plotting for String Metrics:
- When a metric returns a string value, it is not possible to plot a graph using it. In such cases, Enumerated Mapping allows for the conversion of these string values into integers, enabling graph plotting and visualization.
State Representation Metrics:
- For metrics that return integer values representing different states (such as online/offline), Enumerated Mapping helps map these integers to their corresponding states, making the data more readable and meaningful.
Using Enumerated Mapping, users can ensure that the metric data is more informative and easier to interpret. This feature provides clear insights into the metric states through both numerical and textual representations while fetching the latest metrics data, and in alerts and graphs.
To use the Enumerated Mapping option, users must select “Datapoint Value Conversion” as “Enumerated Map” from the dropdown menu when creating a metric.
There are two types of Enumerated Mapping supported.
Type 1: String to Integer Mapping
.
Type 2: Integer to String Mapping
.
Type 1: String to Integer Mapping
For state/status-related metrics, it is common to return string values. However, monitoring through graphs only supports integer values. In such cases, String to Integer Mapping is necessary.
When creating a metric, users are required to provide mappings for all possible string values of that metric.
These mappings should include the string values in the “State” column along with any corresponding unique integer representations in the “Description” column, as shown below:

These mapped values, i.e., the string value and its respective integer, can be shown in both Alerts and Graphs, or only in alerts or graphs, by selecting the appropriate “Alerts” and “Graph” checkboxes, as shown in above screenshot.
Additionally, these mappings will appear in the “Get Latest Metric Value” page against the metric value.
Type 2: Integer to String Mapping
When a metric returns direct integer values representing specific states or status, Integer to String Mapping can be used to display the exact metric state referred to by the integer.
Users need to provide mappings for all possible integer values of that metric in State column and their corresponding string representations in Description column, while creating the metric, as shown below:

These mapped values, i.e., the integer value and its respective string, can be shown in both Alerts and Graphs, or only in alerts or graphs, by selecting the appropriate “Alerts” and “Graph” checkboxes, as shown in above screenshot.
Additionally, these mappings will appear in the “Get Latest Metric Value” page against the metric value.
Note: Ensure to configure alert thresholds based on the State column values only, if alert is required.
Windows Services Monitoring Use-Case:
This real-time use-case demonstrates the use of Enumerated Map option in RSE.
Step 1:
First, create the necessary metrics for the RSE script. In this use-case, we will create a metric named System_Windows_Service_Status_Ext
.
Here, since the metric returns only string values representing the service’s state, we have defined an Enumerated Map. For each possible string value, we provided the corresponding unique integer representation while creating the metric as follows:

We configured a Critical alert for the metric, using State column value, as shown below:

Step 2:
- On the MONITOR page,
- Under Metrics section, add the above created metrics.
- Under script section, paste the below RSE Script. Sample Script:
Step 3:
Create the template with above created metrics and monitor.
Step 4:
Assign the template to any device.
Below is the JSON output for the script without any exceptions:
Below is the JSON output for the script with exceptions:
Below is the screenshot demonstrating how both the string value and its corresponding integer are displayed in Metric value column, when fetching the latest metric values.

Below are screenshots of how the Enumerated Mappings are displayed in graphs and alerts:
In Graph:

In the screenshot above, we can observe that as defined in the Enumerated Map, the value 0 corresponds to the “Stopped” state of a service, and the value 1 corresponds to the “Running” state.
In Alert:

In the screenshot above, we can observe that the metric value displayed as Stopped (0), and the threshold configured as Running for Critical alert. According to the configured thresholds, if the metric value does not equal Running, a critical alert will be triggered, as shown in the screenshot above.
Because we defined 0 for the Stopped state and selected both the alerts and graph checkboxes while defining the Enumerated Map, we can see both the string value and its corresponding integer in the alert as well as in the graph.