snmp

display only value fields from the msg.payload in node red

白昼怎懂夜的黑 提交于 2019-12-12 00:05:30
问题 I am working on node red (SNMP). When I deploy, I have the output below: [ { "oid": "1.3.6.1.2.1.10.21.1.2.1.1.2.1.26", "type": 2, "value": 104 , "tstr": "Integer" }, { "oid": "1.3.6.1.2.1.10.21.1.2.1.1.2.2.27", "type": 2, "value": 104 , "tstr": "Integer" }, { "oid": "1.3.6.1.2.1.10.21.1.2.1.1.2.10.28", "type": 2, "value": 1 , "tstr": "Integer" }, { "oid": "1.3.6.1.2.1.10.21.1.2.1.1.2.11.29", "type": 2, "value": 1, "tstr": "Integer" }, { "oid": "1.3.6.1.2.1.10.21.1.2.1.1.2.12.30", "type": 2,

How to get Mac address of system using snmp?

最后都变了- 提交于 2019-12-11 23:29:02
问题 I am using snmpwalk for retrieve my system(localhost) or remote system's mac address and I am using this command: snmpwalk -v2c -c public localhost .1.3.6.1.2.1.2.2.1.6 and get an error like noSuchObject . How can I solve this error? Is there another way to get system mac address using snmp? 回答1: There is no such thing as "system MAC address". Systems do not have MAC addresses; network interfaces do, and a system may have zero, one, two or more network interfaces. That's why you use snmpwalk

Multiple snmp open port

拟墨画扇 提交于 2019-12-11 19:33:41
问题 I have a problem with SNMP. I connect to SNMP with PHP using this code: <?php $session = new SNMP(SNMP::VERSION_1, "xxx.xxx.xxx.xxx", "public"); $fulltree = $session->walk("."); print_r($fulltree); echo "<br>"; $session->close(); ?> The code works perfectly, it isn't the problem. The problem is can I have more IPs that I need connect with SNMP. I have a firewall (ZyWALL), and can have 4 printers. The problem occurs because I can set the 161 port only at one printer, and not at all. How I can

How does system fill MIB entries with Read-Only Access?

房东的猫 提交于 2019-12-11 19:15:16
问题 For managing the system configuration, we use MIB Management Systems in some form or the other, which may be C-structure based or Yang Module for data modeling. Now there are entries in the MIB which are marked as read-only, or not accessible for the manager i.e. Northbound Interfaces. The operational data is often kept in such entries, like system up-time etc. So, is the filling of data by the Device itself in these fields implementation specific or does the device also use GET/SET/TEST type

How to implement the SNMP protocol in ThingsBoard IoT platform?

℡╲_俬逩灬. 提交于 2019-12-11 18:31:49
问题 I am intend to use the SNMP agent to access values from a board, and visualise them in ThingsBoard dashboard. Have anyone an idea how to support that protocol in the ThingsBoard? 回答1: There is no SNMP support on Thingsboard. You will need to implement your own extension/adapter. You could either use one of Thingsboard API (mqtt, http, CoAp or mqtt-gateway). Or code your on extension directly inside Thingsboard IoT Gateway (Java). 来源: https://stackoverflow.com/questions/55212557/how-to

Multiple sub-agents for one table in Net-SNMP

冷暖自知 提交于 2019-12-11 15:22:36
问题 I'm writing a custom MIB to expose a table over SNMP. There will be one table with set columns, but a variable numbers of rows. Is it possible, with Net-SNMP , to add multiple rows to the table from multiple processes (e.g. process A creates row 1, process B creates row 2, etc...)? I would like to avoid having one "master sub-agent" if possible (other then something that is a part of Net-SNMP , like snmpd / snmptrapd /etc). I would like to use mib2c to help generate code if possible, but I

How to get the value of OID in Python using PySnmp

夙愿已清 提交于 2019-12-11 14:56:41
问题 Using snmpwalk I can get this from my device: OID=.1.3.6.1.4.1.5296.1.9.1.1.1.7.115.101.99.99.97.57.27.1.41 Type=OctetString Value=secca99 I tried this program in Python to get the value field from above OID: #!/usr/bin/env python3 from pysnmp.hlapi import * import sys def walk(host, oid): for (errorIndication, errorStatus, errorIndex, varBinds) in nextCmd(SnmpEngine(), CommunityData('public'), UdpTransportTarget((host, 161)), ContextData(), ObjectType(ObjectIdentity(oid))): if

SNMP Mapping Mac Address to Switch Port

本秂侑毒 提交于 2019-12-11 13:06:24
问题 I work at a datacenter and I'm in the process of writing a php tool that maps all of our devices and can tell us if what is out there is what is being billed for. It first pulls a huge list of macs and their ips from both of the cores into a temp table. Then, it loops through all of the racks* and attempts to find which port that mac belongs to. Since there is no golden command (cue lightbulb over your head), I have to: Create a multi-array with the port as the key and the ifindex for the

Using SNMP++ library in application written in Swift

笑着哭i 提交于 2019-12-11 11:27:11
问题 I'm new in Swift and I would like if someone could tell me how can I use SNMP++ lib (written in C++ ) in a simple iOS application written in Swift ? how to import the lib and begin coding? Thank You. 回答1: Objective-C can be mixed with C++. That's called Objective-C++ (.mm files) So if you can get the code into those files, in theory you can create a bridging header to deal with linking your swift files: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps

c# get page count for all printers with snmp

喜欢而已 提交于 2019-12-11 10:57:14
问题 I have a c# program that need to take the black, color, scan page counts (the total). I'm using at the moment SNMP with OID to get it but it is very difficult becuase each printer has its own OID. The problem is that each printer has its own MIB numbers to get the black,color,scan page counts. I'm looking for a generic solution that will work on most (if not all). Any thoughts and examples on how do I do that? 来源: https://stackoverflow.com/questions/14559727/c-sharp-get-page-count-for-all