GPIO to SNMP output...

I was thinking of the concept of a GPIO sensor net and I came across SNMP. It seems to be a good way to distribute senor data.

I came across several Linux articles. Nothing for FreeBSD. What is needed?


How do I get OID address from GPIO pins. Is there a translator or agent?

What SNMP server is recommended? OneWire from above is a good example of my usage.

bsnmpd in base can do this?
 
There is no Port for this so I probably wont be using this. Sounds like a complete system. What exists Open Source?

 
This is what prometheus returns for me. Probably you have better idea what it means,

Code:
# HELP hrSystemDate The host's notion of the local date and time of day. - 1.3.6.1.2.1.25.1.2
# TYPE hrSystemDate gauge
hrSystemDate 1.767140396e+09
# HELP hrSystemInitialLoadDevice The index of the hrDeviceEntry for the device from which this host is configured to load its initial operating system configuration (i.e., which operating system code and/or boot parameters) - 1.3.6.1.2.1.25.1.3
# TYPE hrSystemInitialLoadDevice gauge
hrSystemInitialLoadDevice 393216
# HELP hrSystemInitialLoadParameters This object contains the parameters (e.g - 1.3.6.1.2.1.25.1.4
# TYPE hrSystemInitialLoadParameters gauge
hrSystemInitialLoadParameters{hrSystemInitialLoadParameters="0x61736B2044617665"} 1
# HELP hrSystemMaxProcesses The maximum number of process contexts this system can support - 1.3.6.1.2.1.25.1.7
# TYPE hrSystemMaxProcesses gauge
hrSystemMaxProcesses 21508
# HELP hrSystemNumUsers The number of user sessions for which this host is storing state information - 1.3.6.1.2.1.25.1.5
# TYPE hrSystemNumUsers gauge
hrSystemNumUsers 2
# HELP hrSystemProcesses The number of process contexts currently loaded or running on this system. - 1.3.6.1.2.1.25.1.6
# TYPE hrSystemProcesses gauge
hrSystemProcesses 217
# HELP hrSystemUptime The amount of time since this host was last initialized - 1.3.6.1.2.1.25.1.1
# TYPE hrSystemUptime gauge
hrSystemUptime 364624
# HELP snmp_scrape_duration_seconds Total SNMP time scrape took (walk and processing).
# TYPE snmp_scrape_duration_seconds gauge
snmp_scrape_duration_seconds{module="hrDevice"} 0.000135684
snmp_scrape_duration_seconds{module="hrSWInstalled"} 0.000118726
snmp_scrape_duration_seconds{module="hrSWRun"} 0.00013978
snmp_scrape_duration_seconds{module="hrSWRunPerf"} 0.000113519
snmp_scrape_duration_seconds{module="hrStorage"} 0.000136005
snmp_scrape_duration_seconds{module="hrSystem"} 0.000178987
snmp_scrape_duration_seconds{module="if_mib"} 0.000923356
snmp_scrape_duration_seconds{module="ip_mib"} 0.000338063
snmp_scrape_duration_seconds{module="system"} 0.000552044
snmp_scrape_duration_seconds{module="ucd_memory"} 0.000109457
snmp_scrape_duration_seconds{module="ucd_system_stats"} 8.5545e-05
# HELP snmp_scrape_packets_retried Packets retried for get, bulkget, and walk.
# TYPE snmp_scrape_packets_retried gauge
snmp_scrape_packets_retried{module="hrDevice"} 0
snmp_scrape_packets_retried{module="hrSWInstalled"} 0
snmp_scrape_packets_retried{module="hrSWRun"} 0
snmp_scrape_packets_retried{module="hrSWRunPerf"} 0
snmp_scrape_packets_retried{module="hrStorage"} 0
snmp_scrape_packets_retried{module="hrSystem"} 0
snmp_scrape_packets_retried{module="if_mib"} 0
snmp_scrape_packets_retried{module="ip_mib"} 0
snmp_scrape_packets_retried{module="system"} 0
snmp_scrape_packets_retried{module="ucd_memory"} 0
snmp_scrape_packets_retried{module="ucd_system_stats"} 0
# HELP snmp_scrape_packets_sent Packets sent for get, bulkget, and walk; including retries.
# TYPE snmp_scrape_packets_sent gauge
snmp_scrape_packets_sent{module="hrDevice"} 1
snmp_scrape_packets_sent{module="hrSWInstalled"} 1
snmp_scrape_packets_sent{module="hrSWRun"} 1
snmp_scrape_packets_sent{module="hrSWRunPerf"} 1
snmp_scrape_packets_sent{module="hrStorage"} 1
snmp_scrape_packets_sent{module="hrSystem"} 1
snmp_scrape_packets_sent{module="if_mib"} 3
snmp_scrape_packets_sent{module="ip_mib"} 2
snmp_scrape_packets_sent{module="system"} 2
snmp_scrape_packets_sent{module="ucd_memory"} 1
snmp_scrape_packets_sent{module="ucd_system_stats"} 1
# HELP snmp_scrape_pdus_returned PDUs returned from get, bulkget, and walk.
# TYPE snmp_scrape_pdus_returned gauge
snmp_scrape_pdus_returned{module="hrDevice"} 0
snmp_scrape_pdus_returned{module="hrSWInstalled"} 0
snmp_scrape_pdus_returned{module="hrSWRun"} 0
snmp_scrape_pdus_returned{module="hrSWRunPerf"} 0
snmp_scrape_pdus_returned{module="hrStorage"} 0
snmp_scrape_pdus_returned{module="hrSystem"} 7
snmp_scrape_pdus_returned{module="if_mib"} 0
snmp_scrape_pdus_returned{module="ip_mib"} 0
snmp_scrape_pdus_returned{module="system"} 38
snmp_scrape_pdus_returned{module="ucd_memory"} 0
snmp_scrape_pdus_returned{module="ucd_system_stats"} 0
# HELP snmp_scrape_walk_duration_seconds Time SNMP walk/bulkwalk took.
# TYPE snmp_scrape_walk_duration_seconds gauge
snmp_scrape_walk_duration_seconds{module="hrDevice"} 0.000112103
snmp_scrape_walk_duration_seconds{module="hrSWInstalled"} 0.000107551
snmp_scrape_walk_duration_seconds{module="hrSWRun"} 0.00013109
snmp_scrape_walk_duration_seconds{module="hrSWRunPerf"} 0.000104734
snmp_scrape_walk_duration_seconds{module="hrStorage"} 0.000124918
snmp_scrape_walk_duration_seconds{module="hrSystem"} 0.000147095
snmp_scrape_walk_duration_seconds{module="if_mib"} 0.000891785
snmp_scrape_walk_duration_seconds{module="ip_mib"} 0.000328031
snmp_scrape_walk_duration_seconds{module="system"} 0.000423722
snmp_scrape_walk_duration_seconds{module="ucd_memory"} 8.0983e-05
snmp_scrape_walk_duration_seconds{module="ucd_system_stats"} 6.5319e-05
# HELP sysContact The textual identification of the contact person for this managed node, together with information on how to contact this person - 1.3.6.1.2.1.1.4
# TYPE sysContact gauge
sysContact{sysContact="Alain <devosalain@ymail.com>"} 1
# HELP sysDescr A textual description of the entity - 1.3.6.1.2.1.1.1
# TYPE sysDescr gauge
sysDescr{sysDescr="FreeBSD myfreebsd 15.0-RELEASE-p1 FreeBSD 15.0-RELEASE-p1 releng/15.0-n280999-63a5b645b23e MYKERNEL amd64"} 1
# HELP sysLocation The physical location of this node (e.g., 'telephone closet, 3rd floor') - 1.3.6.1.2.1.1.6
# TYPE sysLocation gauge
sysLocation{sysLocation="Sitting on the Dock of the Bay"} 1
# HELP sysName An administratively-assigned name for this managed node - 1.3.6.1.2.1.1.5
# TYPE sysName gauge
sysName{sysName="myfreebsd"} 1
# HELP sysORDescr A textual description of the capabilities identified by the corresponding instance of sysORID. - 1.3.6.1.2.1.1.9.1.3
# TYPE sysORDescr gauge
sysORDescr{sysORDescr="The MIB for Message Processing and Dispatching.",sysORIndex="2"} 1
sysORDescr{sysORDescr="The MIB module for SNMPv2 entities",sysORIndex="4"} 1
sysORDescr{sysORDescr="The MIB module for logging SNMP Notifications.",sysORIndex="10"} 1
sysORDescr{sysORDescr="The MIB module for managing IP and ICMP implementations",sysORIndex="8"} 1
sysORDescr{sysORDescr="The MIB module for managing TCP implementations",sysORIndex="6"} 1
sysORDescr{sysORDescr="The MIB module for managing UDP implementations",sysORIndex="7"} 1
sysORDescr{sysORDescr="The MIB modules for managing SNMP Notification, plus filtering.",sysORIndex="9"} 1
sysORDescr{sysORDescr="The SNMP Management Architecture MIB.",sysORIndex="1"} 1
sysORDescr{sysORDescr="The management information definitions for the SNMP User-based Security Model.",sysORIndex="3"} 1
sysORDescr{sysORDescr="View-based Access Control Model for SNMP.",sysORIndex="5"} 1
# HELP sysORID An authoritative identification of a capabilities statement with respect to various MIB modules supported by the local SNMP application acting as a command responder. - 1.3.6.1.2.1.1.9.1.2
# TYPE sysORID gauge
sysORID{sysORDescr="The MIB for Message Processing and Dispatching.",sysORID="1.3.6.1.6.3.11.3.1.1",sysORIndex="2"} 1
sysORID{sysORDescr="The MIB module for SNMPv2 entities",sysORID="1.3.6.1.6.3.1",sysORIndex="4"} 1
sysORID{sysORDescr="The MIB module for logging SNMP Notifications.",sysORID="1.3.6.1.2.1.92",sysORIndex="10"} 1
sysORID{sysORDescr="The MIB module for managing IP and ICMP implementations",sysORID="1.3.6.1.2.1.4",sysORIndex="8"} 1
sysORID{sysORDescr="The MIB module for managing TCP implementations",sysORID="1.3.6.1.2.1.49",sysORIndex="6"} 1
sysORID{sysORDescr="The MIB module for managing UDP implementations",sysORID="1.3.6.1.2.1.50",sysORIndex="7"} 1
sysORID{sysORDescr="The MIB modules for managing SNMP Notification, plus filtering.",sysORID="1.3.6.1.6.3.13.3.1.3",sysORIndex="9"} 1
sysORID{sysORDescr="The SNMP Management Architecture MIB.",sysORID="1.3.6.1.6.3.10.3.1.1",sysORIndex="1"} 1
sysORID{sysORDescr="The management information definitions for the SNMP User-based Security Model.",sysORID="1.3.6.1.6.3.15.2.1.1",sysORIndex="3"} 1
sysORID{sysORDescr="View-based Access Control Model for SNMP.",sysORID="1.3.6.1.6.3.16.2.2.1",sysORIndex="5"} 1
# HELP sysORLastChange The value of sysUpTime at the time of the most recent change in state or value of any instance of sysORID. - 1.3.6.1.2.1.1.8
# TYPE sysORLastChange gauge
sysORLastChange 34
# HELP sysORUpTime The value of sysUpTime at the time this conceptual row was last instantiated. - 1.3.6.1.2.1.1.9.1.4
# TYPE sysORUpTime gauge
sysORUpTime{sysORDescr="The MIB for Message Processing and Dispatching.",sysORIndex="2"} 34
sysORUpTime{sysORDescr="The MIB module for SNMPv2 entities",sysORIndex="4"} 34
sysORUpTime{sysORDescr="The MIB module for logging SNMP Notifications.",sysORIndex="10"} 34
sysORUpTime{sysORDescr="The MIB module for managing IP and ICMP implementations",sysORIndex="8"} 34
sysORUpTime{sysORDescr="The MIB module for managing TCP implementations",sysORIndex="6"} 34
sysORUpTime{sysORDescr="The MIB module for managing UDP implementations",sysORIndex="7"} 34
sysORUpTime{sysORDescr="The MIB modules for managing SNMP Notification, plus filtering.",sysORIndex="9"} 34
sysORUpTime{sysORDescr="The SNMP Management Architecture MIB.",sysORIndex="1"} 34
sysORUpTime{sysORDescr="The management information definitions for the SNMP User-based Security Model.",sysORIndex="3"} 34
sysORUpTime{sysORDescr="View-based Access Control Model for SNMP.",sysORIndex="5"} 34
# HELP sysObjectID The vendor's authoritative identification of the network management subsystem contained in the entity - 1.3.6.1.2.1.1.2
# TYPE sysObjectID gauge
sysObjectID{sysObjectID="1.3.6.1.4.1.8072.3.2.8"} 1
# HELP sysServices A value which indicates the set of services that this entity may potentially offer - 1.3.6.1.2.1.1.7
# TYPE sysServices gauge
sysServices 72
# HELP sysUpTime The time (in hundredths of a second) since the network management portion of the system was last re-initialized. - 1.3.6.1.2.1.1.3
# TYPE sysUpTime gauge
sysUpTime 356404
 

I need to snmpwalk on RockPi and see what shows up. Is this OID only good on RaspberryPi is what I wonder. I have RockPI. Different OID's?
1.3.6.1.2.1.* seems to be RPi OID range.
Platform Independent. FreeBSD and Linux.

Where does MIB/OID's come from? The SNMP Server that is used? The SNMP clients?
 
I thought I had it figured out but then I see this OID here from above:

Code:
1.3.6.1.2.1.25.1.7.0:public@raspi-3
That looks longer and then I see this OID that looks even longer in length:
Code:
1.3.6.1.2.1.25.2.3.1.6.1
I assume these octets are like MAC addresses for identifying data sources. I would like to discover the addressing scheme.
 
Google AI,

Common Network Interface OIDs
Standard OIDs for network traffic on Linux-based systems like Raspberry Pi follow the IF-MIB structure. Replace {index} with the specific interface ID (usually 2 for eth0 or 3 for wlan0 on a typical Pi).
Metric
OID (Numerical)OID Name
Interface Name.1.3.6.1.2.1.2.2.1.2.{index}ifDescr
Bytes Received.1.3.6.1.2.1.2.2.1.10.{index}ifInOctets
Bytes Sent.1.3.6.1.2.1.2.2.1.16.{index}ifOutOctets
Interface Speed.1.3.6.1.2.1.2.2.1.5.{index}ifSpeed
Operational Status.1.3.6.1.2.1.2.2.1.8.{index}ifOperStatus
 
Back
Top