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
User Action
Re: User Action
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)
#!/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
Great! I'm glad you figured it out and appreciate you letting us know.
We will lock this thread for future editing.
We will lock this thread for future editing.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!