Skip to content

Commit

Permalink
PMM-13399 add nomad to pmm-agent config.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Oct 20, 2024
1 parent 5e69096 commit 79a2b2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func get(args []string, cfg *Config, l *logrus.Entry) (string, error) { //nolint
&cfg.Paths.PTPGSummary: "tools/pt-pg-summary",
&cfg.Paths.PTMongoDBSummary: "tools/pt-mongodb-summary",
&cfg.Paths.PTMySQLSummary: "tools/pt-mysql-summary",
&cfg.Paths.Nomad: "tools/nomad",
} {
if *sp == "" {
*sp = v
Expand Down Expand Up @@ -396,6 +397,8 @@ func Application(cfg *Config) (*kingpin.Application, *string) {
Envar("PMM_AGENT_PATHS_PT_MONGODB_SUMMARY").StringVar(&cfg.Paths.PTMongoDBSummary)
app.Flag("paths-pt-mysql-summary", "Path to pt my sql summary to use [PMM_AGENT_PATHS_PT_MYSQL_SUMMARY]").
Envar("PMM_AGENT_PATHS_PT_MYSQL_SUMMARY").StringVar(&cfg.Paths.PTMySQLSummary)
app.Flag("paths-nomad", "Path to nomad to use [PMM_AGENT_PATHS_NOMAD]").
Envar("PMM_AGENT_PATHS_NOMAD").StringVar(&cfg.Paths.Nomad)
app.Flag("paths-tempdir", "Temporary directory for exporters [PMM_AGENT_PATHS_TEMPDIR]").
Envar("PMM_AGENT_PATHS_TEMPDIR").StringVar(&cfg.Paths.TempDir)
// no flag for SlowLogFilePrefix - it is only for development and testing
Expand Down
7 changes: 7 additions & 0 deletions agent/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/usr/local/percona/pmm/tools/pt-pg-summary",
PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary",
PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary",
Nomad: "/usr/local/percona/pmm/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down Expand Up @@ -180,6 +181,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/usr/local/percona/pmm/tools/pt-pg-summary",
PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary",
PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary",
Nomad: "/usr/local/percona/pmm/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down Expand Up @@ -239,6 +241,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/usr/local/percona/pmm/tools/pt-pg-summary",
PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary",
PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary",
Nomad: "/usr/local/percona/pmm/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down Expand Up @@ -306,6 +309,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/usr/local/percona/pmm/tools/pt-pg-summary",
PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary",
PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary",
Nomad: "/usr/local/percona/pmm/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down Expand Up @@ -371,6 +375,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/base/tools/pt-pg-summary",
PTMongoDBSummary: "/base/tools/pt-mongodb-summary",
PTMySQLSummary: "/base/tools/pt-mysql-summary",
Nomad: "/base/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down Expand Up @@ -434,6 +439,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/base/tools/pt-pg-summary",
PTMongoDBSummary: "/base/tools/pt-mongodb-summary",
PTMySQLSummary: "/base/tools/pt-mysql-summary",
Nomad: "/base/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down Expand Up @@ -482,6 +488,7 @@ func TestGet(t *testing.T) {
PTPGSummary: "/usr/local/percona/pmm/tools/pt-pg-summary",
PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary",
PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary",
Nomad: "/usr/local/percona/pmm/tools/nomad",
},
WindowConnectedTime: defaultWindowPeriod,
Ports: Ports{
Expand Down

0 comments on commit 79a2b2c

Please sign in to comment.