since nobody answered my question i went further and got a solution?
a vbscript
code:
Option Explicit
Dim objSnmpManager, objSnmpData,objSnmpData1, objConstants
Dim strCommunity,strOID, strNextOID
Dim strHostName, strValue
' Create instances of the objects
Set objSnmpManager = CreateObject ( "ActiveXperts.SnmpManager" )
Set objConstants = CreateObject ( "ActiveXperts.ASConstants" )
' Get host information and community information
strHostName = "IpAddress"
strCommunity = "Communitystring"
' Initialize SNMP
objSnmpManager.Initialize
If( objSnmpManager.LastError <> 0 ) Then
WScript.Quit
End If
' Open SNMP session. Pass hostname and community.
' Note: Port 161 is used by default. To specify a different port, pass the port number as 3rd parameter (optional)
objSnmpManager.Open strHostName, strCommunity
If( objSnmpManager.LastError = 0 ) Then
strOID = "OID"
If( objSnmpManager.LastError = 0 ) Then
Set objSnmpData = objSnmpManager.Get( strOID )
PrintSnmpData( objSnmpData )
objSnmpManager.Close()
End If
End If
' ********************************************************************
' Function PrintSnmpData
' ********************************************************************
Function PrintSnmpData( objSnmpData )
WScript.Echo objSnmpData.Value & " %"
End Function
call it with your asb page like so:
code:
<script language="vbscript" runat="server">
class wscript_class
function echo(s)
response.write(s)
end function
function quit()
' dummy
end function
end class
dim wscript
set wscript = new wscript_class
Include "snmp_walk.vbs"
Function Include (Scriptname)
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile(Scriptname)
ExecuteGlobal oFile.ReadAll()
oFile.Close
End Function
</script>