Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6624915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:42:39+00:00 2026-05-25T21:42:39+00:00

I’m looking for a Management Information Base (MIB) designed for web applications (Note: I’m

  • 0

I’m looking for a Management Information Base (MIB) designed for web applications (Note: I’m working in PHP) that I can send multiple variables to my Network Management System via an SNMP Trap. Do I have to design one or is there a solution out there already?

More details:

Basically I want to send a trap to my Network Management System (Zenoss) whenever there is an error on my web application. I would like to call it in PHP like the following (note: this syntax might not be correct):

(Note: obviously, BOSSJONES-NOTIFICATION does not exist; I’m just using it for this example. I’d like to replace it with the MIB I’m looking for, or the one that needs to be designed.)

<?php
const SNMPTRAP = '/usr/bin/snmptrap';
$host = 'zenoss.bossjones.com';

if ( some_random_error() ) {
    exec( SNMPTRAP . ' -v 2c -c public -L e ' . $host .
          ' "" BOSSJONES-NOTIFICATION::snmpErrorNotification' .
          ' device s "192.168.1.121" errorType s "image upload fail"' .
          ' errorCode i 340 errorMessage s "Could not upload image at path' .
          ' /path/to/image/blah.gif" ' );
}

I understand that the MIB might not have the same parameters, of course, but I’m wondering if theres a general solution out there that I can either “make do with” or learn from, so that I can create my own that works for my purposes?

Also, is it possible to send a list of info (like an array) rather than just multiple strings via a trap?

Sorry for the long question. Wanted to provide as much details as possible.

(PS: Running on a Ubuntu 11.04 Linux box)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:42:40+00:00Added an answer on May 25, 2026 at 9:42 pm

    I wouldn’t worry about a MIB at this point in your app, since what you’re doing is lightweight and not public. A MIB is just a data structure/schema that tells the public who uses your SNMP product, what those Traps are, etc. If you’re going to be using it only for yourself, I wouldn’t worry about a MIB. I’d suggest just using the PHP SNMP module to kickoff any SNMP Traps you want to do with whatever OIDs aren’t previously being used by you and then make sure that your network management software knows what those OIDs mean. When your NMS gets those SNMP traps with the OID varbinds, then you’ll know what those variables are, etc. let me know how it goes.

    PHP SNMP

    For your second question, you can’t send an array of traps at once. SNMP is so lightweight though, that this shouldn’t matter for you. What I would do if you have an array of traps, is just do a foreach loop or something iterative, and just go through your array and send out the traps one at a time, where you give a unique OID for each trap so that your NMS knows what trap string is for what OID, so that it gets properly interpreted on the NMS side.

    SNMP is a very wonderful protocol, but very esoteric. Be well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.