config

package
v1.17.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2021 License: AGPL-3.0 Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PMMConfig

type PMMConfig struct {
	ConfigPath           string              `yaml:"config"                 default:""                        desc:"configuration file location"`
	HtpasswdPath         string              `yaml:"htpasswd-path"          default:"/srv/nginx/.htpasswd"    desc:"htpasswd file location"`
	ListenAddress        string              `yaml:"listen-address"         default:"127.0.0.1:7777"          desc:"Address and port to listen on: [ip_address]:port"`
	PathPrefix           string              `yaml:"url-prefix"             default:"/configurator"           desc:"Prefix for the internal routes of web endpoints"`
	SSHKeyPath           string              `yaml:"ssh-key-path"           default:""                        desc:"authorized_keys file location"`
	SSHKeyOwner          string              `yaml:"ssh-key-owner"          default:"admin"                   desc:"Owner of authorized_keys file"`
	GrafanaDBPath        string              `yaml:"grafana-db-path"        default:"/srv/grafana/grafana.db" desc:"grafana database location"`
	PrometheusConfPath   string              `yaml:"prometheus-conf-path"   default:"/etc/prometheus.yml"     desc:"prometheus configuration file location"`
	UpdateDirPath        string              `yaml:"update-dir-path"        default:"/srv/update"             desc:"update directory location"`
	LogFilePath          string              `yaml:"log-file"               default:"/var/log/pmm-manage.log" desc:"log file location"`
	SkipPrometheusReload string              `yaml:"skip-prometheus-reload" default:"false"                   desc:"log file location"`
	Configuration        map[string]string   `yaml:"configuration"          default:""                        desc:""`
	Users                []map[string]string `yaml:"users"                  default:""                        desc:""`
}

PMMConfig implements struct with all configuration params in one place

func ParseConfig

func ParseConfig() (c PMMConfig)

ParseConfig implements function which read command line arguments, configuration file and set default values

func (*PMMConfig) AddUser added in v1.1.4

func (c *PMMConfig) AddUser(newUser map[string]interface{}) error

func (*PMMConfig) DeleteUser added in v1.1.4

func (c *PMMConfig) DeleteUser(username string) error

func (*PMMConfig) Save

func (c *PMMConfig) Save() error

Save dump configuration values to configuration file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL