beautypg.com

1 determining the status of the nagios service, 2 examining nagios log files, 3 running nagios plug-ins manually – HP Insight Control Software for Linux User Manual

Page 236: 4 using the nagios report generator analyze mode

background image

“Nagios gather_all_data script reports check_nrpe errors ” (page 240)

“Troubleshooting Nagios problems” (page 240)

23.14.1 Determining the status of the Nagios service

Use the following command to determine if Nagios is running properly:

# /etc/init.d/nagios status
Nagios ok: located 1 process, status log updated 22 seconds ago
Gathering status for nrpe ... icelx<3-8>NRPE v2.0 - icelx<3-8>
Nagios nsca:
icelx7: 0 data packet(s) sent to host successfully.
icelx5: 0 data packet(s) sent to host successfully.
icelx6: 0 data packet(s) sent to host successfully.

23.14.2 Examining Nagios log files

Examine the following log files to obtain information on Nagios operation:

For errors: the /opt/hptc/nagios/var/nagios.log file

For system status: the /opt/hptc/nagios/var/status.log file

For Nagios errors: the /var/log/messages file

23.14.3 Running Nagios plug-ins manually

The Nagios plug-ins are located in the /opt/hptc/nagios/libexec directory. You can run
them from the command line if needed.

To run the Nagios check_sel plug-in from the command line, follow these steps:

1.

Log in as the nagios user.

2.

Change to the following directory:

$ cd /opt/hptc/nagios/libexec

3.

Locate the Nagios plug-in you want to run, 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 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.

Run the Nagios plug-in:

$ ./check_sel -H icelx7
No new entries in event log
$

23.14.4 Using the Nagios report generator analyze mode

The Nagios Report Generator (nrg) command features an analyze mode that can help you
determine the cause of a problem. It also offers information on the solution.

Enter following command to run the nrg analyze mode:

236

Troubleshooting