Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riemann: empty string metric results in casting error #258

Closed
faxm0dem opened this issue Sep 12, 2014 · 0 comments
Closed

riemann: empty string metric results in casting error #258

faxm0dem opened this issue Sep 12, 2014 · 0 comments

Comments

@faxm0dem
Copy link
Contributor

setting the metric (and presumably other options) to "" results in a casting error:

riemann (
   metric("${foo:-}")
)

when ${foo} is empty, we get:

'Casting error; value=\'\', type-hint=\'float\''
@algernon algernon added this to the syslog-ng 3.6.1 milestone Sep 12, 2014
talien pushed a commit to talien/syslog-ng that referenced this issue Oct 8, 2014
When adding properties to an event, skip empty fields before trying to
do any type casting. This allows metric(int("${foo:-}")
state("${state}")) to work correctly, and skip the metric field if it is
empty, and therefore fixes syslog-ng#258.

Reported-by: Fabien Wernli
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
@talien talien removed the in progress label Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants