On Sep 5, 2012, at 11:00 AM, Kevin Falcone:

> On Fri, Aug 31, 2012 at 05:49:36PM +0000, Lundberg, Emory wrote:
>> I cannot seem to get a scrip that will accept multiple comma-seperated 
>> addresses from an email (or any correspondevent for that matter), only one 
>> address will be accepted.
>> The scrip I am using is a custom action that looks like this:
> 
> I'd suggest looking at what RTIR's IP address parsing routines are
> doing.
> 
> You'll want lib/RT/Action/RTIR_FindIP.pm in the RTIR tarball.
> 
> Also, keep in mind that if you create an Multiple Value IP Address
> custom field, you still need to add your multiple values one at a time
> (like if you were adding multiple values to a normal multi-value CF).

It's my understanding that RTIR's module will snarf up all IP addresses and 
that isn't exactly what I was wanting to do.  I may be going about this in a 
weird way and I'm absolutely doing something with less resistance.

Users are filling out a form that is emailed into RT for staging new systems, 
and it would be advantageous for us to collect all the IP addresses on all 
interfaces at that time instead of one, which historically is the management IP 
address collected via scrip as X-IP.  We have a scrip that gathers up that and 
several other values in one go, and then inserts that into custom fields.  The 
reason that I'd like to avoid the RTIR approach is that those requests can have 
IP addresses in them for host ip filters or firewall policies.

I don't know how "normal multi-value" CFs behave, our other CFs are just 
one-value.  The RT cli is perfectly capable of handling multiple values for my 
new IP-addresses CF, and I cannot seem to have more than one X-IP-addresses 
match per reply/comment.  It picks up the first and then ignores the rest.

i.e.

        X-IP-addresses: 127.0.0.1
        X-IP-addresses: 127.0.0.2
        X-IP-addresses: 127.0.0.3

would result in only `X-IP-addresses: 127.0.0.1` getting picked up.

I'm not at all opposed to being told I'm doing this in a dumb way. If adopting 
the logic in RTIR's module into a scrip for RT so that it only picks up 
addresses I tag with X-$CFNAME is the best way, I would appreciate any tips or 
suggestions to prime the pump, I am not confidant I'm approaching this right or 
understanding the recommendation.

thank you!


--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs

Reply via email to