Monitoring Disk and CPU Utilization
Robert Suh
roberts at bluenile.com
Sat Feb 14 00:04:07 CET 2004
Nicholas, for Unix like OSes (Linux), take a look at ucd-snmp (UCDavis)
or net-snmp (what ucd-snmp has morphed
into) depening on your OS version. Most distributions come with them,
but they may not be installed by default.
Win2k and 2k3 ship with a basic SNMP service, which you have to enable
(or 'Add' via the Control Panel.)
The basic check_snmp command needs the Hostaddress (-H), OID to monitor
(-o) and the SNMP community
string (-C, typically 'public').
So for example, we have the basic ucd-snmp package installed on a Linux
box. To monitor the load average,
the OID is ".1.3.6.1.4.1.2021.10.1.3.1"
You can test if you setup has worked by running
/usr/local/nagios/libexec/check_snmp -H TARGET -o
.1.3.6.1.4.1.2021.10.1.3.1 -C public
Basically, the problem you run into is to map what you want with the OID
number. To somewhat
get around this, if you have the standard MIBS. You can run 'snmpwalk',
which comes with ucd-snmp and
net-snmp. With net-snmp's snmpwalk, you can run "snmpwalk -v 1 -c
public HOSTNAME .iso" to
see all the information your device is exporting via SNMP.
To get you started, some common OIDs:
# Load averages.
OID ucd_load1min 1.3.6.1.4.1.2021.10.1.3.1
OID ucd_load5min 1.3.6.1.4.1.2021.10.1.3.2
OID ucd_load15min 1.3.6.1.4.1.2021.10.1.3.3
# Memory stats
OID ucd_memswapAvail 1.3.6.1.4.1.2021.4.4.0
OID ucd_memrealAvail 1.3.6.1.4.1.2021.4.6.0
OID ucd_memtotalAvail 1.3.6.1.4.1.2021.4.11.0
# Disk stats (Don't forget the instance number...)
OID ucd_diskfree 1.3.6.1.4.1.2021.9.1.7
OID ucd_diskused 1.3.6.1.4.1.2021.9.1.8
OID ucd_diskpused 1.3.6.1.4.1.2021.9.1.9
# CPU Stats
OID ucd_cpuUser 1.3.6.1.4.1.2021.11.9.0
OID ucd_cpuSystem 1.3.6.1.4.1.2021.11.10.0
OID ucd_cpuIdle 1.3.6.1.4.1.2021.11.11.0
OID ucd_rawCpuUser 1.3.6.1.4.1.2021.11.50.0
OID ucd_rawCpuNice 1.3.6.1.4.1.2021.11.51.0
OID ucd_rawCpuSystem 1.3.6.1.4.1.2021.11.52.0
OID ucd_rawCpuIdle 1.3.6.1.4.1.2021.11.53.0
These should be fairly common and static.
Keep in mind, that with the NAG, you will probably have to create your
own snmp checkcommand
using check_snmp and set the -w and -c stuff yourself.
Later on, you can get more advance and have the SNMP daemon run scripts
and return the data via
an OID.
Rob
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Subhendu
Ghosh
Sent: Friday, February 13, 2004 1:35 PM
To: Platt, Nicholas
Cc: 'nagios-users at lists.sourceforge.net'
Subject: Re: [Nagios-users] Monitoring Disk and CPU Utilization
On Fri, 13 Feb 2004, Platt, Nicholas wrote:
> Hello,
>
> I've just installed Nagios and I am very please with the product. I'm
> not a Linux guy, but the instructions have been so good that it has
> been an easy experience. Good work! I've been able to populate the
NMS with 500+ host
> and monitor over 1000+ services. I plan to grow it. I've been
asked to
> monitor host CPU and host disk usage. I've read that there is two
ways
> monitor this function. One is installing a client on each server and
the
> other is SNMP. Since our shop has several types of boxes and OS, for
us it
> is better to poll the box via SNMP. I've not been able to find
> detailed documentation on how to have Nagios poll via SNMP for disk
> usage. Now, when I say documentation, I have found a check_snmp
plug-in, but did not have
> enough documentation for a beginner to be able to utilize it. Can
you
> point me to any check_snmp documentation that will clearly describe
how I
> can poll servers via SNMP? If believe the client version is better,
will
> it support Unix, Linux, Novell, and NT? You guys have always been
> very supportive. Thank you.
Unix agent:
NRPE + any plugin
ssh + any plugin
Windows agents:
NSclient - fixed set of probes
NREP_NT + external plugins
Novell:
MRTGEXT.NLM - fixed set of probes
--
-sg
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list