Skip to content

Commit dde6ba7

Browse files
committed
PMM-14442 Chore minor tweaks and changes
1 parent 15b6ad0 commit dde6ba7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

agent/cmd/pmm-agent-entrypoint/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ It is configured entirely by environment variables. Arguments or flags are not u
4141
The following environment variables are recognized by the Docker entrypoint:
4242
* PMM_AGENT_SETUP - if true, 'pmm-agent setup' is called before 'pmm-agent run'.
4343
* PMM_AGENT_PRERUN_FILE - if non-empty, runs given file with 'pmm-agent run' running in the background.
44-
* PMM_AGENT_PRERUN_SCRIPT - if non-empty, runs given shell script content with 'pmm-agent run' running in the background.
45-
* PMM_AGENT_SIDECAR - if true, 'pmm-agent' will be restarted in case of it's failed.
44+
* PMM_AGENT_PRERUN_SCRIPT - if non-empty, runs given shell script with 'pmm-agent run' running in the background.
45+
* PMM_AGENT_SIDECAR - if true, 'pmm-agent' will be restarted in case it fails.
4646
* PMM_AGENT_SIDECAR_SLEEP - time to wait before restarting pmm-agent if PMM_AGENT_SIDECAR is true. 1 second by default.
4747
48-
Additionally, the many environment variables are recognized by pmm-agent itself.
48+
Additionally, many environment variables are recognized by pmm-agent itself.
4949
The following help text shows them as [PMM_AGENT_XXX].
5050
`
5151

@@ -61,13 +61,13 @@ var (
6161
pmmAgentSetup = kingpin.Flag("pmm-agent-setup",
6262
"if true, 'pmm-agent setup' is called before 'pmm-agent run'").Default("false").Envar("PMM_AGENT_SETUP").Bool()
6363
pmmAgentSidecar = kingpin.Flag("pmm-agent-sidecar",
64-
"if true, 'pmm-agent' will be restarted in case of it's failed").Default("false").Envar("PMM_AGENT_SIDECAR").Bool()
64+
"if true, 'pmm-agent' will be restarted in case it fails").Default("false").Envar("PMM_AGENT_SIDECAR").Bool()
6565
pmmAgentSidecarSleep = kingpin.Flag("pmm-agent-sidecar-sleep",
6666
"time to wait before restarting pmm-agent if PMM_AGENT_SIDECAR is true. 1 second by default").Default("1").Envar("PMM_AGENT_SIDECAR_SLEEP").Int()
6767
pmmAgentPrerunFile = kingpin.Flag("pmm-agent-prerun-file",
6868
"if non-empty, runs given file with 'pmm-agent run' running in the background").Envar("PMM_AGENT_PRERUN_FILE").String()
6969
pmmAgentPrerunScript = kingpin.Flag("pmm-agent-prerun-script",
70-
"if non-empty, runs given shell script content with 'pmm-agent run' running in the background").Envar("PMM_AGENT_PRERUN_SCRIPT").String()
70+
"if non-empty, runs given shell script with 'pmm-agent run' running in the background").Envar("PMM_AGENT_PRERUN_SCRIPT").String()
7171
)
7272

7373
var pmmAgentProcessID = 0

agent/commands/setup.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func register(cfg *config.Config, l *logrus.Entry) {
155155
msg += ".\nPlease check pmm-managed logs."
156156
}
157157

158-
fmt.Printf("Failed to register pmm-agent on PMM Server: %s.\n", msg)
158+
l.Errorf("Failed to register pmm-agent on PMM Server: %s.", msg)
159159
os.Exit(1)
160160
}
161161
cfg.ID = agentID
@@ -165,11 +165,11 @@ func register(cfg *config.Config, l *logrus.Entry) {
165165
} else {
166166
l.Info("PMM Server responded with an empty service token. Consider upgrading PMM Server to the latest version.")
167167
}
168-
fmt.Printf("Registered.\n")
168+
l.Info("Registered.")
169169
}
170170

171171
func reload(l *logrus.Entry) {
172-
fmt.Printf("Reloading pmm-agent configuration...\n")
172+
l.Info("Reloading pmm-agent configuration...")
173173

174174
// sync error handling with Reload API method
175175
err := localReload()

api-tests/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282
mysql:
8383
condition: service_healthy
8484
environment:
85-
PMM_AGENT_SERVER_ADDRESS: pmm-server
85+
PMM_AGENT_SERVER_ADDRESS: pmm-server:8443
8686
PMM_AGENT_SERVER_USERNAME: admin
8787
PMM_AGENT_SERVER_PASSWORD: admin
8888
PMM_AGENT_SERVER_INSECURE_TLS: 1

0 commit comments

Comments
 (0)