Unix Technical Forum

Need To Build Custom MIB

This is a discussion on Need To Build Custom MIB within the AIX Operating System forums, part of the Unix Operating Systems category; --> My company has AIX servers and Linux servers. Now we're focusing on performance management of the AIX servers over ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 11:28 AM
Alfred
 
Posts: n/a
Default Need To Build Custom MIB

My company has AIX servers and Linux servers. Now we're focusing on
performance management of the AIX servers over SNMP.

It appears I need to make a custom MIB for an application-specific
value that I want to bring back over SNMP every 30 seconds. This is
because it's not served up by the existing MIB daemons. Can anyone
tell me the steps or point me to a web resource for that? I've googled
all day and only found that I'm supposed to do something with 'mosy'
to complete this whole process. However, I haven't found a tutorial on
how to use mosy from start to finish. Can you help me?

My background is that I sort of know a little C and Perl, and know
Bash fairly well, but I've mostly focused on Linux.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 11:29 AM
Frank Fegert
 
Posts: n/a
Default Re: Need To Build Custom MIB

Alfred wrote:
> My company has AIX servers and Linux servers. Now we're focusing on
> performance management of the AIX servers over SNMP.
>
> It appears I need to make a custom MIB for an application-specific
> value that I want to bring back over SNMP every 30 seconds. This is
> because it's not served up by the existing MIB daemons. Can anyone
> tell me the steps or point me to a web resource for that? I've googled
> all day and only found that I'm supposed to do something with 'mosy'
> to complete this whole process. However, I haven't found a tutorial on
> how to use mosy from start to finish. Can you help me?
>
> My background is that I sort of know a little C and Perl, and know
> Bash fairly well, but I've mostly focused on Linux.


As for getting application-specific values you need to tell what
application you're exactly using. As for an easy way to extend your
SNMP-Agent, take a look at:

http://net-snmp.sourceforge.net/docs...nmpd.conf.html

especially the "EXTENDING AGENT FUNCTIONALITY" paragraph. Depending
on what SNMP-Agent and version you're running on your AIX systems,
you might find, that only 'exec' or 'extend' works.
We're running mostly 'pass' and 'pass_persist' and it does the job
quite well. The main difference between 'exec'/'extend' vs. 'pass'/
'pass_persist' is, that you'll have to put more logic into your agent-
side scripts with 'pass'/'pass_persist', but your output will be in
a reliable format (if it's multiline output). 'exec'/'extend' are
easier to implement, but the order of multiline script output is
likely to change over SNMP-Agent restarts.
Another thing you need to consider is performance of your extension
scripts. All data collection, parsing and formating must be done
well within the timeout value of your snmpget/snmpwalk command. If
you're parsing extensive logfiles to gather your application values,
you might be better off to delegate this part to a cronjob, write
the results into a (much smaller) value-output file and read from
there with your SNMP extension script.

Hope this helps ;-)

Regards,

Frank
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 11:29 AM
Alfred
 
Posts: n/a
Default Re: Need To Build Custom MIB

On Mar 23, 3:25 am, Frank Fegert <fra.nospam...@gmx.de> wrote:
> As for getting application-specific values you need to tell what
> application you're exactly using. As for an easy way to extend your
> SNMP-Agent, take a look at:
>
> http://net-snmp.sourceforge.net/docs...nmpd.conf.html
>
> especially the "EXTENDING AGENT FUNCTIONALITY" paragraph. Depending
> on what SNMP-Agent and version you're running on your AIX systems,
> you might find, that only 'exec' or 'extend' works.
> We're running mostly 'pass' and 'pass_persist' and it does the job
> quite well. The main difference between 'exec'/'extend' vs. 'pass'/
> 'pass_persist' is, that you'll have to put more logic into your agent-
> side scripts with 'pass'/'pass_persist', but your output will be in
> a reliable format (if it's multiline output). 'exec'/'extend' are
> easier to implement, but the order of multiline script output is
> likely to change over SNMP-Agent restarts.
> Another thing you need to consider is performance of your extension
> scripts. All data collection, parsing and formating must be done
> well within the timeout value of your snmpget/snmpwalk command. If
> you're parsing extensive logfiles to gather your application values,
> you might be better off to delegate this part to a cronjob, write
> the results into a (much smaller) value-output file and read from
> there with your SNMP extension script.


Very informative. Thanks. Say, will this work on AIX? I sort of half-
own my AIX servers and the corporate office won't let me put net-snmp
on them. I can only put net-snmp on SLES9 Linux because that's what
comes with it. Instead, they want me to standardize on the AIX
proprietary SNMP. This comes with snmpinfo set/get/dump + the 'mosy'
command, and has about 5 daemons in total to make SNMP work. It's so
weird -- even the UCD MIBs are not part of the package. I've got SNMP
working and I'm pulling back proper data, but I then need to create my
own MIB/OID so that I can return application-specific stuff. The app
vendor doesn't have SNMP hookup, so I have to write something myself.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 11:33 AM
Alfred
 
Posts: n/a
Default Re: Need To Build Custom MIB

On Mar 23, 2:46 pm, "Alfred" <9...@myway.com> wrote:
> Very informative. Thanks. Say, will this work on AIX? I sort of half-
> own my AIX servers and the corporate office won't let me put net-snmp
> on them. I can only put net-snmp on SLES9 Linux because that's what
> comes with it. Instead, they want me to standardize on the AIX
> proprietary SNMP. This comes with snmpinfo set/get/dump + the 'mosy'
> command, and has about 5 daemons in total to make SNMP work. It's so
> weird -- even the UCD MIBs are not part of the package. I've got SNMP
> working and I'm pulling back proper data, but I then need to create my
> own MIB/OID so that I can return application-specific stuff. The app
> vendor doesn't have SNMP hookup, so I have to write something myself.


I just wanted to say that I finally found a solution thanks to Dr.
John Tesch at IBM (Texas). He showed me that there's a sample "smux"
daemon that I can compile and customize in C. It's on the hard drive
with AIX 3.5 in /usr/samples/snmpd/smux/sampled. However, it's
designed for IBM's $3500 Visual Age C++ compiler. However, he and I
figured out we could rework it a little to get it to compile with the
GCC compiler. We also found we couldn't get it to work unless we
migrated from SNMP v1 to SNMP v3, which is a single command
'snmpv3_ssw -n', and then edited /etc/snmpdv3.conf file to make the
community read-write and add in a line about smux and sampled. This is
described in the README and the snmpdv3.conf file itself. It took
about 2 weeks of work to get it going. Now I have 25 custom OIDs that
I can read/write string data to and then pick up via an SNMP browser
remotely. We read/write to this data using a Bash script and doing
'snmpinfo -v -m set customOID1.0="test"' and 'snmpinfo -v -m get
customOID1.0'.

If you're wanting to reach Dr. John, he has a public wiki and a blog
at:

Blog: http://www-128.ibm.com/developerwork....jspa?blog=750
Wiki: http://www-941.ibm.com/collaboration...WikiPtype/Home

I imagine in some cases certain fees may apply if you need to use his
consulting time.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com