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

[FEAT] Allow for configuration of tailscaled service #214

Open
nlamirault opened this issue Jun 8, 2022 · 5 comments
Open

[FEAT] Allow for configuration of tailscaled service #214

nlamirault opened this issue Jun 8, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@nlamirault
Copy link

Is your feature request related to a problem? Please describe.
I would like to enable Prometheus metrics for the tailscaled server.

$ tailscaled --help
Usage of tailscaled:
  -bird-socket string
    	path of the bird unix socket
  -cleanup
    	clean up system state and exit
  -debug string
    	listen address ([ip]:port) of optional debug server
  -outbound-http-proxy-listen string
    	optional [ip]:port to run an outbound HTTP proxy (e.g. "localhost:8080")
  -port value
    	UDP port to listen on for WireGuard and peer-to-peer traffic; 0 means automatically select (default 0)
  -socket string
    	path of the service unix socket (default "/var/run/tailscale/tailscaled.sock")
  -socks5-server string
    	optional [ip]:port to run a SOCK5 server (e.g. "localhost:1080")
  -state string
    	absolute path of state file; use 'kube:<secret-name>' to use Kubernetes secrets or 'arn:aws:ssm:...' to store in AWS SSM; use 'mem:' to not store state and register as an emphemeral node. If empty and --statedir is provided, the default is <statedir>/tailscaled.state. Default: /home/pi/.local/share/tailscale/tailscaled.state
  -statedir string
    	path to directory for storage of config state, TLS certs, temporary incoming Taildrop files, etc. If empty, it's derived from --state when possible.
  -tun string
    	tunnel interface name; use "userspace-networking" (beta) to not use TUN (default "tailscale0")
  -verbose int
    	log verbosity level; 0 is default, 1 or higher are increasingly verbose
  -version
    	print version information and exit

Describe the solution you'd like
A variable which can add arguments to the Tailscaled service.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@nlamirault nlamirault added the enhancement New feature or request label Jun 8, 2022
@artis3n
Copy link
Owner

artis3n commented Jun 9, 2022

I definitely see that allowing configuration of the tailscaled service in this role would be a great new feature. Can you elaborate how Prometheus metrics enters the mix?

@artis3n artis3n changed the title [FEAT] Enable Prometheus metrics [FEAT] Allow for configuration of tailscaled service Dec 16, 2022
@McSim85
Copy link
Contributor

McSim85 commented Dec 12, 2023

I definitely see that allowing configuration of the tailscaled service in this role would be a great new feature. Can you elaborate how Prometheus metrics enters the mix?

I think, @nlamirault meant this parameter:

--debug=localhost:8080, to run a debug HTTP server serving paths such as /debug/pprof, /debug/metrics, /debug/ipn, /debug/magicsock, etc. The exact details of what’s accessible over the debug server is subject to change over time.

(c) https://tailscale.com/kb/1278/tailscaled/#flags-to-tailscaled

@artis3n
Copy link
Owner

artis3n commented Dec 13, 2023

Ah! That makes a lot of sense. It looks like we can run a lineinfile module against /etc/default/tailscaled looking for FLAGS= and include any flags an end user defines. Is that comma-separated, do you know?

@McSim85
Copy link
Contributor

McSim85 commented Dec 14, 2023

Ah! That makes a lot of sense. It looks like we can run a lineinfile module against /etc/default/tailscaled looking for FLAGS= and include any flags an end user defines. Is that comma-separated, do you know?

Yep, it's the best way for Linux, I think.
It seems like /etc/default/tailscaled works for both openrc and sytemd.

@artis3n
Copy link
Owner

artis3n commented Dec 14, 2023

My assumption is the FLAGS string is a space-delineated set of the -- flags marked in https://tailscale.com/kb/1278/tailscaled#flags-to-tailscaled. Will play with this in a few days and get a PR up

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

No branches or pull requests

3 participants