AutoM8 0.35 Reg Ex help?

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
OneZero
Posts: 14
Joined: Sat Jun 11, 2011 7:31 pm

AutoM8 0.35 Reg Ex help?

Post by OneZero »

I'm trying to write a regex for host graph tree creation. Got two of them created, but can't seem to get this one to match.
Here's what I've got.
Matching on host desc, which is B100 Bink to Str0, some are B100, some are B28 or B14. So I need to match the first 3-4 chars, to a space. And I want that to be the subtree.
Tried this matching pattern, which should work I think, ^(B[0-9]*)
With replacement pattern of ${1}

But as the result, I get the whole string back B100 Bink to Str0

What am I missing?
Thanks
ELDemorose
Posts: 23
Joined: Thu Jul 15, 2010 8:56 am
Location: Tours, FRANCE

Re: AutoM8 0.35 Reg Ex help?

Post by ELDemorose »

Hi,

Try ^(B[0-9]+) .*$
Begin with B, then one or more figure, then a space, then whatever.
Cacti Version - 0.8.7g
Plugin Architecture - 2.8
Poller Type - Spine
Server Info - Linux 2.6.16.60-0.21-smp
Web Server - Apache/2.2.3 (Linux/SUSE)
PHP - 5.2.5
MySQL - 5.0.26
RRDTool - 1.2.12
SNMP - 5.3.0.1
Plugins Autom8 - Aggregate - Realtime
annapatil
Posts: 35
Joined: Wed Oct 13, 2010 3:22 am

Re: AutoM8 0.35 Reg Ex help?

Post by annapatil »

Hi There,

I am using cacti 1.0.1, having issue with regular expression matching for data query output field 'ifDescr'

ifDescr showing as below,
Found item [ifDescr='V1'] index: 1 [from value]
Found item [ifDescr='V2'] index: 2 [from value]
Found item [ifDescr='V3'] index: 3 [from value]
Found item [ifDescr='V4'] index: 4 [from value]



Graph Creation Criteria

Operation - blank

Field Name - ifDescr

Matching Pattern - ^(V[1-4])
Attachments
Graph-criteria.JPG
Graph-criteria.JPG (40.52 KiB) Viewed 867 times
Autom Graph.JPG
Autom Graph.JPG (98.25 KiB) Viewed 867 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest