Open file output with more then one line.
Posted: Thu May 10, 2018 6:40 am
Hi,
i have a file which contains more then one line entry. A Sample below:
As per attached is seems it's limited . Is there a way to change the amount of length for output?
The aim is to have a simple script which counts the number of critical alarms. if for example the count is greater then 0 then i'll display this file in the status information.
Rgds,
Matthew
i have a file which contains more then one line entry. A Sample below:
is this possible to make it all visible in the Nagios Status Information?cat sample.txt
Alarm Id : alarm85
Severity : Critical
Type : 6180.ProblemEvent
Topic : Tray.00.Drive.12
Event Code : 90.66.1025
Date : 2018-03-17 01:54:54
Device : am1da01[SUN.540654504.1137EH0009]
Description : Impending drive failure in Virtual Disk sms-edr-vd (Medium
Data Availability Risk), affected drive(s): Tray.00.Drive.12
State : Open
Acknowledged By : -
Auto Clear : Y
Aggregated Count : 0
Alarm Id : alarm89
Severity : Critical
Type : 6180.ProblemEvent
Topic : Tray.85.Drive.03
Event Code : 90.66.1025
Date : 2018-04-15 05:02:19
Device : am1da01[SUN.540654504.1137EH0009]
Description : Impending drive failure in Virtual Disk sms-vd (Medium Data
Availability Risk), affected drive(s): Tray.85.Drive.03
Tray.85.Drive.05 Tray.85.Drive.12
State : Open
Acknowledged By : -
Auto Clear : Y
Aggregated Count : 0
As per attached is seems it's limited . Is there a way to change the amount of length for output?
The aim is to have a simple script which counts the number of critical alarms. if for example the count is greater then 0 then i'll display this file in the status information.
Rgds,
Matthew