Telegraf: Allow HTTPS basic auth in memcached connection strings

Created on 3 Apr 2017  路  4Comments  路  Source: influxdata/telegraf

Feature Request

Allow HTTPS basic auth in memcached connection strings.

Proposal:

I would like the ability to specify a username and password for a memcached instance. (I am attempting to collect statistics from a Heroku Add-On, so I do not have direct access to the machine, only a URL with basic auth).

Current behavior:

When specifying:

[username:[email protected]], I receive: ERROR in input [memcached]: Errors encountered: [dial tcp: lookup username:[email protected]: invalid domain name]

username:[email protected], I receive: ERROR in input [memcached]: Errors encountered: [dial tcp: lookup username on 172.16.0.23:53: no such host]

Desired behavior:

Setting username:password@host:port should resolve the host correctly and pass the username and password to the service for authentication.

Use case:

Gathering statistics from a remove memecached server fails if it is not open to all connections. I am attempting to get statistics from a remote memcached server that is available on the public internet, so open authentication is not an option.

Note:

I will gladly submit a PR for this (though it would be my first in Go, just a heads up!), but wanted to validate that it was in fact an issue (and not just me missing a configuration setting) before spending the time to do it.

feature request help wanted

All 4 comments

@sparrc @mgresser @jackzampolin I am tagging you 3 here because I have seen you all have made contributions to the memcached input file. Hoping one of you can give a bit of direction (either a setting I'm missing or a go ahead that this is not yet supported functionality and a PR will be necessary).

Thanks!

Can you provide a link to some documentation for this authentication method?

@danielnelson certainly!

I may have been slightly mistaken; it appears that it does not support Basic Authentication in the same way as traditional HTTP servers, but it does support SASL.

https://github.com/memcached/memcached/wiki/SASLAuthProtocol
https://github.com/memcached/memcached/wiki/SASLHowto

This would be a nice feature to have, it sounds like we would need to switch over to the binary protocol or perhaps support both. We should just have a username/password options for configuration.

Was this page helpful?
0 / 5 - 0 ratings