Page 1 of 1

User Action

Posted: Fri Aug 14, 2020 11:52 am
by paul.jobb
Hi;

I am using this document:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Is it possible to access user defined macros contained in the resource.cfg file?

I am using check_ipmi_sensor to monitor some solaris servers via the iLom

The only way for clear the alert for log errors is to clear the ilom log, so I would like to add a action in nagios for that (i.e. /usr/sbin/ipmi-sel -h $IP -u ADMIN -p $PW -l ADMIN --clear). Scheduled power maintenance will trigger the alert and then people just disable notifications in nagios rather than clearing the ilom log, so if I could make it easier...

I would rather get the ID and password out of the resource.cfg file than store it in a shell script.

Thanks

Re: User Action

Posted: Fri Aug 14, 2020 4:51 pm
by paul.jobb
you can close this, I found a work around

#!/bin/sh

RESFILE="/home/nagios/.nagiosresource/resource.cfg"

USER=$(grep -m 1 '\$USER22\$' $RESFILE | cut -d'=' -f2)
PW=$(grep -m 1 '\$USER23\$' $RESFILE | cut -d'=' -f2)

Re: User Action

Posted: Mon Aug 17, 2020 9:48 am
by jbrunkow
Great! I'm glad you figured it out and appreciate you letting us know.

We will lock this thread for future editing.