diff --git a/examples/All Performance Counter Instances Using Command Line/readme.md b/examples/All Performance Counter Instances Using Command Line/readme.md
index 85c095b..f384f4b 100644
--- a/examples/All Performance Counter Instances Using Command Line/readme.md
+++ b/examples/All Performance Counter Instances Using Command Line/readme.md
@@ -5,24 +5,27 @@ This template shows how to monitor all Performance Counter Instances concurrentl
Command Line Monitor - Command Gathering All Desired Performance Counter Instances
Command run on host:
+```bash
wmic path Win32_PerfFormattedData_PerfOS_Processor get Name,PercentUserTime /value /format:CSV
+```
In this monitor, we are simply launching the command that will gather all the instances using the wmic command for windows. We added /value and /format:CSV for formatting reasons. Each value will be listed on a separate line and it will be formatted as a CSV, separated by commas. This will come in handy in the next step. Note that this will require valid System Credentials.
The first column will be your hostname, the second will be the instance name and the third one will be the actual value we want monitored: % User Time.
Sample output:
-
+```bash
Node,Name,PercentUserTime
ExampleHostname,0,0
ExampleHostname,1,12
ExampleHostname,2,6
ExampleHostname,3,6
ExampleHostname,_Total,11
+```
Dynamic Instances - Performance Counter Instances
-In this monitor, we use dynamic instances to create one MSX instance per Performance Counter instance. This way, we will be able to separate all of the instances, so that each can be monitored independently. By specifying the CSV format earlier, we can now set our Column Separators as ",". Since our processor name will be different for each instance, it makes it the ideal column to use for the Dynamic Instance Internal ID and Dynamic Instance Display Name. We also used the option "Keep Lines Matching" and set it to [0-9], meaning only lines with numeric values will be kept, essentially ignoring empty lines as well as the header.
+In this monitor, we use dynamic instances to create one Monitoring Studio X instance per Performance Counter instance. This way, we will be able to separate all of the instances, so that each can be monitored independently. By specifying the CSV format earlier, we can now set our Column Separators as ",". Since our processor name will be different for each instance, it makes it the ideal column to use for the Dynamic Instance Internal ID and Dynamic Instance Display Name. We also used the option "Keep Lines Matching" and set it to [0-9], meaning only lines with numeric values will be kept, essentially ignoring empty lines as well as the header.
Numeric Extraction - Percent User Time
diff --git a/examples/Automatic Log Truncation/readme.md b/examples/Automatic Log Truncation/readme.md
index 79b4003..c321bd7 100644
--- a/examples/Automatic Log Truncation/readme.md
+++ b/examples/Automatic Log Truncation/readme.md
@@ -10,9 +10,10 @@ df -h /EMC/backend/log_shared
In this monitor, we are simply launching the command that will gather the size of the partition where the log is stored. This command will likely be different based on the platform against which it is used or even based on system configuration.
Sample output:
+```bash
Filesystem Size Used Avail Use% Mounted on
/EMC/backend/log_shared 251G 2.2G 236G 1% /EMC
-
+```
Numeric Extraction - Log Size Numeric Extraction
This monitor is where we will extract the partition value and set whichever alerts we may want. Since we know the value is followed by a "%", we opted to use "Before this String: %" to locate the relevant value. In the alert options, we set an information alert threshold at partition usage of 50% and an alert action, which calls a separate command line monitor which we will review below.
@@ -22,6 +23,8 @@ We then also added an alarm alert at a threshold of 60% usage, so that we receiv
Command Line Monitor - Log Truncate
Command run on host:
+```bash
psql -U c4 c4LoggingDatabase -c 'truncate "CST_LogRecord" cascade'
+```
In this monitor, we are simply launching the command that will truncate our problematic log file. This command will almost certainly be different based on the platform against which it is used or even based on system configuration. Important note here is that we set this command to only run manually (or in our case, when called as an alert action). This is to avoid the host to attempt to truncate the logs every two minutes (default collection interval).
diff --git a/examples/JSON Output Extraction/readme.md b/examples/JSON Output Extraction/readme.md
index 0b10006..b8a73fc 100644
--- a/examples/JSON Output Extraction/readme.md
+++ b/examples/JSON Output Extraction/readme.md
@@ -5,11 +5,13 @@ This template shows how to monitor the output of a JSON file, then capturing spe
Command Line Monitor - Sample JSON
Command run on host:
+```bash
cat %{FILE:sample.json}
-
+```
This monitor is the method with which we retrieve the JSON file. In our case, we simply embedded a JSON file to the template (at the template level). In your setup, you will be using a different monitor to do so. This template was made to demonstrate what is done after we've collected the JSON file, so we will not be going over all the different methods of obtaining said JSON file.
Sample Output:
+```json
{
"accounts": [
{
@@ -30,6 +32,7 @@ Sample Output:
},
]
}
+```
Text Pre-Processing - JSON Pre-Processing
@@ -37,7 +40,7 @@ This monitor will be used to convert the JSON in a different format, in this cas
Dynamic Instances - User Account Instances
-In this monitor, we use dynamic instances to create one MSX instance per CSV line. This way, we will be able to separate all of the instances, so that each can be monitored independently. By specifying the separators earlier, we can now set our Column Separators as ";". Since several set of names could theoretically contain duplicates, we opted to use multiple columns to name each instance.
+In this monitor, we use dynamic instances to create one Monitoring Studio X instance per CSV line. This way, we will be able to separate all of the instances, so that each can be monitored independently. By specifying the separators earlier, we can now set our Column Separators as ";". Since several set of names could theoretically contain duplicates, we opted to use multiple columns to name each instance.
Value Map - Account Locked
diff --git a/examples/Multiple Column Separators/readme.md b/examples/Multiple Column Separators/readme.md
index c95781e..1099d04 100644
--- a/examples/Multiple Column Separators/readme.md
+++ b/examples/Multiple Column Separators/readme.md
@@ -5,15 +5,16 @@ This template shows how to set multiple column separators. This is a very basic
Command Line Monitor - Sample File
Command run on host:
+```bash
cat %{FILE:sampleoutput.txt}
-
+```
This monitor is the method with which we retrieve our output to be parsed. In our case, we simply embedded a test file to the template (at the template level). In your setup, you will be using a different monitor to do so. This template was made to demonstrate what is done after we've collected the output, so we will not be going over all the different methods of obtaining said output.
-
+ ```bash
Sample Output:
Name1:Test1
Name2>Test2
Name3=Test3
-
+```
Dynamic Instances - Dynamic Examples
-In this monitor, we use dynamic instances to create one MSX instance per line from out output. This way, we will be able to separate all of the instances, so that each can be monitored independently. We used 3 separate column separators (":","=" and ">" ). This can be useful when data is obtained and concatenated from several sources, or simply if we have several different separators in any given line. Any sub-monitors beyond this one will also require to have the same separators set to function properly.
+In this monitor, we use dynamic instances to create one Monitoring Studio X instance per line from out output. This way, we will be able to separate all of the instances, so that each can be monitored independently. We used 3 separate column separators (":","=" and ">" ). This can be useful when data is obtained and concatenated from several sources, or simply if we have several different separators in any given line. Any sub-monitors beyond this one will also require to have the same separators set to function properly.
diff --git a/examples/Numeric Extraction Using Scientific Notations/readme.md b/examples/Numeric Extraction Using Scientific Notations/readme.md
index d78311b..0af56e8 100644
--- a/examples/Numeric Extraction Using Scientific Notations/readme.md
+++ b/examples/Numeric Extraction Using Scientific Notations/readme.md
@@ -5,13 +5,15 @@ This template shows how to use the numeric extraction function to read a scienti
Command Line Monitor - Scientific Notation Output
Command run on host:
+```bash
echo Value:9.99e+30
-
+```
This monitor is the method with which we retrieve our output to be parsed. In our case, we simply used echo to receive an output to parse in the next monitor. In your setup, you will be using a different monitor to do so. This template was made to demonstrate what is done after we've collected the output, so we will not be going over all the different methods of obtaining said output.
Sample Output:
+```bash
Value:9.99e+30
-
+```
Numeric Extraction - Numeric Extraction
This monitor is where we will extract the scientific notation and set whichever alerts we may want. The important thing to note is that we enabled the option "Accept Scientific Notation". To be able to use alerting against this value, we divided it by 1e+28, leaving us with a value without scientific notations.
diff --git a/examples/Numeric Extraction Using Timestamps/readme.md b/examples/Numeric Extraction Using Timestamps/readme.md
index 0c41c7f..e43cfe6 100644
--- a/examples/Numeric Extraction Using Timestamps/readme.md
+++ b/examples/Numeric Extraction Using Timestamps/readme.md
@@ -5,13 +5,15 @@ This template shows how to use the numeric extraction function to read a scienti
Command Line Monitor - Timestamp Output
Command run on host:
+```bash
echo Value:9.99e+30
-
+```
This monitor is the method with which we retrieve our output to be parsed. In our case, we simply used echo to receive an output to parse in the next monitor. In your setup, you will be using a different monitor to do so. This template was made to demonstrate what is done after we've collected the output, so we will not be going over all the different methods of obtaining said output.
Sample Output:
+```bash
Timestamp: 01/01/2021 00:09:00
-
+```
Numeric Extraction - Timestamp Extraction
This monitor is where we will extract the timestamp and calculate the time difference with the current time. To do so, we changed the Value Type to Timestamp and set the Value Parameter as "Time Elapsed From Now". Addtionally, we inputted our timestamp format "%d/%m/%Y %H:%M:%S". As this will output a result in seconds, we opted to convert it into days by dividing it by 86400 (24x60x60).
diff --git a/examples/Powershell Script/readme.md b/examples/Powershell Script/readme.md
index e1d536c..1e4a130 100644
--- a/examples/Powershell Script/readme.md
+++ b/examples/Powershell Script/readme.md
@@ -7,21 +7,26 @@ For powershell scripts to run successfully, the execution policy needs to be set
Command Line Monitor - Powershell Command Embedded File
Command run on host:
+```bash
@powershell.exe -inputformat none %{FILE:samplepowershell.ps1} test example result
-
+```
In this monitor, we use the "@powershell.exe -inputformat none" to specify that we are launching the following script through Powershell. In this scenario, we embedded a Powershell script in our template, viewable at the template root level. We also added arguments (test example result) which will be added to the output of the script ($args[0] $args[1] $args[2]). This functions exactly like it typically would for powershell scripts.
Sample output:
+```bash
This is the output of my powershell script. My arguments specified
in the command line are test, example and result.
-
+```
Command Line Monitor - Powershell Command Host File
Command run on host:
+```bash
@powershell.exe -inputformat none %{FILE:samplepowershell.ps1} test example result
-
+```
In this monitor, we use the "@powershell.exe -inputformat none" to specify that we are launching the following script through Powershell. In this scenario, we are using a Powershell script located on the host system. We also added arguments (test example result) which will be added to the output of the script ($args[0] $args[1] $args[2]). This functions exactly like it typically would for powershell scripts.
Sample output:
+```bash
This is the output of my powershell script. My arguments specified
in the command line are test, example and result.
+```
diff --git a/examples/Service Restart on Failure/readme.md b/examples/Service Restart on Failure/readme.md
index ae3d7dc..8abe632 100644
--- a/examples/Service Restart on Failure/readme.md
+++ b/examples/Service Restart on Failure/readme.md
@@ -7,15 +7,17 @@ This template shows how to setup monitoring and an alert action in order to rest
In this monitor, we are simply selecting a service to monitor. We can set different status based on what should be the expected status of the service. We have then set an Alarm that will automatically launch our other monitor, attempting to restart the service.
Sample output:
+```bash
Service Name: SNMPTRAP
Description: SNMP Trap;
State: Running (OK)
Account: NT AUTHORITY\LocalService
Exit Code: 0
-
+```
Command Line Monitor - Service Restart Command
Command run on host:
+```bash
net start SNMPTRAP
-
+```
In this monitor, we are simply launching the command that will start our problematic service. Important note here is that we set this command to only run manually (or in our case, when called as an alert action). This is to avoid the host to attempt to truncate the logs every two minutes (default collection interval).
diff --git a/examples/XML Output Extraction/readme.md b/examples/XML Output Extraction/readme.md
index b88c0b8..83ee6d4 100644
--- a/examples/XML Output Extraction/readme.md
+++ b/examples/XML Output Extraction/readme.md
@@ -5,11 +5,13 @@ This template shows how to monitor the output of a XML file, then capturing spec
Command Line Monitor - Sample XML
Command run on host:
+```bash
cat %{FILE:sample.xml}
-
+```
This monitor is the method with which we retrieve the XML file. In our case, we simply embedded a XML file to the template (at the template level). In your setup, you will be using a different monitor to do so. This template was made to demonstrate what is done after we've collected the XML file, so we will not be going over all the different methods of obtaining said XML file.
Sample Output:
+```XML
@@ -29,14 +31,14 @@ Sample Output:
1
-
+```
Text Pre-Processing - XML Pre-Processing
This monitor will be used to convert the XML in a different format, in this case CSV. This will enable us to convert each line into Dynamic Instances further down the line. We set our XML Record Tag to accounts and our properties to userID;firstName;lastName;accountLocked;passwordExpiresIn;daysSinceLastLogin, to match the Record Tag of the XML file as well as specifying which properties we want included in our CSV. Finally, we set our result separator as ";", which will be the separator used in our CSV output.
Dynamic Instances - User Account Instances
-In this monitor, we use dynamic instances to create one MSX instance per CSV line. This way, we will be able to separate all of the instances, so that each can be monitored independently. By specifying the separators earlier, we can now set our Column Separators as ";". Since several set of names could theoretically contain duplicates, we opted to use multiple columns to name each instance.
+In this monitor, we use dynamic instances to create one Monitoring Studio X instance per CSV line. This way, we will be able to separate all of the instances, so that each can be monitored independently. By specifying the separators earlier, we can now set our Column Separators as ";". Since several set of names could theoretically contain duplicates, we opted to use multiple columns to name each instance.
Value Map - Account Locked