Help with VALUE/REGEXP in snmp query

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Marmax
Posts: 3
Joined: Tue Oct 10, 2006 3:20 pm

Help with VALUE/REGEXP in snmp query

Post by Marmax »

Hello,

I use cacti-0.8.6h on fadora with cactid as poller.
Net-Snmp work fine, traps too.
Rancid scrpits.

I use cacti since 2 years, very fine ! Good job !!

I have created a new snmp query. But I have problem wit VALUE/REGEXP

I have created a datasource with 2 gauges (DrvCondition & PerCentRebuilded).
The snmp_query file is : hpDrvArray-LogDrvRaid.xml

Code: Select all


    <hpIDALogicalDrvInstance>^
      <name>Drive number</name>^
      <method>walk</method>^
      <source>value</source>^
      <direction>input</direction>^
      <oid>.1.3.6.1.4.1.232.3.2.3.1.1.2</oid>^
    </hpIDALogicalDrvInstance>^


    <hpIDALogicalDrvFTType>^
      <name>FaulTolerant Type</name>^
      <method>walk</method>^
      <source>value</source>^
      <direction>input</direction>^
      <oid>.1.3.6.1.4.1.232.3.2.3.1.1.3</oid>^
    </hpIDALogicalDrvFTType>^

    <hpIDALogicalDrvSize>^
      <name>Logical Drive Size in MB</name>^
      <method>walk</method>^
      <source>value</source>^
      <direction>input</direction>^
      <oid>.1.3.6.1.4.1.232.3.2.3.1.1.9</oid>^
    </hpIDALogicalDrvSize>^

    <hpIDALogicalDrvCondition>
      <name>DrvRaidCondition></name>
      <method>walk</method>
      <source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-]{1})+\)$</source>
      <direction>output</direction>
      <oid>.1.3.6.1.4.1.232.3.2.3.1.1.11</oid>
    </hpIDALogicalDrvCondition>

    <hpIDALogicalDrvPerCentRebuild>^
      <name>PerCentRebuild</name>^
      <method>walk</method>^
      <source>value</source>^
      <direction>output</direction>^
      <oid>.1.3.6.1.4.1.232.3.2.3.1.1.12</oid>^
    </hpIDALogicalDrvPerCentRebuild>^

  </fields>^
</interface>
The snmpwalk on the OID where I put the REGEXP :
snmpwalk -v2c -O QfntUe -c mysecret myhost .1.3.6.1.4.1.232.3.2.3.1.1.11
return this :
.1.3.6.1.4.1.232.3.2.3.1.1.11.0.1 = 2
but with -O fntUe return this :
.1.3.6.1.4.1.232.3.2.3.1.1.11.0.1 = INTEGER: ok(2)

When I run : cactid --verbosity=5 27 27

CACTID: Host[27] DS[509] SNMP: v2: myIP, dsname: DrvCondition, oid: .1.3.6.1.4.1.232.3.2.3.1.1.11.0.1, value: U
I have tested with php cmd.php 27 27
09/04/2007 08:31:01 PM - CMDPHP: Poller[0] Host[27] DS[509] WARNING: Result from SNMP not valid. Partial Result: ok(2 Note the missed ')' !

I have read a lot in this forum, modify the regexp, but no solutions.

My question : does the VALUE/REGEXP in output direction item work ?
Where I have done a mistake ?
What the best way to find a solution ?

Thank a lot for help.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Help with VALUE/REGEXP in snmp query

Post by gandalf »

Marmax wrote:My question : does the VALUE/REGEXP in output direction item work ?
It should work. You may find some more help at the first link of my signature
Reinhard
Marmax
Posts: 3
Joined: Tue Oct 10, 2006 3:20 pm

Post by Marmax »

I have already read all this many times.

I doesn't know what to check now.
I have delete all, all recreated, check with cactid and php cmd.php.
All the same result.

Is the regexp the problem ?

Thank for your help.
Marmax
Posts: 3
Joined: Tue Oct 10, 2006 3:20 pm

Post by Marmax »

Since I don't found a solution, I wrote a script.
When I will have finish, I will publish a template for HP Proliant.
I used one soon publish here, but with some arrangements like Raid reconstruction percent per logical device.

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests