AIX Host Template

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

Moderators: Developers, Moderators

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

AIX Host Template

Post by rony »

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:

Post by pbulteel »

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:

Post by pbulteel »

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: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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:

Post by pbulteel »

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:

Post by pbulteel »

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
Selecting the xml to import.
Selecting the xml to import.
capture-1.jpg (77.89 KiB) Viewed 97479 times
Result AFTER pressing save. Nothing happens - no error messages are displayed. (will check apache log files...)
Result AFTER pressing save. Nothing happens - no error messages are displayed. (will check apache log files...)
capture-2.jpg (86.94 KiB) Viewed 97479 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

Post by pbulteel »

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: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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:

Post by pbulteel »

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

AIX Host Template

Post by hootjr29 »

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

Post by hootjr29 »

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

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

Post by hootjr29 »

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:public@192.168.0.1:
# 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: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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

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

Post by hootjr29 »

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

Who is online

Users browsing this forum: No registered users and 3 guests