Hi!

A couple of things to note/check on your end:

  • %SYS_Monitor service is enabled (and is not restricting access for your IP)
  • Make sure the iscsnmp.dll is registered. You can run
    d $ZU(190,5,0) to delete the registry entries
    and
    d $ZU(190,5,1) to add them again.

  • Restart SNMP in Cache:
    zn "%SYS"
    d stop^SNMP
    d start^SNMP

  • Make sure there is a SNMP job running in your instance (System -> Processes, filter for SNMP)

  • Make sure the windows firewall allows connections, in doubt you could disable the windows
    firewall service temporarily

For debugging you can set:

  s  ^SYS("MONITOR","SNMP","DEBUG")=1

Which will create a SNMP.log file in your mgr directory.

As well as in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intersystems\Cache\SNMP\CurrentVersion

(for 64bit)

"Debug" = "true" (String value)

Which will create a file snmpdbg.log in c:\windows\syswow64\snmpdbg.log

Then you can try and get a value directly like this:

snmpwalk -r:"localhost" -os:.1.3.6.1.4.1.16563.1.1.1.1.3 -op:.1.3.6.1.4.1.16563.1.1.1.1.4

(or you can use a tool like the iReasoning MIBBrowser..., import the MIB from directory>/SNMP)

Hope this helps.

Best,
Fabian

Hi Peter,

a couple of things:
* You're trying to write out the numbers twice. Everything that is >60 is also >30.
* The css style for background is background-color. See CSS reference

This works for me:

Method SetAlertColor(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status
{
    s val=%query(pName),col=""
    if (val>60)
    {
        s col="#FF0000"
    } elseif val>30{
        s col="#FF6600"
    } else {
        s col="#AAAAAA"
    }   
    &html<<div style="background-color:#(col)#">#(val)#</div>> 
    q $$$OK
}

%ToJSON() is only defined on objects extending %DynamicAbstractObject.
For example:

SAMPLES>s obj={"test":"42"}
SAMPLES>d obj.%ToJSON()
{"test":"42"}
SAMPLES>

To serialize arbitrary %Persistent/%Registered objects you'll have to use altJSONProvider
for example:

SAMPLES>s p=##class(Sample.Person).%OpenId(1)
SAMPLES>d ##class("%ZEN.Auxiliary.altJSONProvider").%WriteJSONFromObject(,.p)
{"_class":"Sample.Person","_id":1,"Name":"Love,Wolfgang A.","SSN":"917-96-1802","DOB":45275,"Home":{"_class":"Sample.Address","Street":"8360 First Street","City":"Zanesville","State":"WV","Zip":25788},"Office":{"_class":"Sample.Address","Street":"1842 Maple Court","City":"Hialeah","State":"NH","Zip":65893},"Spouse":"","FavoriteColors":[],"Age":"52"}