![]() |
![]() |
| ||||||||||||||||||||
Chapter 23Monitoring and Error Reporting (Tasks)When Solaris Volume Manager encounters a problem, such as being unable to write to a volume due to physical errors at the slice level, it changes the status of the volume so system administrators can stay informed. However, unless you regularly check the status in the Solaris Volume Manager graphical user interface through the Solaris Management Console, or by running the metastat command, you might not see these status changes in a timely fashion. This chapter provides information about various monitoring tools available for Solaris Volume Manager, including the Solaris Volume Manager SNMP agent, which is a subagent of the Solstice Enterprise Agents monitoring software. In addition to configuring the Solaris Volume Manager SNMP agent to report SNMP traps, you can create a shell script to actively monitor many Solaris Volume Manager functions. Such a shell script can run as a cron job and be valuable in identifying issues before they become problems. This is a list of the information in this chapter: Solaris Volume Manager Monitoring and Reporting (Task Map)The following task map identifies the procedures needed to manage Solaris Volume Manager error reporting.
Setting the mdmonitord Command for Periodic Error CheckingSolaris Volume Manager includes the /usr/sbin/mdmonitord daemon, which is a program that checks Solaris Volume Manager volumes for errors. By default, this program checks all volumes for errors only when an error is detected (for example, through a write error) on a volume. However, you can set this program to actively check for errors at an interval you specify.
|
if [ -x $MDMONITORD ]; then
$MDMONITORD -t 3600
error=$?
case $error in
0) ;;
*) echo "Could not start $MDMONITORD. Error $error."
;;
esac
fi
|
Stop and restart the mdmonitord command to activate your changes.
# /etc/rc2.d/S95svm.sync stop # /etc/rc2.d/S95svm.sync start |
For more information, see mdmonitord(1M).
The Solaris Volume Manager SNMP trap agent requires both the core packages SUNWlvmr and SUNWlvma and the Solstice Enterprise Agent packages. Those packages include the following:
SUNWmibii
SUNWsacom
SUNWsadmi
SUNWsasnm
SUNWsasnx
These packages are part of the Solaris operating environment and are normally installed by default unless the package selection was modified at install time or a minimal set of packages was installed. After you confirm that all five packages are available (by using the pkginfo pkgname command, as in pkginfo SUNWsasnx), you need to configure the Solaris Volume Manager SNMP agent, as described in the following section.
The Solaris Volume Manager SNMP agent is not enabled by default. Use the following procedure to enable SNMP traps.
How to Configure the Solaris Volume Manager SNMP AgentBecome superuser.
Move the /etc/snmp/conf/mdlogd.rsrc- configuration
file to /etc/snmp/conf/mdlogd.rsrc.# mv /etc/snmp/conf/mdlogd.rsrc- /etc/snmp/conf/mdlogd.rsrc
Edit the /etc/snmp/conf/mdlogd.acl file to specify
which hosts should receive SNMP traps. Look in the file for the following: trap = {
{
trap-community = SNMP-trap
hosts = corsair
{
enterprise = "Solaris Volume Manager"
trap-num = 1, 2, 3
}
Change the line that containshosts = corsair
to specify the host name that you want to receive Solaris Volume Manager SNMP traps.
For example, to send SNMP traps to lexicon, you would edit
the line to hosts = lexicon. If you want to include multiple
hosts, provide a comma-delimited list of host names, as in hosts
= lexicon, idiom.
Also edit the /etc/snmp/conf/snmpdx.acl file to specify which hosts should receive the SNMP traps.
Find the block that begins with trap = and add the same list of hosts that you added in the previous step. This section might be commented out with #'s. If so, you must remove the # at the beginning of the required lines in this section. Additional lines in the trap section are also commented out, but you can leave those lines alone or delete them for clarity. After uncommenting the required lines and updating the hosts line, this section could look like this:
###################
# trap parameters #
###################
trap = {
{
trap-community = SNMP-trap
hosts =lexicon
{
enterprise = "sun"
trap-num = 0, 1, 2-5, 6-16
}
# {
# enterprise = "3Com"
# trap-num = 4
# }
# {
# enterprise = "snmp"
# trap-num = 0, 2, 5
# }
# }
# {
# trap-community = jerry-trap
# hosts = jerry, nanak, hubble
# {
# enterprise = "sun"
# trap-num = 1, 3
# }
# {
# enterprise = "snmp"
# trap-num = 1-3
# }
}
} |
Note - Make sure that you have the same number of opening and closing brackets in the /etc/snmp/conf/snmpdx.acl file.
Add a new Solaris Volume Manager section to the /etc/snmp/conf/snmpdx.acl file, inside the section you that uncommented in the previous step.
trap-community = SNMP-trap
hosts = lexicon
{
enterprise = "sun"
trap-num = 0, 1, 2-5, 6-16
}
{
enterprise = "Solaris Volume Manager"
trap-num = 1, 2, 3
} |
Append the following line to the /etc/snmp/conf/enterprises.oid file:
"Solaris Volume Manager" "1.3.6.1.4.1.42.104" |
Stop and restart the Solstice Enterprise Agents server.
# /etc/init.d/init.snmpdx stop # /etc/init.d/init.snmpdx start |
Previous Contents Index Next ![]() |