GELÖST - keine Attribute snmp und mibs in SYSSTAT Gerät

Begonnen von Frank_Huber, 17 März 2023, 10:50:45

Vorheriges Thema - Nächstes Thema

Frank_Huber

Moin!

Habe gestern eine weitere Instanz auf Bullseye gehoben.
alles läuft soweit, nur die Abfrage meiner PoE Switche per SNMP nicht mehr.
Raspbian und FHEM sind aktuell, alle benötigten Pakete sind installiert.

Nach kurzer Diagnose fiel mir auf dass nach dem Restore scheinbar die SNMP und MIBS Attribute nicht übernommen wurden.
im Backup geschaut, da war die Definition noch vollständig:
define CWGE26FX2TX24MSPOE_1 SYSSTAT 60 600 192.168.12.248
setuuid CWGE26FX2TX24MSPOE_1 5faa8d90-f33f-7ae5-0ec4-d98c2d2410b2b5ee
attr CWGE26FX2TX24MSPOE_1 DbLogExclude .*
attr CWGE26FX2TX24MSPOE_1 alias Switch_1_26-port_KG
attr CWGE26FX2TX24MSPOE_1 event-on-change-reading .*
attr CWGE26FX2TX24MSPOE_1 event-on-update-reading port-26_LinkStatus
attr CWGE26FX2TX24MSPOE_1 group PoE_Switch
attr CWGE26FX2TX24MSPOE_1 icon it_network
attr CWGE26FX2TX24MSPOE_1 mibs .1.3.6.1.2.1.1.3.0:uptime .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.1:port-01_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.2:port-02_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.3:port-03_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.4:port-04_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.5:port-05_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.6:port-06_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.7:port-07_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.8:port-08_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.9:port-09_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.10:port-10_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.11:port-11_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.12:port-12_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.13:port-13_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.14:port-14_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.15:port-15_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.16:port-16_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.17:port-17_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.18:port-18_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.19:port-19_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.20:port-20_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.21:port-21_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.22:port-22_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.23:port-23_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.11.2.1.1.5.24:port-24_PoE_PowerUsed .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.1:port-01_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.2:port-02_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.3:port-03_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.4:port-04_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.5:port-05_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.6:port-06_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.7:port-07_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.8:port-08_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.9:port-09_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.10:port-10_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.11:port-11_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.12:port-12_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.13:port-13_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.14:port-14_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.15:port-15_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.16:port-16_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.17:port-17_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.18:port-18_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.19:port-19_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.20:port-20_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.21:port-21_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.22:port-22_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.23:port-23_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.24:port-24_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.25:port-25_LinkStatus .1.3.6.1.4.1.32298.2.2.29.9.1.1.2.26:port-26_LinkStatus
attr CWGE26FX2TX24MSPOE_1 noSSH 1
attr CWGE26FX2TX24MSPOE_1 room Switche
attr CWGE26FX2TX24MSPOE_1 snmp 1
attr CWGE26FX2TX24MSPOE_1 stateFormat total PoE Power used: total_PoE_PowerUsed W
attr CWGE26FX2TX24MSPOE_1 userReadings total_PoE_PowerUsed:port-26_LinkStatus.* { my $summe = 0;;\
for my $a ( keys %{$defs{$name}->{READINGS}} ) {\
$summe += ReadingsNum($name, $a, 0) if ($a =~ 'port-' and $a =~ 'PoE_PowerUsed');;\
} return $summe;; },\
uptime_calc:uptime.* {sprintf("%d %02d:%02d",SYSMON_decode_time_diff((ReadingsVal($name,"uptime",0))/100))}
attr CWGE26FX2TX24MSPOE_1 verbose 3


Nach dem Restore sind die Attribute mibs und snmp verschwunden.
defmod CWGE26FX2TX24MSPOE_1 SYSSTAT 60 600 192.168.12.248
attr CWGE26FX2TX24MSPOE_1 DbLogExclude .*
attr CWGE26FX2TX24MSPOE_1 alias Switch_1_26-port_KG
attr CWGE26FX2TX24MSPOE_1 event-on-change-reading .*
attr CWGE26FX2TX24MSPOE_1 event-on-update-reading port-26_LinkStatus
attr CWGE26FX2TX24MSPOE_1 group PoE_Switch
attr CWGE26FX2TX24MSPOE_1 icon it_network
attr CWGE26FX2TX24MSPOE_1 noSSH 1
attr CWGE26FX2TX24MSPOE_1 room Switche
attr CWGE26FX2TX24MSPOE_1 stateFormat total PoE Power used: total_PoE_PowerUsed W
attr CWGE26FX2TX24MSPOE_1 userReadings total_PoE_PowerUsed:port-26_LinkStatus.* { my $summe = 0;;\
for my $a ( keys %{$defs{$name}->{READINGS}} ) {\
$summe += ReadingsNum($name, $a, 0) if ($a =~ 'port-' and $a =~ 'PoE_PowerUsed');;\
} return $summe;; },\
uptime_calc:uptime.* {sprintf("%d %02d:%02d",SYSMON_decode_time_diff((ReadingsVal($name,"uptime",0))/100))}
attr CWGE26FX2TX24MSPOE_1 verbose 3


Die Attribute lassen sich auch nicht wieder setzen:
CWGE26FX2TX24MSPOE_1: unknown attribute snmp. Type 'attr CWGE26FX2TX24MSPOE_1 ?' for a detailed list.
CWGE26FX2TX24MSPOE_1: unknown attribute mibs. Type 'attr CWGE26FX2TX24MSPOE_1 ?' for a detailed list.

und sind auch im WebGUI nicht auswählbar. (siehe Anhang)

Fehlt mir hier noch ein Paket? Habe Wiki und Forum durchsucht und nichts fehlendes gefunden.
Sonst jemand eine Idee? am SYSSTAT Modul hat sich ja lange nichts geändert, also muss es an der Umgebung liegen.

Danke & Grüße
Frank

EDIT:
SNMP über die Raspi Konsole geht. scheint für Perl/FHEM etwas zu fehlen.

Frank_Huber

So, nachdem ich meine Mittagspause in Google und das Forum investiert habe habe ich den Fehler in meiner Aufzeichnung gefunden.
cpan install use Net::SNMP
war das fehlende Paket.

Ich war fälschlicherweise davon ausgegangen dass es bei
apt-get install snmpd snmp snmp-mibs-downloader
dabei ist. Nach der cpan Installation läuft jetzt alles und meine Doku ist auch angepasst. :-)