User Action

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

User Action

Post 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
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: User Action

Post 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)
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: User Action

Post by jbrunkow »

Great! I'm glad you figured it out and appreciate you letting us know.

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!
Locked