1829136 Members
2589 Online
109986 Solutions
New Discussion

Loading MIBs in hpux

 
SOLVED
Go to solution
Sabin Mathew
Advisor

Loading MIBs in hpux

I was working with mrtg to monitor the disk usage in Hp-ux.
Could I know how I can load the mib /opt/OV/newconfig/AGENT-MAN/snmp_mibs/hp-unix
25 REPLIES 25
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

Add it to the top of your mrtg.cfg file:

LoadMIBs: /opt/OV/newconfig/AGENT-MAN/snmp_mibs/hp-unix

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks for the reply.

I have added this line to the top of the .cfg file.

But when I run mrtg, it gives snmp error, unable to poll the OID that I specified.

Thanks,
Sabin
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

What are you polling for OID...

Here's how I do it (though I don't use the OVO mibs - but it may help):

more mrtg.cfg
EnableIPv6: no
LoadMIBs: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
WorkDir: /htdocs/mambo/mrtg/
Options[_]: bits,growright

######################################################################
# System: sha1
# Description: HP-UX sha1 B.11.11 U 9000/785
# Contact:
# Location:
######################################################################


RunAsDaemon: no
Interval: 5

### Global Defaults

# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

# Email an ...
PageTop[$]:
Questions and references Geoff Wild.

### End of Global Config Options

######################################################################


Target[sha1.mydomain.comcpup]:.1.3.6.1.4.1.11.2.3.1.1.15.0&.1.3.6.1.4.1.11.2.3.1.1.13.0:mysnmpname@sha1.mydomain.com + .1.3.6.1.
4.1.11.2.3.1.1.16.0&.1.3.6.1.4.1.11.2.3.1.1.14.0:mysnmpname@sha1.mydomain.com
Title[sha1.mydomain.comcpup]: CPU Load on sha1.mydomain.com
MaxBytes[sha1.mydomain.comcpup]: 100
Ylegend[sha1.mydomain.comcpup]: CPU Load
ShortLegend[sha1.mydomain.comcpup]: %
PageTop[sha1.mydomain.comcpup]:

CPU Load on sha1.mydomain.com


Options[sha1.mydomain.comcpup]: integer, growright, nopercent
WithPeak[sha1.mydomain.comcpup]: wmy
LegendO[sha1.mydomain.comcpup]: User/System:  
LegendI[sha1.mydomain.comcpup]: Idle/Nice:  
Legend1[sha1.mydomain.comcpup]: Idle/Nice CPU Time
Legend2[sha1.mydomain.comcpup]: User/System CPU Time
Legend3[sha1.mydomain.comcpup]: Maximal Idle/Nice CPU Time
Legend4[sha1.mydomain.comcpup]: Maximal User/System CPU Time

######################################################################

Target[sha1.mydomain.commem]: .1.3.6.1.4.1.11.2.3.1.1.7.0&.1.3.6.1.4.1.11.2.3.1.1.8.0:mysnmpname@sha1.mydomain.com
Title[sha1.mydomain.commem]: Memory on sha1.mydomain.com
MaxBytes[sha1.mydomain.commem]: 100000000
Ylegend[sha1.mydomain.commem]: Memory Usage
ShortLegend[sha1.mydomain.commem]:  
PageTop[sha1.mydomain.commem]:

Memory on sha1.mydomain.com


Options[sha1.mydomain.commem]: integer, gauge, growright, nopercent
kilo[sha1.mydomain.commem]: 1024
WithPeak[sha1.mydomain.commem]: wmy
LegendO[sha1.mydomain.commem]: Total:  
LegendI[sha1.mydomain.commem]: Free:  
Legend1[sha1.mydomain.commem]: Free System Memory
Legend2[sha1.mydomain.commem]: Total Available System Memory
Legend3[sha1.mydomain.commem]: Maximal Available System Memory
Legend4[sha1.mydomain.commem]: Maximal Free System Memory

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks again for the reply.

Here, the scenario is, mrtg is installed in a test server and I need to monitor the file system usage of another server in the production environment.

I created a .cfg file using the cfgmaker and it worked well for the network monitoring part.But for the filesystem monitoring, I am stucked up..

I just added the mib in the .cfg file and still its giving snmp error.
Please find below the error messsage.

SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.4.1.11.2.3.1.2.2.1.4)
SNMPv1_Session (remote host: "167.6.249.33" [167.6.249.33].161)
community: "public"
request ID: 767096839
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/bin/../lib/mrtg2/SNMP_util.pm line 490
SNMPGET Problem for .1.3.6.1.4.1.11.2.3.1.2.2.1.4 .1.3.6.1.4.1.11.2.3.1.2.2.1.5
sysUptime sysName on public@167.6.249.33::::::v4only
at /usr/local/bin/mrtg line 1921
ERROR: Target[167.6.249.33_disk][_IN_] ' $target->[8]{$mode} ' did not eval into
defined data
ERROR: Target[167.6.249.33_disk][_OUT_] ' $target->[8]{$mode} ' did not eval int
o defined data


Thanks,
Sabin
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

I'll try those mibs tomorrow when I'm at work....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

Couldn't get it to work - saw this on the net:

http://www.admins-tipps.net/management/mrtg_hpux.txt

AT the bottom, it mentions using a tool like getif to get the actual numbers for the disks...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks again for the reply and info.
I was just exploring the URL you provided; could see a getif install file.

" Following is a sample for the drive allocations. You must find out
the numbers yourself."

Does this mean, we need to find out the actual disk usage percentages or what? I am confused what does this 'numbers' mean..

Thanks,
Sabin
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

I believe - those are the disk id's...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

Wow - getif seems to work - yet I can't make heads or tails of it...

Example, found this:

.iso.org.dod.internet.private.enterprises.hp.nm.hpnsa.hpnsaStorageCap.hpnsaSCDrv.hpnsaSCDrvTable.hpnsaSCDrvEntry.hpnsaSCDrvCurrentAvailable

.1.3.6.1.4.1.11.2.23.15.3.2.1.12

But, I get nothing when I connect...tried version 1 and 2c:

# snmpget -v 1 -c mysnmp myserver .1.3.6.1.4.1.11.2.23.15.3.2.1.12
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.11.2.23.15.3.2.1.12

# snmpget -v 2c -c mysnmp myserver .1.3.6.1.4.1.11.2.23.15.3.2.1.12
iso.3.6.1.4.1.11.2.23.15.3.2.1.12 = No Such Object available on this agent at this OID

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

Ah - cool - got it....

I put the hpunix mib in C:\Program Files\Getif 2.3.1\Mibs as hpunix.MIB and deleted .index

The started getif...

Now I see more from the Mbrowser tab:

.iso.org.dod.internet.private.enterprises.hp.nm.system.general.fileSystem.fileSystemTable.fileSystemEntry.fileSystemBfree

but the lvols are:

.iso.org.dod.internet.private.enterprises.hp.nm.system.general.fileSystem.fileSystemTable.fileSystemEntry.fileSystemDir

Then click on start, and you will see the lvols:

Example, my /home is:

.1.3.6.1.4.1.11.2.3.1.2.2.1.10.1073741829.7

Looking at:

.1.3.6.1.4.1.11.2.3.1.2.2.1.6.1073741829.7

I see I have 139137 availabl3 (same as output from BDF).

To output in mrtg:

Target[sha1_home_disk]: .1.3.6.1.4.1.11.2.3.1.2.2.1.4.1073741829.7&.1.3.6.1.4.1.11.2.3.1.2.2.1.6.
1073741829.7:mysnmp@sha1


Rgds...Geoff


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks for this again...

The community 'mysnmp' exists by default or should need to create it?


Thanks,
Sabin
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

I have one more question...

Did you load the mib hpux in the .cfg file or these OIDs are readily available?

Could you send me the whole .cfg file?

Thanks,
Sabin
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

No - mysnmp - is my community name - default is public.

And yes - I loaded that MIB - here's the test mrtg.cfg I used:

EnableIPv6: no
LoadMIBs: /usr/local/share/snmp/mibs/hp-unix /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
WorkDir: /htdocs/mambo/mrtg/
Options[_]: bits,growright

######################################################################
# System: sha1
# Description: HP-UX sha1 B.11.11 U 9000/785 2012333216
# Contact:
# Location:
######################################################################


RunAsDaemon: no
Interval: 5

### Global Defaults

# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

# Email an ...
PageTop[$]:
Questions and references Geoff Wilda>.

### End of Global Config Options

######################################################################

#Target[sha1_disk]: .1.3.6.1.4.1.11.2.3.1.2.2.1.6.1073741827.5&.1.3.6.1.4.1.11.2.3.1.2.2.1.4
.1073741827.5:public@sha1
Target[sha1_disk]: .1.3.6.1.4.1.11.2.3.1.2.2.1.4.1073741829.7&.1.3.6.1.4.1.11.2.3.1.2.2.1.6.
1073741829.7:public@sha1
Title[sha1_disk]: Available Disk Space on sha1 on Vo...












Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks for the cfg details.

When I tried snmpget using these particular OIDs, I am getting integers, but those are not same as I obtained from the bdf output..

Thanks,
Sabin
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Yes.....I could get the free and used i-node numbers...but not the usage in KB

Have you tried graphing these two values? In my graph, the plot is nil...

Thanks,
Sabin

Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

Oops - sorry had the oid's reversed - should be 6 then 4:

Target[sha1_disk]: .1.3.6.1.4.1.11.2.3.1.2.2.1.6.1073741829.7&.1.3.6.1.4.1.11.2.3.1.2.2.1.4.1073741829.7:mysnmp@sha1

There is a log file you can see as well:

# more sha1_disk.log
1129221268 139137 524288
1129221268 139137 1 139137 1
1129221017 1 1 1 1
1129221000 1 1 1 1
1129220700 1 1 1 1
1129220400 1 1 1 1
1129220100 1 1 1 1
etc...

Also - I changed
MaxBytes[sha1_disk]: 512000\

as my home is 512MB

Sorry about that..

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks for the reply...

My .log file looks like this,

1129221790 50393 51200
1129221790 50393 51200 50393 51200
1129221271 50393 51200 50393 51200
1129221000 40818 41472 50393 51200
1129220700 0 0 0 0
1129220400 0 0 0 0
1129220100 0 0 0 0
1129219800 0 0 0 0
1129219500 0 0 0 0
1129219200 0 0 0 0
1129218900 0 0 0 0
1129218600 0 0 0 0
1129218300 0 0 0 0
1129218000 0 0 0 0
1129217700 0 0 0 0
1129217400 0 0 0 0
1129217100 0 0 0 0
1129216800 0 0 0 0

Your log file has 1s instead of 0s, what does it mean?

Could you clarify the following?

1. While doing snmpget, I got this,
SNMPv2-SMI::enterprises.11.2.3.1.2.2.1.5.1073741828.7 = INTEGER: 50418

What does this integer mean? is this Kb,it doen't match to any of the parameters in the bdf output.

2.Apart from using the OIDs in the .cfg file, do we need to configure something in the target server?

3.I could find that, by changing 1073741828 to ********7..., we can find out other lvs.

Thanks,
Sabin
Geoff Wild
Honored Contributor
Solution

Re: Loading MIBs in hpux

the integer is the available space in kbytes - just compare it to a bdf output.

IE mine:

snmpget -v 1 -c mysnmp sha1 .1.3.6.1.4.1.11.2.3.1.2.2.1.6.1073741829.7
iso.3.6.1.4.1.11.2.3.1.2.2.1.6.1073741829.7 = INTEGER: 139137

bdf /home
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol5 524288 375902 139137 73% /home

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Thanks for the quick reply....

But in my case, its,

snmpget -v 1 -c public brksvx06 .1.3.6.1.4.1.11.2.3.1.2.2.1.6.10
73741829.7
SNMPv2-SMI::enterprises.11.2.3.1.2.2.1.6.1073741829.7 = INTEGER: 1079

and the bdf output is,

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol5 212992 52712 159288 25% /home

The only difference is you are using a different community name. Is it mandatory to create a community?

Are there any snmp settings at the target side?

Thanks,
Sabin
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Could you send me your snmpd.conf file?

Thanks,
Sabin
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

Intersting that yours is:

SNMPv2-SMI::enterprises

and mine is:

iso

Are you sure you have the right OID? did you use getif program?

do a full bdf - not just of /home.

In my snmpd.conf file - we only set 2 variables - community name and trap-dest:

get-community-name: mysnmp
trap-dest: 192.162.5.5


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

Do we have getif for UNIX?
It seems, getif is not functioning in windows..

Thanks,
Sabin
Geoff Wild
Honored Contributor

Re: Loading MIBs in hpux

No Unix - only windows - I downloaded getif v2.3.1 from:

http://www.wtcs.org/snmp4tpc/getif.htm

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sabin Mathew
Advisor

Re: Loading MIBs in hpux

I just ran the getif program.
Could you please tell me which number should I use in the mrtg cfg file?

I am attaching the screen as a word file.

It seems, getif returns the same OID that your systems has.

Thanks,
Sabin