Parsing output of Nagios checks
Posted: Mon May 15, 2023 10:14 am
Hello,
I'd appreciate some hints regarding parsing of the output below.
I check the health of my Ruckus/Brocade ICX switches which produces the following output:
The CRITICAL status is due to 'Power supply 3 present, status failed: FAILURE;', which is expected. How can I omit 'Power supply 3 present, status failed: FAILURE;' part and generate OK status, but only if it's failing for Power supply 3? If it's a failure for other PS, generate CRITICAL.
Thank you.
I'd appreciate some hints regarding parsing of the output below.
I check the health of my Ruckus/Brocade ICX switches which produces the following output:
Code: Select all
Power supply 1 (AC - PoE) present, status ok: OK; Power supply 2 (DC - Regular) present, status ok: OK; Power supply 3 present, status failed: FAILURE;
Fan 1 (Rear Side Fan 1, (1st From Right) (1): OK; Fan 2 (Rear Side Fan 2, (2nd From Right) (2): OK;
Fan 3 (Rear Side Fan 3, (3rd From Right) (3): OK;
Chassis temperature of 67.5OK;
Management module: CPU temperature of 64.5OK;
Management module: MAC 1 temperature of 64OK;
Management module: CPU temperature of 67.5OK;
Management module: MAC 1 temperature of 67.5OK;
CRITICAL
Thank you.