Skip to content

Commit

Permalink
Requested codeblock changes completed
Browse files Browse the repository at this point in the history
Requested codeblock changes completed
  • Loading branch information
alexdgilbert committed Dec 6, 2021
1 parent 14f54b3 commit d488af0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/Automatic Log Truncation/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion examples/Multiple Column Separators/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<strong>Numeric Extraction - Numeric Extraction</strong>
Expand Down
2 changes: 1 addition & 1 deletion examples/Numeric Extraction Using Timestamps/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<strong>Numeric Extraction - Timestamp Extraction</strong>
Expand Down
8 changes: 4 additions & 4 deletions examples/Powershell Script/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ For powershell scripts to run successfully, the execution policy needs to be set
<strong>Command Line Monitor - Powershell Command Embedded File</strong>

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.
```
<strong>Command Line Monitor - Powershell Command Host File</strong>

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.
```
4 changes: 2 additions & 2 deletions examples/Service Restart on Failure/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -17,7 +17,7 @@ Exit Code: 0
<strong>Command Line Monitor - Service Restart Command</strong>

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).

0 comments on commit d488af0

Please sign in to comment.