Need help changing a custom mon script from a different tool to solarwinds.
NAMonitor.sh:
result:$alarm:NA commands issued in the past 5 minutes $count
$alarm is used to decide which the severity
be one of the following integers:
0 (clear), 1 (warning), or 2 (critical)
Sample output:
result:2:NNA commands issued in the past 5 minutes 25
(located at /app/scripts/log/NAMonitor.log
This file will be
updated every 5 minutes)
Choices:
1. i can execute the NAMonitor.sh
2. I can read a log /app/scripts/log/NAMonitor.log
I cannot have the contents of the NAMonitor.sh
The entry is one line and : delimited
The Goal:
read the $alarm variable which will give a number 0|1|2 I assume this would relate to $stat
The rest of the line NNA commands issued in the past 5 minutes 25 would be the $message.
Note I read: Log Parser (Perl) I also looked at carious examples. I am missing something probably really obvious. I have a lot of these so I know if I get the first one the rest will fall in line.