[HOWTO] Expand AIX SNMP and Configuring Private Communities

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

[HOWTO] Expand AIX SNMP and Configuring Private Communities

Post by knobdy »

This is going to be pretty short and can be expanded upon on an as-needed basis, not sure how much support
I'll be able to provide as I'm not an AIX admin but this has worked for me (and Rony will hopefully provide us with a much needed template for Disk IO information via SNMP)
[IF THERE ARE ERRORS IN THIS HOW-TO SEND CORRECTIONS TO ME VIA A PRIVATE MESSAGE - this will allow me to keep this how-to as clean as possible. Support questions, naturally, should be dealt with publicly]

This is only known to work on very late versions of AIX, my systems are:

Code: Select all

# oslevel -s
5300-05-04
[/b]

Verify that snmpd points to snmpdv3ne:

Code: Select all

# which snmpd
/usr/sbin/snmpd

# ls -altr /usr/sbin/snmpd
lrwxrwxrwx   1 root     system            9 Apr 12 2005  /usr/sbin/snmpd -> snmpdv3ne
Edit /etc/inittab
Change:

Code: Select all

xmdaily:2:once:/usr/bin/xmwlm -L 2>&1 >/dev/null # Start xmwlm daily recording
to

Code: Select all

: xmdaily:2:once:/usr/bin/xmwlm -L 2>&1 >/dev/null # Start xmwlm daily recording
topasrec:2:once:/usr/bin/topas -R 2>&1 >/dev/null # Start topas recording
Reload the inittab:

Code: Select all

init q
Edit /etc/inetd.conf

Code: Select all

xmquery dgram   udp     wait    root    /usr/bin/xmtopas xmtopas -p3
Refresh the inetd subsystem:

Code: Select all

refresh -s inetd
Edit /etc/snmpd.peers

Code: Select all

"gated"     1.3.6.1.4.1.2.3.1.2.1.2    "gated_password"
"dpid2"     1.3.6.1.4.1.2.3.1.2.2.1.1.2 "dpid_password"
"muxatmd" 1.3.6.1.4.1.2.3.1.2.3.1.1 "muxatmd_password"
"xmservd"   1.3.6.1.4.1.2.3.1.2.1.3   "xmservd_pw"
Edit /etc/snmpdv3.conf (these changes should also provide a more secure snmpd environment and allow for snmp v2c access by
changing "$private" to a community name of your choosing; views may or may not be valid on yours or any system; spacing
of values has been discussed on various sites, in mine they are deliberate tabs but you may need to use a space)

Code: Select all

VACM_GROUP group1 SNMPv1  public  -
VACM_GROUP group1 SNMPv1  $private -
VACM_GROUP group1 SNMPv2c  $private  -

VACM_VIEW defaultView 1.3.6.1.4.1.2 - included -
VACM_VIEW defaultView 1.3.6.1.4.1.2.2 - included -
VACM_VIEW defaultView 1.3.6.1.4.1.2.3 - included -
VACM_VIEW defaultView 1.3.6.1.4.1.2.5 - included -
VACM_VIEW defaultView 1.3.6.1.4.1.2.6 - included -
VACM_VIEW defaultView        internet         - included -
VACM_VIEW defaultView        directory                   - included -
VACM_VIEW defaultView        mgmt                   - included -
VACM_VIEW defaultView        mib-2                   - included -
VACM_VIEW defaultView        system                   - included -
VACM_VIEW defaultView        aix                   - included -
VACM_VIEW defaultView        xmd                   - included -
VACM_VIEW defaultView        ibm                   - included -
VACM_VIEW defaultView        ibmAgents                   - included -

# exclude snmpv3 related MIBs from the default view
VACM_VIEW defaultView        snmpModules      - included -
VACM_VIEW defaultView        1.3.6.1.4          - included -
VACM_VIEW defaultView        1.3.6.1.6          - included -   

# exclude aixmibd managed MIBs from the default view
VACM_VIEW defaultView 1.3.6.1.4.1.2.6.191 - included -
VACM_VIEW defaultView 1.3.6.1.6.3.1.1.5   - included -
VACM_VIEW defaultView 1.3.6.1.4.1.2021 - included -
VACM_VIEW defaultView 1.3.6.1.4.1.2.3.1.2.2.2.1.4 - included -

VACM_ACCESS  group1 - - noAuthNoPriv SNMPv1  defaultView - defaultView -
VACM_ACCESS  group1 - - noAuthNoPriv SNMPv2c  defaultView - defaultView -

NOTIFY notify1 traptag trap -

TARGET_ADDRESS Target1 UDP 127.0.0.1 traptag trapparms1 - - -

TARGET_PARAMETERS trapparms1 SNMPv1  SNMPv1  public  noAuthNoPriv -

COMMUNITY public public noAuthNoPriv 127.0.0.1 255.255.255.255  -
COMMUNITY public public noAuthNoPriv <local IP address> 255.255.255.255  -
COMMUNITY public public noAuthNoPriv <local IP address #2, if dual-homed> 255.255.255.255 -
COMMUNITY $private $private noAuthNoPriv <IP address of Cacti server or management network - change mask accordingly> 255.255.255.0 -

DEFAULT_SECURITY no-access - -

logging         file=/usr/tmp/snmpdv3.log       enabled
logging         size=0                          level=0

smux   1.3.6.1.4.1.2.3.1.2.1.2   gated_password  # gated
snmpd smuxtimeout=200 #muxatmd
smux   1.3.6.1.4.1.2.3.1.2.3.1.1   muxatmd_password #muxatmd
smux   1.3.6.1.4.1.2.3.1.2.1.3   xmservd_pw   #xmservd
smux   1.3.6.1.4.1.2.3.1.2.2.1.1.2   dpid_password   #dpid
Create the xmservd.res file for xmtopas to talk via smux:

Code: Select all

echo "dosmux" > /usr/lpp/perfagent/xmservd.res
Stop your snmp agents:

Code: Select all

stopsrc -s snmpd;stopsrc -s dpid2;stopsrc -s aixmibd;stopsrc -s hostmibd;stopsrc -s snmpmibd
Start the snmp agents. Order is important:

Code: Select all

startsrc -s snmpd;startsrc -s dpid2;startsrc -s aixmibd;startsrc -s hostmibd;startsrc -s snmpmibd
Start the topas monitor ("-C" will make sure that xmtopas is ran as a background process; "nohup" will disconnect it from your terminal; "&" runs topas in the background).

Code: Select all

nohup topas -C &
List all processes containing "top" and find the pid for "xmtopas -p3".

Code: Select all

ps -ef | grep top
Send an interrupt signal to the process, which will create "/etc/perf/xmservd.mib".

Code: Select all

kill -2 <xmtopas pid>
Might be a good idea to backup this file, trust me.

Code: Select all

cp /etc/mib.defs /etc/mib.defs.bak
Edit /etc/perf/xmservd.mib
Change:

Code: Select all

xmdNFSV3ClntReaddir+ OBJECT-TYPE
to

Code: Select all

xmdNFSV3ClntReaddirplus OBJECT-TYPE
and

Code: Select all

xmdNFSV3SvrReaddir+ OBJECT-TYPE
to

Code: Select all

xmdNFSV3SvrReaddirplus OBJECT-TYPE
Compile the new MIB file in an AIX suitable form.

Code: Select all

mosy -o /tmp/mib.defs /etc/perf/xmservd.mib
Append the new OIDs to the original mib.defs file.

Code: Select all

cat /tmp/mib.defs >> /etc/mib.defs
Stop your snmp agents:

Code: Select all

stopsrc -s snmpd;stopsrc -s dpid2;stopsrc -s aixmibd;stopsrc -s hostmibd;stopsrc -s snmpmibd
Start the snmp agents. Order is important:

Code: Select all

startsrc -s snmpd;startsrc -s dpid2;startsrc -s aixmibd;startsrc -s hostmibd;startsrc -s snmpmibd
Kill all processes related to topas and xmtopas, then start topas again with the "-C" option.
With topas still running you should now be able to walk those new OIDs (http://www.oidview.com/mibs/2/XMSERVD-PERF-MIB.html)
from your Cacti Server. You do NOT need topas running in order to have this access, but xmtopas is a must (in other
words, now that you have verified you can see those OIDs you may press "q" on your AIX server and exit topas).

[Author is still unsure of how to get xmtopas to load after a reboot - as of right now you must re-run topas -C after bootup]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

The entry in inittab for 'topas -R' will start xmtopas on startup.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

rony wrote:The entry in inittab for 'topas -R' will start xmtopas on startup.
I thought it would to - I thought that's the reason for having it in the inittab :lol: - but it didn't come up on my test system...perhaps I just didn't give it enough time.

Have you tried it? I wrote this doing one machine and have since done two more following this exactly. No problems. Looking forward to that template!
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

ping

I always knew we were cutting edge... :(
cdc
Posts: 2
Joined: Wed Feb 14, 2007 4:45 pm

Post by cdc »

Switching SNMPDv In AIX 5.2

Problem
How can I change the SNMP protocol that AIX 5.2 uses?

Solution
Run the following command to switch the SNMP version from the default version 3 back to version 1:

snmpv3_ssw -1

From version 1 to version 3 (encrypted):

snmpv3_ssw -e

From version 1 to version 3 (non-encrypted)

snmpv3_ssw -n

(The snmpv3_sw command also works in the latest level of AIX5L 5.3)
Last edited by cdc on Wed Feb 14, 2007 5:21 pm, edited 1 time in total.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Have you tried this how-to? Gotten those OIDs to work?

Rony is pretty busy, I think, and might not have a 5.3 server to use for building a template - we'd really like some I/O performance data! :)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I have lots of 5.3 servers, but unfortunately I haven't found the time to make them at work. They are on my project list for work, as they will be useful, but I don't know when I will get them done.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
cdc
Posts: 2
Joined: Wed Feb 14, 2007 4:45 pm

Post by cdc »

I found this thread while doing a Google search on how to get memory utilization statistics collection to work with SolarWinds Orion Network Performance Monitor.

We had previously ran Cacti with our Nagios box, but it was only as a test case ... nothing too fancy (very basic, in fact.)

Now, we are moving towards Orion NPM.

Sorry, but I am unable to confirm this how-to with Cacti. I just figured I would add a little info on how to quickly change versions of SNMP in AIX by using one of the OS commands, instead of relinking binaries. :(
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

rony wrote:I have lots of 5.3 servers, but unfortunately I haven't found the time to make them at work. They are on my project list for work, as they will be useful, but I don't know when I will get them done.
Completely understood - and as it happens I have gotten a new job, in two weeks I'll be working on Solaris and no more AIX. However, the group I'm leaving would still love to see these graphs - so when you do get the time, they'll still be much appreciated.
madunix
Posts: 13
Joined: Sun Apr 10, 2005 8:58 am

Post by madunix »

i used the above to monitor my AIX 5.3
bash-3.00# uname -a
AIX prod1 3 5 00CF81CF4C00
bash-3.00# oslevel -s
5300-07-00-0000
bash-3.00# instfix -i | grep -i ML
All filesets for 5.3.0.0_AIX_ML were found.
All filesets for 5300-01_AIX_ML were found.
All filesets for 5300-02_AIX_ML were found.
All filesets for 5300-03_AIX_ML were found.
All filesets for 5300-04_AIX_ML were found.
All filesets for 5300-05_AIX_ML were found.
All filesets for 5300-06_AIX_ML were found.
All filesets for 5300-07_AIX_ML were found.

I used the following on cacti snmp with v2 ...
I can monitor the volume group but cant see the monitor of the CPU usage any help.
HPL1706
Posts: 5
Joined: Tue Nov 18, 2008 12:00 am
Location: Philippines
Contact:

Configuring AIX .5.2 with Cacti

Post by HPL1706 »

Hi Cacti Gurus,

I was wondering if you can help me with my problem in Cacti. I am new with Cacti and AIX. I would like to seek your assistance / expertise regarding this. If you can provide me a Procedure on How to enable Cacti to a AIX5.2 version in a pSeries server. Example: configuring snmp, peers, etc...

Hope you can help me...

thanks a lot.

HPL1706
andyfb
Posts: 2
Joined: Fri Nov 28, 2008 5:48 am

Post by andyfb »

Are you using Standard Templates to paint to graphs in Cacti or do you need special ones?
If so, can you please attach them to your post?

Thank you!
HPL1706
Posts: 5
Joined: Tue Nov 18, 2008 12:00 am
Location: Philippines
Contact:

Post by HPL1706 »

Greetings CACTI Gurus...

What about AIX 5.2. Thus this applies also?
I have tried editing the snmpd.conf but I still can't include my AIX 5.2 server to be monitored by Cacti...

Hope you can also post here Step by Step Procedure.

Thanks
Pierre-Henri
Posts: 1
Joined: Thu Jun 17, 2010 2:56 am
Location: France

Post by Pierre-Henri »

When an AIX device has more than 8 processors with 2 cores/processor, only 5 processors are shown. I've run the following command to check if it's a snmp problem :

snmpwalk -v1 -c public 192.168.***.*** .1.3.6.1.4.1.2.6.191.1.1(AixProcessorName OID)


But the return is still 5 rows : proc00 proc02 proc04 proc06 proc08

I think the problem is from the snmp configuration on the AIX host.

Does anyone have an idea to fix that?
(Sorry for my english)
ejohnston1
Posts: 1
Joined: Mon May 07, 2012 10:59 am

Re: [HOWTO] Expand AIX SNMP and Configuring Private Communit

Post by ejohnston1 »

When I am supposed to kill the process to create the "/etc/perf/xmservd.mib" it fails to kill the process. The os level I am working on is 6100-06-05-1115
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests