Toon posts:

[SNMP] SNMP info van een netwerkkaart ?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik weet dat je vanuit een router of switch informatie kunt halen en kunt laten afbeelden door bijvoorbeeld www.mrtg.org Echter wanneer er geen routers, switches etc aanweizg zijn alleen een netwerkkaart in een Linux server; kun je dan ook iets installeren waardoor je de snmp info van die kaart kunt afbeelden ?

En dan bedoel ik niet het stukje mrtg wat je kunt gebruiken om het zichtbaar te maken maar heb je software waarmee je net als bij een router maar dan van een netwerkkaart grafiekjes kunt laten afbeelden ??

  • BOOTZ
  • Registratie: Maart 2001
  • Laatst online: 17-03 09:38
mrtg vraagt via snmp (simple network management protocol) aan je computer wat stats op, elke zoveel tijd. daarmee bouwt ie de grafiekjes.
wil je dat kunnen gebruiken moet je snmp installeren cq. in je kernel zetten (heb er tot nu toe alleen op mn windowsbak wat mee gespeeld... zal m op mn server es proberen aan het werk te krijgen hier)

Maak je eigen poll


Verwijderd

Dat kan gewoon met MRTG hoor, in de CFG-file geef je de IP-adres op van je netwerkaart. SNMP moet wel aan staan.

[ Voor 20% gewijzigd door Verwijderd op 23-11-2002 19:49 ]


Verwijderd

Topicstarter
<Wel moet SNMP aan staan.>

Dus ik kan onder Redhat Linux 7.3 gewoon in de kernel deze optie aanzetten ? Staat ie bij een default installation aan ? Of moet ik hem separaat activeren ?

Verwijderd

Topicstarter
[root@vconsole bin]# cfgmaker --global 'WorkDir: /home/vconsole/HTML/monitor' \
> --global 'Options[_]: bits,growright' \
> --output /usr/local/mrtg/network.cfg \
public@192.168.1.60 --base: Get Device Info on public@ :
Error:
can't resolve " " to IP address
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 392
SNMPGET Problem for public@ :
at /usr/bin/cfgmaker line 657
--base: Vendor Id:
--base: Populating confcache
--snpo: Skipping ifName scanning because public@ : does not seem to support it
--snpo: Skipping ifDescr scanning because public@ : does not seem to support it
--snpo: Skipping ipAdEntIfIndex scanning because public@ : does not seem to support it
--snpo: Skipping ifType scanning because public@ : does not seem to support it
--snpo: Skipping ifPhysAddress scanning because public@ : does not seem to support it
--base: Get Interface Info
--base: Walking ifIndex
Error:
can't resolve " " to IP address
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 392
SNMPWALK Problem for public@ :
at /usr/bin/cfgmaker line 107
--base: Walking ifType

Error:
can't resolve " " to IP address
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 392
SNMPWALK Problem for public@ :
at /usr/bin/cfgmaker line 107
--base: Walking ifSpeed
Error:
can't resolve " " to IP address
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 392
SNMPWALK Problem for public@ :
at /usr/bin/cfgmaker line 107
--base: Walking ifAdminStatus
Error:
can't resolve " " to IP address
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 392
SNMPWALK Problem for public@ :
at /usr/bin/cfgmaker line 107
--base: Walking ifOperStatus
Error:
can't resolve " " to IP address
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 392
SNMPWALK Problem for public@ :
at /usr/bin/cfgmaker line 107
--base: Writing /usr/local/mrtg/network.cfg
[root@vconsole bin]# public@192.168.1.60
bash: public@192.168.1.60: command not found
[root@vconsole bin]#


Wordt default blijkbaar niet ondersteund :

cfgmaker --global 'WorkDir: /home/vconsole/HTML/monitor' \
--global 'Options[_]: bits,growright' \
--output /usr/local/mrtg/network.cfg \
public@192.168.1.60


Welke optie moet ik aanzetten in de Kernel van Redhat ??

[ Voor 6% gewijzigd door Verwijderd op 23-11-2002 19:57 ]


  • Predator
  • Registratie: Januari 2001
  • Laatst online: 13:26

Predator

Suffers from split brain

Je moet gewoon net-snmp (vroeger UCD-snmp) installeren.
http://www.net-snmp.org/

Er is vast wel een rpm van op je redhat cd.
(als die zelfs al niet geinstalleerd is)

[ Voor 15% gewijzigd door Predator op 23-11-2002 21:15 ]

Everybody lies | BFD rocks ! | PC-specs


Verwijderd

Topicstarter
Ik heb het pakketje geinstalleerd maar hoe kan ik het nu activeren voor de lokale netwerkkaart ??

[ Voor 57% gewijzigd door Verwijderd op 24-11-2002 19:57 ]


  • Predator
  • Registratie: Januari 2001
  • Laatst online: 13:26

Predator

Suffers from split brain

Begin eerst es met config:
code:
1
snmpconf -g basic_setup


dan snmpd opstarten

Kijk dan even af alles ok is met:
code:
1
snmpwalk -v 2c -c public <ip>

[ Voor 45% gewijzigd door Predator op 24-11-2002 20:19 ]

Everybody lies | BFD rocks ! | PC-specs


Verwijderd

Topicstarter
Heeft iemand een voorbeeld .conf bestand .. Iets wat werkt ??

  • Oezie Woezie
  • Registratie: December 1999
  • Niet online

Oezie Woezie

Pim. is de beste

staat er in je snmpd.conf
"rocommunity public"?
zo niet effe toevoegen en snmpd restarten.
dan zou je met "snmpwalk -v 2c localhost public" wat data moeten zien.

een mooi Tshirt met Pim. is de beste enzo


Verwijderd

Topicstarter
Dit krijg ik te zien ..

[root@vconsole /]# snmpwalk localhost -v 2c -c public
Timeout: No Response from localhost

Zonder <localhost> krijg ik de volgende melding :

[root@vconsole /]# snmpwalk -v 2c -c public
No hostname specified.
Usage: snmpwalk [options...] <hostname> {<community>} [<objectID>]

UCD-snmp version: 4.2.4
-h this help message.
-H Display configuration file directives understood.
-V display version number.
-v 1|2c|3 specifies snmp version to use.
SNMP Version 1 or 2c specific
-c <c> set the community name (v1 or v2c)
SNMP Version 3 specific
-Z <B,T> set the destination engine boots/time for v3 requests.
-e <E> security engine ID (e.g., 800000020109840301).
-E <E> context engine ID (e.g., 800000020109840301).
-n <N> context name (e.g., bridge1).
-u <U> security name (e.g., bert).
-l <L> security level (noAuthNoPriv|authNoPriv|authPriv).
-a <A> authentication protocol (MD5|SHA)
-A <P> authentication protocol pass phrase.
-x <X> privacy protocol (DES).
-X <P> privacy protocol pass phrase
General communication options
-p <P> use port P instead of the default port.
-T <LAYER> use LAYER for the network layer.
(UDP or TCP).
-t <T> set the request timeout to T.
-r <R> set the number of retries to R.
Debugging
-d dump input/output packets.
-D all | <TOKEN[,TOKEN,...]> turn on debugging output for the specified TOKENs.
General options
-m all | <MIBS> use MIBS list instead of the default mib list.
-M <MIBDIRS> use MIBDIRS as the location to look for mibs.
-P <MIBOPTS> Toggle various defaults controlling mib parsing:
MIBOPTS values:
u: allow the usage of underlines in mib symbols.
c: disallow the usage of "--" to terminate comments.
d: save the descriptions of the mib objects.
e: Disable mib errors of MIB symbols conflicts
w: Enable mib warnings of MIB symbols conflicts
W: Enable detailed warnings of MIB symbols conflicts
R: Replace MIB symbols from latest module
-O <OUTOPTS> Toggle various defaults controlling output display:
OUTOPTS values:
n: Print oids numerically.
e: Print enums numerically.
E: Escape quotes in string indices.
X: Extended index format
b: Dont break oid indexes down.
q: Quick print for easier parsing.
f: Print full oids on output.
s: Print only last symbolic element of oid.
S: Print MIB module-id plus last element.
t: Print timeticks unparsed as numeric integers.
v: Print Print values only (not OID = value).
T: Print human-readable text along with hex strings.
-I <INOPTS> Toggle various defaults controlling input parsing:
INOPTS values:
R: Do random access to oid labels.
r: Don't check values for range/type legality.
b: Do best/regex matching to find a MIB node.
-C <APPOPTS> Toggle various application specific behaviour:
APPOPTS values:
p: Print the number of variables found.
i: Include the requested OID in the search range.
c: Don't check that the returned OID's are increasing.

[ Voor 5% gewijzigd door Verwijderd op 25-11-2002 09:20 ]


  • Oezie Woezie
  • Registratie: December 1999
  • Niet online

Oezie Woezie

Pim. is de beste

Verwijderd schreef op 25 November 2002 @ 09:19:

[root@vconsole /]# snmpwalk localhost -v 2c -c public
Timeout: No Response from localhost
dan draait snmpd niet, kijk daar eerst is naar.

een mooi Tshirt met Pim. is de beste enzo


Verwijderd

Topicstarter
Hoe start ik hem dan op ? Ik dacht gewoon /usr/local/netsnmp/sbin/snmpd &

  • Predator
  • Registratie: Januari 2001
  • Laatst online: 13:26

Predator

Suffers from split brain

Verwijderd schreef op 25 November 2002 @ 20:19:
Hoe start ik hem dan op ? Ik dacht gewoon /usr/local/netsnmp/sbin/snmpd &

/usr/local/netsnmp/sbin/snmpd [IP]:161

Zoals het ook in de handleiding staat

Everybody lies | BFD rocks ! | PC-specs

Pagina: 1