From d488af0c3d2d6cfdd1191bca1936c27a93299a9e Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 5 Dec 2021 21:52:41 -0500 Subject: [PATCH] Requested codeblock changes completed Requested codeblock changes completed --- .../readme.md | 2 +- examples/Automatic Log Truncation/readme.md | 2 +- examples/Multiple Column Separators/readme.md | 2 +- .../readme.md | 2 +- examples/Numeric Extraction Using Timestamps/readme.md | 2 +- examples/Powershell Script/readme.md | 8 ++++---- examples/Service Restart on Failure/readme.md | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) 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 f384f4b..8b5a28e 100644 --- a/examples/All Performance Counter Instances Using Command Line/readme.md +++ b/examples/All Performance Counter Instances Using Command Line/readme.md @@ -14,7 +14,7 @@ In this monitor, we are simply launching the command that will gather all the in 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 diff --git a/examples/Automatic Log Truncation/readme.md b/examples/Automatic Log Truncation/readme.md index c321bd7..78ec435 100644 --- a/examples/Automatic Log Truncation/readme.md +++ b/examples/Automatic Log Truncation/readme.md @@ -10,7 +10,7 @@ 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 ``` diff --git a/examples/Multiple Column Separators/readme.md b/examples/Multiple Column Separators/readme.md index 1099d04..c54c4c8 100644 --- a/examples/Multiple Column Separators/readme.md +++ b/examples/Multiple Column Separators/readme.md @@ -9,7 +9,7 @@ Command run on host: 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 diff --git a/examples/Numeric Extraction Using Scientific Notations/readme.md b/examples/Numeric Extraction Using Scientific Notations/readme.md index 0af56e8..8c679c4 100644 --- a/examples/Numeric Extraction Using Scientific Notations/readme.md +++ b/examples/Numeric Extraction Using Scientific Notations/readme.md @@ -11,7 +11,7 @@ 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 diff --git a/examples/Numeric Extraction Using Timestamps/readme.md b/examples/Numeric Extraction Using Timestamps/readme.md index e43cfe6..7c98de9 100644 --- a/examples/Numeric Extraction Using Timestamps/readme.md +++ b/examples/Numeric Extraction Using Timestamps/readme.md @@ -11,7 +11,7 @@ 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 diff --git a/examples/Powershell Script/readme.md b/examples/Powershell Script/readme.md index 1e4a130..7e2b5ee 100644 --- a/examples/Powershell Script/readme.md +++ b/examples/Powershell Script/readme.md @@ -7,26 +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 +```bat @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 +```bat @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 8abe632..9661dc5 100644 --- a/examples/Service Restart on Failure/readme.md +++ b/examples/Service Restart on Failure/readme.md @@ -7,7 +7,7 @@ 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) @@ -17,7 +17,7 @@ Exit Code: 0 Command Line Monitor - Service Restart Command Command run on host: -```bash +```bat 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).