Antwort: Re: how can i use snmp
jgking at packetstorm.org
jgking at packetstorm.org
Wed Jan 15 17:32:17 CET 2003
Mrtg or even better rrdtool (NMIS project is great for cisco devices).
Cricket is pretty nice but i had to create a seperate set of binaries
seperate from my core apache/php system since Cricket wont work in safe
mode and needs reg_globals on among other things. Still Cricket is nice.
You should also check on net-snmp (http://www.net-snmp.org).
The check_snmp tool in the libexec directory of Nagios is very nice and
can be expanded by creating entries in the etc/checkcommands.cfg
I did this to handle integer and string return differences:
define command{
command_name check_snmp_int
command_line $USER1$/check_snmp -H $ARG1$ -o $ARG2$ -c $ARG3$
-C $ARG4$ -d $ARG5$
}
define command{
command_name check_snmp_str
command_line $USER1$/check_snmp -H $ARG1$ -o $ARG2$ -s $ARG3$
-C $ARG4$ -d $ARG5$
}
Then in your services.cfg file you can do something like this:
define service{
use generic-service ; Name of
service template to use
host_name portal
service_description ETH: Status
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command
check_snmp_int!localhost!.1.3.6.1.2.1.2.2.1.7.2,.1.3.6.1.2.1.2.2.1.8.2!1!***********!"="
}
What the above does is check the return values for my ethernet device to
see if the admin and oper status is 1. Handling multiple oids is real
handy when trying to minimize Status Details, the only issue i have with
it so far is that the boundary check for oids limits me (ie it cores) to
only so many entries.
It would be nice if the check_snmp program could add a flag for the oid
parent tree and then accept an array of integers comprised of the subtree
values. For example, the process table oid
.1.3.6.1.4.1.2021.2.1.101
and then and array of what leaf nodes (1,2,3,4,10,12,15...n)
ahck im going off on a tangent again, better stop before i go completely
off track ;)
-Greg
On Wed, 15 Jan 2003, Subhendu Ghosh wrote:
>
> Use MRTG for grpahing the traffic and use Nagios to monitor whether the
> door is open or closed.
>
>
> If you use Cricket instead of MRTG - Cricket could graph the traffic and
> the door state and send an snmp trap to Nagios if the door state is open..
>
> Generally - use Nagios for monitoring fault - use other apps for
> performance trends..
>
> -sg
>
> On Wed, 15 Jan 2003 kdellhofen at telebel.net wrote:
>
> >
> > Ok i need to count the traffic on each port on an switch or router so i can
> > use MRTG or?!
> > Then i need a tool perhaps Mrtg that can read out from a "CMC Rittal"
> > Server cabinet security wether is opened a door or closed or is there any
> > alarm..
> >
> >
> > e.g
> > system.sysDescr.0 = Rittal CMC Ser. 015271 HW V24 -- SW V2.00
> > system.sysObjectID.0 = OID: enterprises.2606.1
> > system.sysUpTime.0 = Timeticks: (1134605) 3:09:06.05
> > system.sysContact.0 = Klaus Dellhofen
> > system.sysName.0 = CMC Schrank 1
> > system.sysLocation.0 = Leverkusen EVL OVF
> > system.sysServices.0 = 72
> > system.sysORLastChange.0 = Wrong Type (should be Timeticks): 0
> > interfaces.ifNumber.0 = 1
> > interfaces.ifTable.ifEntry.ifIndex.1 = 1
> > interfaces.ifTable.ifEntry.ifDescr.1 = pack
> > interfaces.ifTable.ifEntry.ifType.1 = iso88023Csmacd(7)
> > interfaces.ifTable.ifEntry.ifMtu.1 = 1500
> > interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge32: 10000000
> > interfaces.ifTable.ifEntry.ifPhysAddress.1 = 0:10:f0:0:3b:a7
> > interfaces.ifTable.ifEntry.ifAdminStatus.1 = up(1)
> >
> >
> >
> >
> >
> >
> > "Tom DE BLENDE"
> > <tdeblend at gcc.dh An: kdellhofen at telebel.net
> > l.com> Kopie: Nagios-users at lists.sourceforge.net
> > Thema: Re: [Nagios-users] how can i use snmp
> > 15.01.2003 14:31
> >
> >
> >
> >
> >
> >
> > You asked for a tool -and I quote- "to count the traffic on each port
> > and so on...".
> >
> > MRTG does just that. MRTG is a master in counting and graphing. So if
> > you want to graph temperature, yes MRTG can do that.
> >
> > However, it seems like you want to monitor, rather than to count? No?
> >
> > Anyway, it might be helpfull if you could write out what exactly you
> > want to know, because it's a bit fuzzy now...
> >
> > kdellhofen at telebel.net wrote:
> > >
> > > mrtg to read out temprature and Door Open Closed?!?!
> > >
> > > Sorry for my bad english...
> > >
> > >
> > > "Tom DE BLENDE"
> > > <tdeblend at gcc.dh An:
> > kdellhofen at telebel.net
> > > l.com> Kopie:
> > > Thema: Re:
> > [Nagios-users] how can i use snmp
> > > 15.01.2003 14:23
> > >
> > >
> > >
> > > mrtg?
> > >
> > > kdellhofen at telebel.net wrote:
> > > >
> > > > which tools where need to use snmp or to count the traffic on each port
> > > and
> > > > so on...
> > > >
> > > > -------------------------------------------------------
> > > > This SF.NET email is sponsored by: Take your first step towards giving
> > > > your online business a competitive advantage. Test-drive a Thawte SSL
> > > > certificate - our easy online guide will show you how. Click here to
> > get
> > > > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
> > > > _______________________________________________
> > > > Nagios-users mailing list
> > > > Nagios-users at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/nagios-users
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.NET email is sponsored by: Take your first step towards giving
> > your online business a competitive advantage. Test-drive a Thawte SSL
> > certificate - our easy online guide will show you how. Click here to get
> > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> >
>
>
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
More information about the Users
mailing list