HP XC System Software Administration Guide Version 3.2

21.2.3 Nagios Log Files
The following log files provide information on Nagios operation:
Examine the /opt/hptc/nagios/nagios.log file for errors.
Examine the /opt/hptc/nagios/status.log file for the system status.
Examine the /var/log/messages file for Nagios errors on nodes running Nagios
21.2.4 Running Nagios Plug-Ins Manually
The Nagios plug-ins are located in the /opt/hptc/nagios/libexec directory. You can invoke
them from the command line if needed.
The following example shows the procedure to run the Nagios check_sel plug-in from the
command line:
Example 21-1 Running a Nagios Plug-In from the Command Line
1. Log in as the nagios user.
2. Proceed to the /opt/hptc/nagios/libexec directory.
$ cd /opt/hptc/nagios/libexec
3. Use the ls command to locate the Nagios plug-in you want to execute, for example:
$ ls *_sel
4. Optionally, invoke the Nagios plug-in with the --help option:
$ ./check_sel --help
check_sel [--help] -H hostname [-t timeout]
--help
-H Host to check
--cache file Persistent cache to remember where we last read/processed
default /hptc_cluster/adm/logs/sel/cache/selcache-$nodename.db
--clear Clear the SEL log after reading
--clearifused n Clear the log only if it is past n% full
--ignoreunknownhosts
Ignore unknown hosts, default is to return critical
--last n[dhm] Only log entries from the last n days, hours, or minutes
--logfile file Log output to file,
default /hptc_cluster/adm/logs/sel/sel-{host}.log
--rules file File containing rule patterns, default /opt/hptc/nagios/etc/selRules
--cp cptype Console type string
5. Execute the Nagios plug-in:
$ ./check_sel -H n7
No new entries in event log
$
21.2.5 Using the nrg Command's Analyze Mode
The Nagios Report Generator (nrg) utility features an analyze mode that can help you determine
the cause of a problem and it offers information on the solution.
Enter following command to invoke the nrg utility's analyze mode:
# nrg --mode analyze
Nodelist Description
----------------------- -----------------------------------------------------
nh [Configuration Monitor - NOOUTPUT] A service has
failed to return an output status. Typically this
indicates a plug-in failure. Run the plug-in
directly to observe any error conditions. In some
cases, this exact message is returned from check_nrpe
when a nrpe directive is failing to execute a
command. If you can determine which nrpe command is
being requested by the associated plug-in (see
/opt/hptc/nagios/etc/nrpe_local.cfg for a list) you
can test it using the 'check_nrpe -H nodename -c
248 Troubleshooting