Search and replace in a logging field?
Scott Baker
bakers at canbytel.com
Tue Feb 14 18:40:50 UTC 2012
Here is a snippet of my config:
if(substring(option agent.remote-id, 0, 1) = "N") {
log(info, concat("DHCPOCCAM ", binary-to-ascii (10, 8, ".",
leased-address), " ", option agent.remote-id));
}
Basically if the remote_id starts with "N", log the leased address, and
the remote-id. The problem is, that the access platform sends a bunch of
extra text in the remote-id I do NOT want to log.
Is there a way I can search and replace (remove) some text in the
remote-id before I log it? Specifically I just want to remove the word
"DSL" that's present in all the remote-ids to be consistent with the
rest of my network.
I've opened a bug with the equipment vendor to remove it before it sends
it to the DHCP server, but I'm not sure how much traction I'll get.
Thanks
--
Scott Baker - Canby Telcom
System Administrator - RHCE - 503.266.8253
More information about the dhcp-users
mailing list