Forum: Ruby undefined method `Gauge' for SNMPSET:Class (NoMethodError)

62ad59948dc76c7215de8fd9a2021af3?d=identicon&s=25 Chandra Sekhar (chandrasekhar29)
on 2013-03-19 13:18
Hi,

Does anybody have an idea how to SET a snmp gauge OID? My code sample is
as follows

host = '192.168.10.10'
community = 'tenant'

userID_OID = '1.3.6.1.4.1.9344.100.107.13.1.0'
password_OID = '1.3.6.1.4.1.9344.100.107.13.2.0'

SNMP::Manager.open( :Host => hpbsmiIP,
                    :Community => community) do |manager|
                userID = VarBind.new(userID_OID,
OctetString.new('admin'))
                manager.set(userID)
                pass = VarBind.new(password_OID,
OctetString.new('admin@333'))
                manager.set(pass)
              end


manager = Manager.new(:Host => hpbsmiIP, :Community => community)
varbind = VarBind.new("1.3.6.1.4.1.9344.100.107.1.4.0", Gauge('1'))
manager.set(varbind)


Thanks in advance
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.