snmp

snmp: correct behavior when only part of a table index is given?

Assume a MIB contains a table indexed by MAC address. What's the correct behavior by the agent when a manager requests myTable.0.1? This is an incomplete index. Some possibilities that I see: Return the first row in the table -- treat this partial index as coming before the first row. Treat this as a subtree -- return rows in the tabl...

How to get the average CPU/Processor Usage of a computer?

Right now I'm working on a program with PHP and Perl to read the computer's system data and we have been using SNMP to collect data (or rather, forced to). After retrieving the data, we were supposed to store the data in a database and then use the data to plot out a line graph. At the moment, I'm using this perl script to retrieve the ...

Why is SNMP usually run over UDP and not TCP/IP?

This morning, there were big problems at work because an SNMP trap didn't "go through" because SNMP is run over UDP. I remember from the networking class in college that UDP isn't guaranteed delivery like TCP/IP. And Wikipedia says that SNMP can be run over TCP/IP, but UDP is more common. I get that some of the advantages of UDP over TC...

net-snmp: force table to have xxEntry value of 2 instead of 1

Using net-snmp, table code generated by mib2c -c mib2c.iterate.conf fooBarTable and then heavily hacked. Unfortunately the table is defined with an Entry of 2 instead of the normal 1. (I didn't do this, I'm trying to make this fit into an existing situation.) The MIB looks something like this: fooBarTable OBJECT-TYPE SYNTAX ...

Programmatically Enable/Disable Port on Network Switch

Greetings! I am trying to find a way in Java to programmatically enable/disable a port on a network switch over SNMP. I tried using SNMP4J but couldn't get much help on the mailing list on how to use it. I'm not too concerned what library is used (open source vs commercial) as long as it gets the job done. The switch I am trying to w...

Use SNMP to transfer file from agent to manager?

I want invoke my .NET assembly from snmp agent and return an XML document to the agent in order to transmit that XML file to the server (manager). Can I use SNMP to transmit big files to the manager? ...

C# WMI code to calculate freespace and drivespace on a Mount Point, on Windows server 2008

I have found plenty of information on how to look at physical drives but I need to monitor several mount points on my physical drives. I would prefer to do this through wmi but any .NET objects that could do it would be fine as well. ...

PHP MIB to OID resolve

I'm googling around for a couple of days, and can't find clear method/lib for resolving OID from MIB name, and MIB from OID. I've found few sites that have a large MIB database, search functions ie. but communicate with them needs cURL/socket connectivity and regexp of results (or eval in some cases) I've tried to parse MIB files mysel...

Sample Code for Remote Process/Application Monitoring

All I am looking for a bit of inspiration here, a client has requested me to build a simple remote process monitoring application with capability for smtp notification, when monitored processes go down or come back on-line. Can anyone point me in the direction of some sample code to get me started. I have briefly looked at .net remot...

Zenoss need to get freespace threshold and alerts on windows "mount points"

I have a WMI query that will give me all the data I need to do this but I can't figure out how to get this working in Zenoss. I know I need to set data points and a threshold, and optionaly a graph. The problem is examples of how to do this with WMI are few and very confusing. Could anyone atleast point me to documention on how to do thi...

Generate SNMP traps with PHP

I'm desperately searching for a way to generate SNMP traps from PHP. I know the build in methods to use snmpget but I was not able to figure out how to send SNMP traps. Does anybody know a class / code snippet for it? Searching the web did not bring up anything other than using exec to call cli tools which is definately no option for me...

SNMP Subagent Development

Hi I am a newbie to Net-SNMP, I want to implement a Subagent using Net-SNMP on windows which will provide the information about my server statistics like calls processed, calls failed etc. I did the Net-SNMP installation as provided by http://forums.cacti.net/viewtopic.php?f=6&t=26151 and trying to compile the example given on the ...

Can I run php script in background mode?

Now, I am developing an SNMP webserver and I want to get the data from MIB in the Windows to insert in the MySql data base. I use SNMP connection which provide in PHP, so I want my php script always run and no interface in the background for updating the database. Can I do like this or there are the better way to do. Please, help me. ...

How to query snmp trap through system floating IP?

I have written a snmp-agent, and it can run in system (rhel5). By querying oid from snmp client, it will get snmp trap. But my problem is: if there are two servers(one is stand-by system, one is active system),If I query snmp trap by floating IP, I will get no snmp trap. That is, I have to query by the true(active) IP, not floating IP....

question about SNMP MIB file

hi there i wanna know how can i create a new customize MIB file ? i wanna create a MIB file and use it in LINUX that with this mib i wanna monitor an application please help me thanks ...

SNMP monitoring of MBeans (attributes.xml in snmp-adaptor.sar) (JBoss)

I want to monitor (via SNMP) some attributes of several JBoss MBeans that are running on my system: I have configured my attributes.xml unders snmp-adaptor.sar to include: <mbean name="jboss.ha:service=HASingletonDeployer"> <attribute name="MasterNode" oid=".1.2.3.4.1.22"/> <attribute name="PartitionName" oid=".1.2.3...

Resetting all global internal state of the net-snmp library from the Python bindings

I'm trying to create automated integration tests for this hardware+software test subject which runs a SNMP agent as it's command interface. Our test setup looks like this: We're using Fitnesse as a test runner and PyFit to be able to write the tests in Python. We then use netsnmp with Python bindings to send SNMP commands. This works pre...

Java DMK - mibgen - how to generate MBean classes and preserving implementation changes in the old classes that have been made?

This seems like a common problem, so I hope someone can tell me how to best solve or work around it. I am using the mibgen tool that comes with OpenDMK to generate MBean classes from an SNMP MIB file. The tool works perfectly fine. However, the problem I am having is when I need to regenerate the MBean classes because the MIB definiti...

SNMP GetBulk command

hi all, i would like to know whether i can use the getbulk command with SNMPv1. If yes please let me know its adv... in no then what are the drawbacks. Thanks in advance. Uday. ...

SNMP: Trying to understand what Alarm and Alarm Reporting Control Management Information base are used for

I am new to SNMP and have troubles understanding the SNMP requirements of a Java application I am required to implement. I am using openDMK to provide the SNMP support. Please excuse any brutal ignorance in my questions. I have read the RFC specs, but most of the text appear to be gibberish to me. One requirement is that "SNMP suppor...