Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[HOWTO] Expand AIX SNMP and Configuring Private Communities

 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Wed Jan 10, 2007 5:41 pm    Post subject: [HOWTO] Expand AIX SNMP and Configuring Private Communities Reply with quote

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:
# oslevel -s
5300-05-04


Verify that snmpd points to snmpdv3ne:
Code:
# 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:
xmdaily:2:once:/usr/bin/xmwlm -L 2>&1 >/dev/null # Start xmwlm daily recording

to
Code:
: 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:
init q


Edit /etc/inetd.conf
Code:
xmquery dgram   udp     wait    root    /usr/bin/xmtopas xmtopas -p3


Refresh the inetd subsystem:
Code:
refresh -s inetd


Edit /etc/snmpd.peers
Code:
"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:
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:
echo "dosmux" > /usr/lpp/perfagent/xmservd.res


Stop your snmp agents:
Code:
stopsrc -s snmpd;stopsrc -s dpid2;stopsrc -s aixmibd;stopsrc -s hostmibd;stopsrc -s snmpmibd


Start the snmp agents. Order is important:
Code:
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:
nohup topas -C &


List all processes containing "top" and find the pid for "xmtopas -p3".
Code:
ps -ef | grep top


Send an interrupt signal to the process, which will create "/etc/perf/xmservd.mib".
Code:
kill -2 <xmtopas pid>


Might be a good idea to backup this file, trust me.
Code:
cp /etc/mib.defs /etc/mib.defs.bak


Edit /etc/perf/xmservd.mib
Change:
Code:
xmdNFSV3ClntReaddir+ OBJECT-TYPE

to
Code:
xmdNFSV3ClntReaddirplus OBJECT-TYPE

and
Code:
xmdNFSV3SvrReaddir+ OBJECT-TYPE

to
Code:
xmdNFSV3SvrReaddirplus OBJECT-TYPE


Compile the new MIB file in an AIX suitable form.
Code:
mosy -o /tmp/mib.defs /etc/perf/xmservd.mib


Append the new OIDs to the original mib.defs file.
Code:
cat /tmp/mib.defs >> /etc/mib.defs


Stop your snmp agents:
Code:
stopsrc -s snmpd;stopsrc -s dpid2;stopsrc -s aixmibd;stopsrc -s hostmibd;stopsrc -s snmpmibd


Start the snmp agents. Order is important:
Code:
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]
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5453
Location: Wisconsin, USA

PostPosted: Wed Jan 10, 2007 5:49 pm    Post subject: Reply with quote

The entry in inittab for 'topas -R' will start xmtopas on startup.
Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Thu Jan 11, 2007 10:04 am    Post subject: Reply with quote

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 - 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!
Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Tue Feb 06, 2007 10:33 am    Post subject: Reply with quote

ping

I always knew we were cutting edge...
Back to top
cdc



Joined: 14 Feb 2007
Posts: 2

PostPosted: Wed Feb 14, 2007 4:50 pm    Post subject: Reply with quote

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
Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Wed Feb 14, 2007 5:00 pm    Post subject: Reply with quote

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!
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5453
Location: Wisconsin, USA

PostPosted: Wed Feb 14, 2007 5:05 pm    Post subject: Reply with quote

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.
Back to top
cdc



Joined: 14 Feb 2007
Posts: 2

PostPosted: Wed Feb 14, 2007 5:18 pm    Post subject: Reply with quote

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.
Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Thu Feb 15, 2007 12:34 pm    Post subject: Reply with quote

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.
Back to top
madunix



Joined: 10 Apr 2005
Posts: 13

PostPosted: Thu Feb 28, 2008 2:34 pm    Post subject: Reply with quote

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.
Back to top
HPL1706



Joined: 18 Nov 2008
Posts: 2
Location: Philippines

PostPosted: Wed Nov 19, 2008 11:38 pm    Post subject: Configuring AIX .5.2 with Cacti Reply with quote

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
Back to top
andyfb



Joined: 28 Nov 2008
Posts: 2

PostPosted: Fri Nov 28, 2008 5:51 am    Post subject: Reply with quote

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!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group