Snmp switch issues help!

Hello,

I’m having a few bugs regarding snmp reporting status, and working properly with default switch. I have a configuration that works currently working with a mapping but default button does not, nor does it report %s or %d. Ironically the default switch that doesn’t send snmpset msgs does reflect current status all though its not shown in the label.

The first entry I was playing with, changing the values without luck I can also view the packets on tcpdump for verification, the first entry doesn’t work all. All others do, but with they have the ugly drop down due to the sitemap mapping. I would prefer the default switch and map on the items section, but i can’t seem to get it working. Not even sure why the map works in the first place**

my.items
Switch Strip1_plug12 “Strip 1 Outlet 11 [MAP(SwitchState.map):%s]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.12:90000:MAP(SwitchState.map)] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.12:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.12:0]"}
Switch Strip1_plug11 “Strip 1 Outlet 11 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.11:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.11:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.11:0]"}
Switch Strip1_plug10 “Strip 1 Outlet 10 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.10:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.10:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.10:0]"}
Switch Strip1_plug9 “Strip 1 Outlet 9 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.9:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.9:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.9:0]"}
Switch Strip1_plug8 “Strip 1 Outlet 8 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.8:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.8:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.8:0]"}
Switch Strip1_plug7 “Strip 1 Outlet 7 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.7:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.7:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.7:0]"}
Switch Strip1_plug6 “Strip 1 Outlet 6 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.6:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.6:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.6:0]"}
Switch Strip1_plug5 “Strip 1 Outlet 5 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.5:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.5:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.5:0]"}
Switch Strip1_plug4 “Strip 1 Outlet 4 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:0]"}
Switch Strip1_plug3 “Strip 1 Outlet 4 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:0]"}
Switch Strip1_plug2 “Strip 1 Outlet 2 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.2:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.2:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.2:0]"}
Switch Strip1_plug1 “Strip 1 Outlet 1 [%d]” { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.1:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.1:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.1:0]"}

Sitemap:

sitemap default label=“My first sitemap”
{
Frame label=“Power Management” {
Text item=“Strip_1” label=“Strip 1” {
Switch item=Strip1_plug1 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug2 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug3 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug4 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug5 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug6 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug7 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug8 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug9 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug10 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug11 mappings=[“OFF”=“0”, “ON”=“1”]
Switch item=Strip1_plug12
}
}
}

well its 5:40 in the morning and i found out that white space at the end of the line of the OID screws up the returned value!!! One issue down more to go. Sorry for about the ugly formatting I though it would handle it better.

Above the posting text box are some useful buttons for ‘code fences’

my.items
Switch Strip1_plug12 "Strip 1 Outlet 11 [MAP(SwitchState.map):%s]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.12:90000:MAP(SwitchState.map)] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.12:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.12:0]"}
Switch Strip1_plug11 "Strip 1 Outlet 11 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.11:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.11:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.11:0]"}
Switch Strip1_plug10 "Strip 1 Outlet 10 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.10:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.10:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.10:0]"}
Switch Strip1_plug9 "Strip 1 Outlet 9 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.9:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.9:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.9:0]"}
Switch Strip1_plug8 "Strip 1 Outlet 8 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.8:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.8:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.8:0]"}
Switch Strip1_plug7 "Strip 1 Outlet 7 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.7:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.7:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.7:0]"}
Switch Strip1_plug6 "Strip 1 Outlet 6 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.6:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.6:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.6:0]"}
Switch Strip1_plug5 "Strip 1 Outlet 5 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.5:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.5:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.5:0]"}
Switch Strip1_plug4 "Strip 1 Outlet 4 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:0]"}
Switch Strip1_plug3 "Strip 1 Outlet 4 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.4:0]"}
Switch Strip1_plug2 "Strip 1 Outlet 2 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.2:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.2:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.2:0]"}
Switch Strip1_plug1 "Strip 1 Outlet 1 [%d]" { snmp="<[10.10.0.76:public:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.1:90000] >[ON:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.1:1] >[OFF:10.10.0.76:private:.1.3.6.1.4.1.4779.1.3.5.6.1.4.5.1.1:0]"}

Sitemap:

sitemap default label="My first sitemap"
{
Frame label="Power Management" {
Text item="Strip_1" label="Strip 1" {
Switch item=Strip1_plug1 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug2 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug3 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug4 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug5 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug6 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug7 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug8 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug9 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug10 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug11 mappings=["OFF"="0", "ON"="1"]
Switch item=Strip1_plug12
}
}
}