script (indexed) help...

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

Moderators: Developers, Moderators

Post Reply
doubleshot
Posts: 10
Joined: Fri Sep 26, 2008 5:32 pm

script (indexed) help...

Post by doubleshot »

can someone point me to an indexed howto? I'm wanting to pull data (like hdd information) but not via snmp (since my device doesn't have the information i'm looking for in snmp).

i need to figure out how to make the perl script react the way cacti wants it (index, query, get, etc).

thanks.
Last edited by doubleshot on Mon Nov 03, 2008 6:38 pm, edited 1 time in total.
http://www.techcolumnist.com
TheBigOne
Posts: 45
Joined: Mon Sep 29, 2008 8:57 am
Location: Basel

Post by TheBigOne »

You request the data via snmp anyway.

SNMP can execute your script if you request the OID you selected.

http://forums.cacti.net/post-60024.html

Or search google for "snmp exec"
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: generic perl script template

Post by gandalf »

doubleshot wrote:can someone point me to an indexed howto? I'm wanting to pull data (like hdd information) but not via snmp (since my device doesn't have the information i'm looking for in snmp).

i need to figure out how to make the perl script react the way cacti wants it (index, query, get, etc).

thanks.
Please see 1st link of my sig to find it all
Reinhard
doubleshot
Posts: 10
Joined: Fri Sep 26, 2008 5:32 pm

Re: generic perl script template

Post by doubleshot »

gandalf wrote:
doubleshot wrote:can someone point me to an indexed howto? I'm wanting to pull data (like hdd information) but not via snmp (since my device doesn't have the information i'm looking for in snmp).

i need to figure out how to make the perl script react the way cacti wants it (index, query, get, etc).

thanks.
Please see 1st link of my sig to find it all
Reinhard
i've looked through all this stuff already. Mostly I need to understand how I should format output. As for using snmp I can't as my device is a storage controller and I can't add things to snmpd conf file.

If i understand correctly, you need to execute three parts, index, query, get.

for index it's the name of whatever you're doing, so it'd be 1:name1 2:name2 3:name3 etc??

i guess i'm confused on how i should gather this information to use in an indexed manner instead of me manually entering all the information.

some of the data output looks like this:

Code: Select all

CADCICIFS01A::> stat show -node local -category aggregate -object I01A_ENC_01 -counter user_write_blocks

       Node: CADCICIFS01A
   Category: aggregate
     Object: I01A_ENC_01
    Counter: user_write_blocks
      Value: 2493098571
      Delta: 22/s:27s
Description: Number of blocks written per second to the aggregate
 Properties: rate

CADCICIFS01A::> stat show -node local -category aggregate -object I01A_ENC_02 -counter user_write_blocks

       Node: CADCICIFS01A
   Category: aggregate
     Object: I01A_ENC_02
    Counter: user_write_blocks
      Value: 2520025268
      Delta: 16/s:38s
Description: Number of blocks written per second to the aggregate
 Properties: rate
what i'm interested in is indexing the -object value and then outputting the string user_write_blocks : {value}. I've gotten this to work if i manually enter all the data, but it'd be nice not to have to do that (esp if i want to monitor all my volumes as well).

Any help would be greatly appreciated!
http://www.techcolumnist.com
doubleshot
Posts: 10
Joined: Fri Sep 26, 2008 5:32 pm

Post by doubleshot »

ok, i've got the index done. now to figure out the query part.

Code: Select all

$ perl ontapGX_getStorage3.pl xxx.xxx.xxx.xxx test index
1
2
3
4
5
http://www.techcolumnist.com
doubleshot
Posts: 10
Joined: Fri Sep 26, 2008 5:32 pm

Post by doubleshot »

one thing i noticed was there is no explination to why there is a query and a get. what's the purpose of these two functions? They appear to do the exact same thing...
http://www.techcolumnist.com
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests