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

nginx plugin missing server value #126

Closed
ojan opened this issue Aug 20, 2015 · 6 comments
Closed

nginx plugin missing server value #126

ojan opened this issue Aug 20, 2015 · 6 comments
Labels
bug unexpected problem or unintended behavior

Comments

@ojan
Copy link

ojan commented Aug 20, 2015

Hello,

With Telegraf 0.15 and InfluxDB 0.9.3 RC1, when i activate the nginx plugin with this configuration

[nginx]
urls = ["http://nginx-01/nginx_status"]

I get this response with telegraf -config /etc/opt/telegraf/telegraf.conf -test

> [server=""] nginx_active value=48
> [server=""] nginx_accepts value=1985
> [server=""] nginx_handled value=1985
> [server=""] nginx_requests value=2640
> [server=""] nginx_reading value=0
> [server=""] nginx_writing value=1
> [server=""] nginx_waiting value=47

And then find in the telegraf.log

Error in plugins: unable to parse 'nginx_active,host=nginx-01,server= value=33i': missing tag value

Bug or misconfiguration on my side ?

@sparrc sparrc added the bug unexpected problem or unintended behavior label Aug 20, 2015
@sparrc
Copy link
Contributor

sparrc commented Aug 20, 2015

Looks like a bug to me, I'll look into it

@ojan in the meantime, try removing http:// from your url like below and see if that gives you a valid server tag.

[nginx]
urls = ["nginx-01/nginx_status"]

@sparrc
Copy link
Contributor

sparrc commented Aug 20, 2015

nevermind, the issue is due to not catching an error from net.SplitHostPort, I'll have a PR up soon

@sparrc
Copy link
Contributor

sparrc commented Aug 20, 2015

@ojan the solution will be to add a port to your url, I believe this should work:

[nginx]
urls = ["http://nginx-01:80/nginx_status"]

@ojan
Copy link
Author

ojan commented Aug 20, 2015

the solution will be to add a port to your url, I believe this should work

Works for me. thanks for the workaround

@skynet
Copy link

skynet commented Aug 21, 2015

Same problem here:

Error in plugins: unable to parse 'nginx_active,host=localhost.localdomain,server= value=23i': missing tag value

Same solution:

[nginx]
urls = ["http://localhost:80/nginx_status"]

@sparrc
Copy link
Contributor

sparrc commented Aug 24, 2015

Closing this issue, the fix is in 0.1.6, thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants