Closed chimo closed 7 years ago
Assuming $host is something like "192.168.2.43".
When using WHERE \"agent_host\" = '$host', the clause becomes WHERE "agent_host" = '192\.168\.2\.43' after interpolation.
WHERE \"agent_host\" = '$host'
WHERE "agent_host" = '192\.168\.2\.43'
This causes parsing errors in the templating engine: "error parsing query: found ., expected identifier, string, number, bool"
Changing the clause to WHERE \"agent_host\" =~ /^$host/ fixes that issue.
WHERE \"agent_host\" =~ /^$host/
Thanks! I had just noticed the oversight this morning and was confirming the change resolved the issue.
Assuming $host is something like "192.168.2.43".
When using
WHERE \"agent_host\" = '$host'
, the clause becomesWHERE "agent_host" = '192\.168\.2\.43'
after interpolation.This causes parsing errors in the templating engine: "error parsing query: found ., expected identifier, string, number, bool"
Changing the clause to
WHERE \"agent_host\" =~ /^$host/
fixes that issue.