nginx plugin missing server value
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 ?
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"]
nevermind, the issue is due to not catching an error from net.SplitHostPort, I'll have a PR up soon
@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"]
the solution will be to add a port to your url, I believe this should work
Works for me. thanks for the workaround
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"]
Closing this issue, the fix is in 0.1.6, thanks for the report!