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

The error message is truncated #5415

Closed
masterofcloud1 opened this issue Feb 12, 2019 · 5 comments
Closed

The error message is truncated #5415

masterofcloud1 opened this issue Feb 12, 2019 · 5 comments

Comments

@masterofcloud1
Copy link

Relevant telegraf.conf:

N/A

System info:

Telegraf v1.6.2 on ubuntu xenial

Steps to reproduce:

N/A

Expected behavior:

See all the error message

Actual behavior:

See a truncated error message

Additional info:

I've written my own inputs.exec plugin, and sometimes I'm getting the following error:
E! Error in plugin [inputs.exec] : metric parse error: expected field at offset X: data ...
I know i have a bug, but I can't check what it is because X is very large, way larger than the message itself. The message is truncated by ... and I can't see what the error is.

@glinton
Copy link
Contributor

glinton commented Feb 12, 2019

Can you add the exec portion of your config file, specific command isn't as important as the data_format. Also, if it's not sensitive, can you paste an example input line that is produced by your command. I'd like to reproduce and debug this.

Well, after re-reading the error, I got what I need. It's influx formatted. The problem is that your output isn't including any fields, a required part of influx line protocol, see the docs.

I'm not sure that not truncating this particular message would provide any more clarity than the error message itself.

@danielnelson
Copy link
Contributor

This should be improved by the upcoming fix for #4743, let's merge these two issues.

@masterofcloud1
Copy link
Author

masterofcloud1 commented Feb 13, 2019

@glinton @danielnelson Well, sometimes you want to create a massive number of metrics, and sometimes - you didn't create one correctly according to the line protocol. To debug this, I need to see that metric. But when the message is truncated it is impossible...

@glinton
Copy link
Contributor

glinton commented Feb 13, 2019

masterofcloud1, rather than print the entire message, would it suffice to print the message at the offset with some amount of contextual buffer?

Eg:

E! failed to parse. something broke. offset 12345. ...asdf=1,sdfg=2• 123456789000000000

@masterofcloud1
Copy link
Author

That would be great @glinton !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants