# What is the output format of Script Templates? To get the desired output for monitoring a device with scripts, it is important to define the **Script Message** and **Script Data** while configuring the script template in OpManager. - [Output Message](https://www.manageengine.com/network-monitoring/faq/output-format-of-script-templates.html#om) 1. [Output message Format](https://www.manageengine.com/network-monitoring/faq/output-format-of-script-templates.html#omf) 2. [Sample script messages](https://www.manageengine.com/network-monitoring/faq/output-format-of-script-templates.html#ss) - [Output data format](https://www.manageengine.com/network-monitoring/faq/output-format-of-script-templates.html#odf) 1. [Samples for expected script output](https://www.manageengine.com/network-monitoring/faq/output-format-of-script-templates.html#eso) 2. [Sample data format used in different scripts](https://www.manageengine.com/network-monitoring/faq/output-format-of-script-templates.html#dtl) - [Sample ready-to-use scripts](https://www.manageengine.com/network-monitoring/script-monitoring-templates.html) ## Output Message When a script is down or becomes active again, an alarm is raised to notify the user. An alarm message will be displayed in the notification. This alarm message is customizable and can be specified in the Script Body field while adding a script template. ### Output Message Format Message: `` **Example Script:** ``` Message: This is a custom message ``` ### Sample Script Messages **VBScript:** ``` WScript.Echo "Message: This is a custom message" ``` **Powershell Script:** ``` Write-Host "Message: This is a custom message" ``` **Shell Script:** ``` echo "Message: This is a custom message" ``` The alarm for the above scripts will display the message along with the notification as given in the image below. ![Output Format of Script templates](https://www.manageengine.com/network-monitoring/help/images/faqsc1.png) When you do not specify the message description in the Script Body field, OpManager, by default, will display the script name along with its status as the alarm message (** is up** or ** is down**). Have a look at the example below where we have not specified a message in the Script Body field. So OpManager displays the name of the script in the alarm notification. ![Output Format of Script templates](https://www.manageengine.com/network-monitoring/help/images/faqsc2.png) ## Output Data Format Specifying the format of the data used is important because the output data of the scripts are used to generate graphs and are defined as input values for threshold limits for monitors. The data should be specified in the given format below. ``` Data: Instance1 value1 Instance2 value2 .. InstanceN ValueN ``` ### Samples for expected Script output OpManager supports three types of data types: **Integer, Decimal and Strings**. Based on the Data type selected, the output value will be compiled. Take a look at some of the sample script outputs based on the different data types. ``` Integer type Data: Instance1 10 Instance2 20 .. InstanceN 50 Decimal Type Data: Instance1 11.21 Instance2 15.123 .. InstanceN 50.21 String Type Data: Instance1 NoIssues Instance2 Up ``` ### Sample data format used in different scripts Below we have given the output format for the script languages that are most commonly used. You can infer from these examples and implement a customized script or you can directly use these example scripts to obtain the desired results. ### VB Script ``` .. WScript.Echo "Message: This is a custom message" .. .. WScript.Echo "Data:" WScript.Echo "MemoryUsage " & memoryUsageValue WScript.Echo "DiskUsage " & diskUsageValue ``` ### Powershell Script ``` .. Write-Host "Message:This is a custom message" .. .. Write-Host "Data:" Write-Host "MemoryUsage " $memoryUsageValue Write-Host "DiskUsage " $diskUsageValue ``` ### Shell Script ``` .. echo "Message: This is a custom message" .. .. echo "Data:" echo "MemoryUsage $memoryUsage" echo "DiskUsage $diskUsageValue" ```