AIX Host Template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

AIX Host Template

#1 Post by rony » Fri Jan 14, 2005 2:41 pm

Attached is a AIX Host template that I have been working on. It uses SNMP and AIX specific Enterprise MIB 2.6.191.

If you want to use this, you will need to enable access to the MIB and be running the aixmibd subagent for snmpd.

The following configuration in the /etc/snmpd.conf or /etc/snmpdv3.conf file will enable the enterprise MIB.

Code: Select all

VACM_VIEW defaultView 1.3.6.1.4.1.2.6.191  -  include - 
I recommend a more restricted view or use SNMPv3, but this configuration will let you get running right away.

Attached are the host template with all dependancies that you can import. Also included are the required xml files for the data queries.

Edit: 1-19-2005 - Removed attachment.
Last edited by rony on Wed Jan 19, 2005 12:10 pm, edited 1 time in total.
[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]

pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

#2 Post by pbulteel » Mon Jan 17, 2005 6:18 am

I can't seem to import the file. I don't get any errors either... Maybe I'm missing something (php-xml or something.) I'll have to check since this is the first template I import on this cacti environment.

-P
uname -a

pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

#3 Post by pbulteel » Mon Jan 17, 2005 11:13 am

Well, I was able to import a different template without any problems... Anyone know what I might be missing?

-P
uname -a

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#4 Post by rony » Mon Jan 17, 2005 10:47 pm

Can you post the import screen?

I might have some dependancies I need to fix in the template.
[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]

pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

#5 Post by pbulteel » Tue Jan 18, 2005 10:59 am

Well, the import screen look just like... the import screen. =)

What version of Cacti are you on?

I'll post the screenshot in a minute...

-P
uname -a

pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

#6 Post by pbulteel » Wed Jan 19, 2005 4:44 am

Well, so much for "in a minute" - here are the screenshots. First one is with the selection box open. I then click save and get the 2nd selection box.

i.e. nothing happens - and I don't get any error messages.

The templates that I DID import were the ones for apache-stats.

-P

I just noticed after pressing preview that the images are in reverse order, even though I attached them to the message in the correct order.
Attachments
capture-1.jpg
Selecting the xml to import.
capture-1.jpg (77.89 KiB) Viewed 88918 times
capture-2.jpg
Result AFTER pressing save. Nothing happens - no error messages are displayed. (will check apache log files...)
capture-2.jpg (86.94 KiB) Viewed 88918 times
uname -a

pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Updated to 0.8.6.c

#7 Post by pbulteel » Wed Jan 19, 2005 5:47 am

Ok - for starters, I tried using another template which caused the same error, so I upgraded to 0.8.6c. That worked for those templates, but... not completely for these.

Aparently there are unmet dependencies.

Code: Select all

Data Template
[success] AIX Volume Group [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Unmet Dependency: (Data Input Field) Output Type ID
   + Unmet Dependency: (Data Input Field) Index Value
   + Unmet Dependency: (Data Input Field) Index Type
   + Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
   + Unmet Dependency: (Data Input Field) SNMP Password (v3)
   + Unmet Dependency: (Data Input Field) SNMP Username (v3)
   + Unmet Dependency: (Data Input Field) SNMP Community
   + Unmet Dependency: (Data Input Field) SNMP IP Address
[success] AIX Physical Volume [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Unmet Dependency: (Data Input Field) Output Type ID
   + Unmet Dependency: (Data Input Field) Index Value
   + Unmet Dependency: (Data Input Field) Index Type
   + Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
   + Unmet Dependency: (Data Input Field) SNMP Password (v3)
   + Unmet Dependency: (Data Input Field) SNMP Username (v3)
   + Unmet Dependency: (Data Input Field) SNMP Community
   + Unmet Dependency: (Data Input Field) SNMP IP Address
[success] AIX Paging Volume [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Unmet Dependency: (Data Input Field) SNMP Username (v3)
   + Unmet Dependency: (Data Input Field) SNMP Community
   + Unmet Dependency: (Data Input Field) SNMP IP Address
   + Unmet Dependency: (Data Input Field) SNMP Password (v3)
   + Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
   + Unmet Dependency: (Data Input Field) Index Type
   + Unmet Dependency: (Data Input Field) Index Value
   + Unmet Dependency: (Data Input Field) Output Type ID
[success] AIX File System [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Unmet Dependency: (Data Input Field) Output Type ID
   + Unmet Dependency: (Data Input Field) Index Value
   + Unmet Dependency: (Data Input Field) Index Type
   + Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
   + Unmet Dependency: (Data Input Field) SNMP Password (v3)
   + Unmet Dependency: (Data Input Field) SNMP Username (v3)
   + Unmet Dependency: (Data Input Field) SNMP Community
   + Unmet Dependency: (Data Input Field) SNMP IP Address

Graph Template
[success] AIX Volume Group Statistics [update]
   + Found Dependency: (Data Template Item) aixVgCurNumLVs
   + Unmet Dependency: (GPRINT Preset) Exact Numbers
   + Found Dependency: (Data Template Item) aixVgOpenLVs
   + Found Dependency: (Data Template Item) aixVgActivePVs
[success] AIX Physical Volume Usage [update]
   + Found Dependency: (Data Template Item) aixPvSize
   + Unmet Dependency: (GPRINT Preset) Exact Numbers
   + Found Dependency: (Data Template Item) aixPvFree
   + Unmet Dependency: (GPRINT Preset) Normal
[success] AIX Paging Volume Usage [update]
   + Found Dependency: (Data Template Item) aixPagePercent
   + Unmet Dependency: (GPRINT Preset) Exact Numbers
[success] AIX File System Usage [update]
   + Found Dependency: (Data Template Item) aixFsSize
   + Unmet Dependency: (GPRINT Preset) Exact Numbers
   + Found Dependency: (Data Template Item) aixFsFree
   + Unmet Dependency: (GPRINT Preset) Normal
[success] AIX File System Statistics [update]
   + Found Dependency: (Data Template Item) aixFsNumINodes
   + Unmet Dependency: (GPRINT Preset) Exact Numbers
   + Found Dependency: (Data Template Item) aixFsUsedInodes
   + Unmet Dependency: (GPRINT Preset) Normal

Data Query
[success] AIX - Get Volume Groups [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Unmet Dependency: (Graph Template)
   + Found Dependency: (Data Template) AIX Volume Group
   + Found Dependency: (Data Template Item) aixVgSize
   + Found Dependency: (Data Template Item) aixVgFree
   + Found Dependency: (Graph Template) AIX Volume Group Statistics
   + Found Dependency: (Data Template Item) aixVgCurNumLVs
   + Found Dependency: (Data Template Item) aixVgOpenLVs
   + Found Dependency: (Data Template Item) aixVgActivePVs
[success] AIX - Get Physical Volumes [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Found Dependency: (Graph Template) AIX Physical Volume Usage
   + Found Dependency: (Data Template) AIX Physical Volume
   + Found Dependency: (Data Template Item) aixPvFree
   + Found Dependency: (Data Template Item) aixPvSize
[success] AIX - Get Page Volumes [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Found Dependency: (Graph Template) AIX Paging Volume Usage
   + Found Dependency: (Data Template) AIX Paging Volume
   + Found Dependency: (Data Template Item) aixPagePercent
[success] AIX - Get File Systems [update]
   + Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
   + Found Dependency: (Graph Template) AIX File System Usage
   + Found Dependency: (Data Template) AIX File System
   + Found Dependency: (Data Template Item) aixFsSize
   + Found Dependency: (Data Template Item) aixFsFree
   + Found Dependency: (Graph Template) AIX File System Statistics
   + Found Dependency: (Data Template Item) aixFsNumINodes
   + Found Dependency: (Data Template Item) aixFsUsedInodes

Host Template
[success] AIX SNMP Host [update]
uname -a

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#8 Post by rony » Wed Jan 19, 2005 9:03 am

I will fix the dependency issue. I forgot to remove the dependant hash id's from the template. I don't like to distrubute templates that overwrite rras and other stuff.
[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]

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#9 Post by rony » Wed Jan 19, 2005 12:11 pm

I have removed the template from this post, until I can figure out what is broken with them.

Sorry about this.
[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]

pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

#10 Post by pbulteel » Wed Jan 19, 2005 12:41 pm

No problem - you've done the hard work already =)

Any ideas when the cacti script repo will be done?

-p
uname -a

hootjr29
Posts: 20
Joined: Mon Feb 14, 2005 1:41 pm
Contact:

AIX Host Template

#11 Post by hootjr29 » Mon Feb 14, 2005 1:47 pm

I would definately be inerested in this as well! In the past, I've been able to gather only CPU and Network information from AIX 5.2. I would be extremely interested in gathering Processes, Users, Logical Volumes, etc... as well.

Let me know if there is anything I can do to help.

Joe

hootjr29
Posts: 20
Joined: Mon Feb 14, 2005 1:41 pm
Contact:

#12 Post by hootjr29 » Fri Feb 18, 2005 11:28 pm

So far, with regards to AIX 5.2 and SNMP, I have only been able to use SNMP v1. I've never got 2c or 3 working (partially because I haven't focused on 3).

I was on the phone with AIX support today. The tech support told me that if you just leave aix's snmpdv3.conf file as is, you can do the following:

1) make sure that /usr/sbin/snmpd is a symlink to /usr/sbin/snmpdv3ne

2) start all snmpd related services:

Code: Select all

startsrc -s snmpd
startsrc -s dpid2
startsrc -s aixmibd
startsrc -s hostmibd
startsrc -s snmpmibd
3) Then you can query it with:

Code: Select all

snmpinfo -m dump -v | grep hrStorageDescr
snmpinfo -m dump -v | grep aixFsFree
4) I've taken that information and put it together to match up my logical volumes and mount points with mibs:
aixFsFree.1 = 875 = /dev/hd4 = /
aixFsFree.2 = 7336 = /dev/hd2 = /usr
aixFsFree.3 = 2005 = /dev/hd9var = /var
aixFsFree.4 = 1019 = /dev/hd3 = /tmp
aixFsFree.5 = 2076 = /dev/hd1 = /home
aixFsFree.6 = 0 = /proc = /proc
aixFsFree.7 = 3946 = /dev/hd10opt = /opt
aixFsFree.8 = 2523 = /dev/fslv07 = /export/spot
aixFsFree.9 = 16200 = /dev/fslv06 = /export/lpp_source
aixFsFree.10 = 61 = /dev/lv00 = /var/adm/csd
aixFsFree.11 = 14904 = /dev/fslv00 = /export/mksysb
aixFsFree.12 = 6797 = /dev/fslv01 = /export/aix_install

5) With that information, now my goal is to try to query this information from a remote host running net-snmp.

My problem right now is that when I run the following I get results that show my logical volumes:

Code: Select all

snmpwalk -c public -v 1 scsysdev | grep -i hrStorageDescr
However, when I run the same command to query aixFsFree I don't get anything. I tried searching for the values of some of my aixFsFree queries before (I thought that maybe it was because my queriing client didn't know about the mibs and would therefore only be able to see oid's and values). So it seems that I need to find out how to query the aixFsFree.

So what I need to get done at this point is the following:
- Find out how to query aixFsFree
- Find the OID for that aixFsFree mib
- Learn how to create a Cacti Template
- Apply that template and troubleshoot

Good luck... any hopefully you, me, and others may be able to figure this out. I'd like to contact IBM Support sometime over the next few weeks to see if they can help me out to figure this out... but I'm pretty busy over the next few weeks... so we'll see how things go.

hootjr29
Posts: 20
Joined: Mon Feb 14, 2005 1:41 pm
Contact:

UPDATE: I can now query stuff in aix from linux w/snmpwalk

#13 Post by hootjr29 » Tue Feb 22, 2005 4:04 pm

OK.... here ya go.

I used the knowledge the I found within the last few weeks and can finally query my aix boxes using snmpwalk from any other system. Here's how:

1) Edit the default /etc/snmpdv3.conf file
2) Look for the line the I've commented out below and change it to be included instead of excluded. Also, add the lines that I've included below it:

Code: Select all

#VACM_VIEW defaultView        1.3.6.1.4.1.2.6.191       - excluded -
VACM_VIEW defaultView    1.3.6.1.4.1.2.6.191    - included -
3) in /etc/rc.tcpip, comment out dpid2 since snmpd v3 doesn't use dpid2
4) make sure /usr/sbin/snmpd is pointing to /usr/sbin/snmpdv3ne
5) stop and start all snmpd related services:
*note - you must not refresh the service, but actually stop it, then start it with snmpdv3!

Code: Select all

stopsrc -s snmpd
stopsrc -s aixmibd
stopsrc -s hostmibd
stopsrc -s snmpmibd
startsrc -s snmpd
startsrc -s aixmibd
startsrc -s hostmibd
startsrc -s snmpmibd
6) From the aix box, query all desired mibs with the following:
Storage

Code: Select all

# Use this command to see how things match up to your mount points
snmpinfo -m dump -v | grep aixFs 
# This next command will give you Free Space in Megabytes
snmpinfo -m dump -v | grep aixFsFree
# This command will allow you to query that from a remote host
snmpwalk -c public -v 1 scsysdev -O fn 1.3.6.1.4.1.2.6.191
CPU

Code: Select all

# This command will show you the current CPU Utilization in Percent Used
snmpinfo -m dump -v | grep -i aixSeCPUUtilization
Interfaces

Code: Select all

#I'm not sure which mib to query on this one.
#In the past, I've used MRTG and just put something like this for my target:
#Target[myserver.en0]: 1:[email protected]:
# So I still need to find this OID or mib
Users Logged In

Code: Select all

snmpinfo -m dump -v | grep -i hrSystemNumUsers.0
#I'm not sure what mide to 
Percent Page Space Used

Code: Select all

#I'm not sure what the mib is to query from aix,
# so from the remote system, you should be able to query the 
#AIX server with this command:
snmpwalk -c public -v 1 scsysdev -O f 1.3.6.1.4.1.2.6.191.2.4.2.1 
#gives you all things related to page space.  It is my belief that the 
#following mib actually gives you the percent page space used:
snmpwalk -c public -v 1 scsysdev -O f 1.3.6.1.4.1.2.6.191.2.4.2.1.5
I hope this helps some people. I guess the next thing that I need to figure out is how to create a template for Cacti. I've read briefly through some forums on this and I guess I will continue to read through them.

Cya,
Joe

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#14 Post by rony » Tue Feb 22, 2005 5:15 pm

I just finished tweaking the templates I created, sorry for the delay, for those there were interested in this.

Please test and let me know how they work.

Also, the AIX host template does not include Interface, Hostmib CPU, Hostmib Processes, and Hostmib Users. You will have to add those to the template or host manually.

If anyone wants to add to these, please do.

Edit: Attachment removed, new version available later in thread
Last edited by rony on Thu Feb 24, 2005 9:22 am, edited 1 time in total.
[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]

hootjr29
Posts: 20
Joined: Mon Feb 14, 2005 1:41 pm
Contact:

Template imported, but errors when I create host w/it

#15 Post by hootjr29 » Wed Feb 23, 2005 1:27 pm

Warning: Variable passed to each() is not an array or object in /netmon/cacti/lib/data_query.php on line 490

Warning: Variable passed to each() is not an array or object in /netmon/cacti/lib/data_query.php on line 490

Warning: Variable passed to each() is not an array or object in /netmon/cacti/lib/data_query.php on line 490

Warning: Variable passed to each() is not an array or object in /netmon/cacti/lib/data_query.php on line 490

Warning: Cannot modify header information - headers already sent by (output started at /netmon/cacti/lib/data_query.php:490) in /netmon/cacti/host.php on line 121

Post Reply