HP-UX File system snmp indexed query script

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

Moderators: Developers, Moderators

Post Reply
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

HP-UX File system snmp indexed query script

Post by invaliduser »

Here is a Perl script I used in order to work around the funky indexes used by HP-UX for the file system tables.

Be sure to install SNMP_Session as well. http://www.switch.ch/misc/leinen/snmp/perl/

Comments, suggestions are most welcome

Brian

30/03/2005: New fields added to support reporting file systems in bytes and percentages.
Attachments
hpux_disk.xml
script query defintion installed into resource/script_queries

Updated: 30/03/2005
(2.66 KiB) Downloaded 1782 times
walk_hpux_disk.txt
Perl script rename to walk_hpux_disk.pl in your scripts directory

Updated: 30/03/2005
(3.74 KiB) Downloaded 2640 times
Last edited by invaliduser on Wed Mar 30, 2005 6:38 pm, edited 4 times in total.
Ingimar
Posts: 7
Joined: Mon Feb 21, 2005 8:53 am

Post by Ingimar »

Hi there.

I just tried this and got the following error after selecting a filesystem that was found in the query:

Code: Select all

Notice: Undefined index: sgg_15 in /var/www/html/cacti/graphs_new.php on line 71

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/cacti/graphs_new.php:71) in /var/www/html/cacti/graphs_new.php on line 310
The Data Query found all disks but creating the graphs caused this error.

Looking at the list of graphs an empty graph has been created:

Code: Select all

Graph Title   Template Name   Size
              None            0x0
Cacti 0.8.6c
HP-UX B.11.00

I haven't looked into it further yet but if anyone has a fix, please post it. :-)
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

my script if return me nothing !

i've install perl but i don't know how to install SNMP_Session ( have a windows 2000 computer )
can u help me please ?
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

Ingimar wrote:Hi there.

I just tried this and got the following error after selecting a filesystem that was found in the query:

Code: Select all

Notice: Undefined index: sgg_15 in /var/www/html/cacti/graphs_new.php on line 71

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/cacti/graphs_new.php:71) in /var/www/html/cacti/graphs_new.php on line 310
The Data Query found all disks but creating the graphs caused this error.

Looking at the list of graphs an empty graph has been created:

Code: Select all

Graph Title   Template Name   Size
              None            0x0
Cacti 0.8.6c
HP-UX B.11.00

I haven't looked into it further yet but if anyone has a fix, please post it. :-)
If you haven't, you might want to try and create data templates for each field separately. I review my configuration and that is what I did.
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

scavenger67 wrote:my script if return me nothing !

i've install perl but i don't know how to install SNMP_Session ( have a windows 2000 computer )
can u help me please ?
I'm not sure. I did all my development under linux and have not tried to port to win2k.

Found this via Google:

"SNMP_Session package does not need to be compiled because it does not rely on an auxiliary DLL. After you download the archive, extract the *.pm files and install them in your site/lib subtree."
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

finally it works for me.. have some few problem with the graph and data template..
now i'm looking to have it into percentage instead of available block VS total block.
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

Shouldn't be difficult just need to multiply number of blocks by fileSystemBsize to convert to bytes.

I'll probably put a new query field into the scripts to do that. Just need to set aside the time to do it.
Ingimar
Posts: 7
Joined: Mon Feb 21, 2005 8:53 am

Post by Ingimar »

Dear invaliduser, could you export your graph templates for use with this script and query and post here?
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

Here is a graph template and the supporting data templates.
Attachments
hpux_disk_graph_template.xml
Graph Template
(10.57 KiB) Downloaded 1963 times
hpux_disk_free_data_template.xml
Disk Free Space Data Template
(4.49 KiB) Downloaded 1743 times
hpux_disk_total_data_template.xml
Disk Space Total Data Template
(4.49 KiB) Downloaded 1711 times
Last edited by invaliduser on Thu Mar 31, 2005 2:40 pm, edited 1 time in total.
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

Hi, thanks for all these template... but are you sure of the last one "Graph Template" found CISCO router" in it ?
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

oops...will fix

Thanks for pointing it out.

The correct template is there now.
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

wonderfull invaliduser,

if i can made a little comment.
If the graph template, you put "total" but your script only reports %used and %free.
So i mean that the 'total' you put on the graph template is more %used.

or by total you mean the total number of blocks ?

Thanks.
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

The graph I posted was reporting the disk space utilization in blocks.

If you want to modify it to report in percentages, then total would have a hard limit of 100.

I suggest removing the total field from the graph, turn off autoscale and make sure the max value for the graph is set at 100.

Does this give you what I think your looking for?
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

EXACTLY !
thanks

:D
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests