Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Apr 24, 2019 11:14 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: HP-UX File system snmp indexed query script
PostPosted: Mon Apr 26, 2004 11:24 am 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
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:
File comment: Perl script rename to walk_hpux_disk.pl in your scripts directory

Updated: 30/03/2005

walk_hpux_disk.txt [3.74 KiB]
Downloaded 2333 times
File comment: script query defintion installed into resource/script_queries

Updated: 30/03/2005

hpux_disk.xml [2.66 KiB]
Downloaded 1552 times


Last edited by invaliduser on Wed Mar 30, 2005 6:38 pm, edited 4 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 5:52 am 
Offline

Joined: Mon Feb 21, 2005 8:53 am
Posts: 7
Hi there.

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

Code:
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:
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. :-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 25, 2005 12:59 pm 
Offline

Joined: Fri Mar 18, 2005 7:33 am
Posts: 49
Location: France
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 ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 10:21 am 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
Ingimar wrote:
Hi there.

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

Code:
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:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 10:22 am 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
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."


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 1:36 pm 
Offline

Joined: Fri Mar 18, 2005 7:33 am
Posts: 49
Location: France
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 2:05 pm 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 8:02 am 
Offline

Joined: Mon Feb 21, 2005 8:53 am
Posts: 7
Dear invaliduser, could you export your graph templates for use with this script and query and post here?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 9:30 am 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
Here is a graph template and the supporting data templates.


Attachments:
File comment: Graph Template
hpux_disk_graph_template.xml [10.57 KiB]
Downloaded 1701 times
File comment: Disk Space Total Data Template
hpux_disk_total_data_template.xml [4.49 KiB]
Downloaded 1413 times
File comment: Disk Free Space Data Template
hpux_disk_free_data_template.xml [4.49 KiB]
Downloaded 1495 times


Last edited by invaliduser on Thu Mar 31, 2005 2:40 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 1:43 pm 
Offline

Joined: Fri Mar 18, 2005 7:33 am
Posts: 49
Location: France
Hi, thanks for all these template... but are you sure of the last one "Graph Template" found CISCO router" in it ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 2:39 pm 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
oops...will fix

Thanks for pointing it out.

The correct template is there now.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 5:57 am 
Offline

Joined: Fri Mar 18, 2005 7:33 am
Posts: 49
Location: France
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 9:50 am 
Offline

Joined: Fri Apr 23, 2004 12:37 pm
Posts: 11
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?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 1:39 pm 
Offline

Joined: Fri Mar 18, 2005 7:33 am
Posts: 49
Location: France
EXACTLY !
thanks

:D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group