Thanks for your reply. That helped me to see the error. Now, however, using a "real" OID (for an "exec" or "sh" custom program) I get the following behavior:

# ./snmpvar.monitor --community=public localhost
localhost

localhost:
error retrieving localhost:MONITOR.SCRIPT(.1.3.6.1.4.1.2021.8.1.100): Unknown user name

Where MONITOR.SCRIPT is defined as:

Variable MONITOR.SCRIPT
OID .1.3.6.1.4.1.2021.8.1.100
Description Custom Monitoring Script
DefaultMin 0
DefaultMax 0
Decode 0 OKAY
Decode 1 Error Condition


So to troubleshoot I tried the command you sent:

# snmpwalk -OS -c public localhost .1.3.6.1.4.1.2021.8.1.100
snmpwalk: No securityName specified

When I add "-v 1" things look better:

# snmpwalk -v 1 -OS -c public localhost .1.3.6.1.4.1.2021.8.1.100
UCD-SNMP-MIB::extResult.1 = INTEGER: 0

Do I need to specify the version somewhere?

Thanks for your help.

--K






From: [EMAIL PROTECTED] (Peter HOLZLEITNER)
To: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: snmpvar not working?
Date: Mon, 25 Nov 2002 15:24:03 +0100

In --list mode, snmpvar.monitor does not bother you with error messages.

Try without --list, it's probably just an SMTP GET error like when I try
it here:

  localhost:
  error retrieving localhost:FAKE_VARIABLE(): Unknown Object Identifier
  error retrieving localhost:MY_VARIABLE(.1.3.6.1.4.1.2021.9.1.1.3):
(noSuchName)
  There is no such variable name in this MIB.

Next, to find out whether your OID is OK, try

  snmpwalk -OS localhost public .1.3.6.1.4.1.2021.9.1.1.3

and see what you get.  Wokr your way up the OID hierarchy if it doesn't
work.

--Peter




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 7:38 PM
To: [EMAIL PROTECTED]; HOLZLEITNER, Peter
Subject: snmpvar not working?


Hi All,

I can't get snmpvar monitor to do anything. I'm trying to test with the
"--list" option. Here is my test setup:

Test command:

./snmpvar.monitor --config /etc/mon/snmpvar.cf --varconf
/etc/mon/snmpvar.def --list localhost

It returns nothing. No errors. Nada. And the return status is 0.

Test config files:
/etc/mon/snmpvar.cf
Host localhost
  MY_VARIABLE                Min 1 Max 2
  FAKE_VARIABLE

/etc/mon/snmpvar.dev
Variable MY_VARIABLE
  OID           .1.3.6.1.4.1.2021.9.1.1.3
  DefaultMin    1
  DefaultMax    2
  Decode        1       One
  Decode        2       Two
  Decode        3       Three
  Decode        4       Four
  Decode        5       Five
  Description   Disk stuff

I would expect an error that FAKE_VARIABLE is not defined at least. I
can
also enter the command:

./snmpvar.monitor --config /etc/mon/snmpvar.cf --varconf
/etc/mon/snmpvar.def --list bogushost

And even though "bogushost" is not defined anywhere the command returns
nothing and the return status is 0.

Am I doing something wrong here? How do I test that I've got a valid
snmpvar
configuration?

Thanks for your help.

--K





_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail


_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail

_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to