Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions x-pack/elastic-agent/pkg/agent/application/paths/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ const defaultAgentFleetFile = "fleet.yml"
// defaultAgentEnrollFile is a name of file used to enroll agent on first-start
const defaultAgentEnrollFile = "enroll.yml"

// defaultAgentActionStoreFile is the file that will contains the action that can be replayed after restart.
// defaultAgentActionStoreFile is the file that will contain the action that can be replayed after restart.
const defaultAgentActionStoreFile = "action_store.yml"

// defaultAgentStateStoreFile is the file that will contains the action that can be replayed after restart.
// defaultAgentStateStoreFile is the file that will contain the action that can be replayed after restart.
const defaultAgentStateStoreFile = "state.yml"

// AgentConfigFile is a name of file used to store agent information
Expand Down
4 changes: 2 additions & 2 deletions x-pack/elastic-agent/pkg/agent/storage/store/state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"io"
"sync"

yaml "gopkg.in/yaml.v2"
"gopkg.in/yaml.v2"

"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/errors"
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/storage"
Expand Down Expand Up @@ -46,7 +46,7 @@ type action = fleetapi.Action
// receives multiples actions to persist to disk, the implementation of the store only
// take care of action policy change every other action are discarded. The store will only keep the
// last good action on disk, we assume that the action is added to the store after it was ACK with
// Fleet. The store is not threadsafe.
// Fleet. The store is not thread safe.
type StateStore struct {
log *logger.Logger
store storeLoad
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
const httpPlusPrefix = "http+"
const defaultMonitoringNamespace = "default"

// Monitor is a monitoring interface providing information about the way
// how beat is monitored
// Monitor implements the monitoring.Monitor interface providing information
// about beats.
type Monitor struct {
operatingSystem string
config *monitoringConfig.MonitoringConfig
Expand Down Expand Up @@ -209,7 +209,7 @@ func (b *Monitor) Prepare(spec program.Spec, pipelineID string, uid, gid int) er
}

// LogPath describes a path where application stores logs. Empty if
// application is not monitorable
// application is not monitorable.
func (b *Monitor) LogPath(spec program.Spec, pipelineID string) string {
if !b.WatchLogs() {
return ""
Expand Down
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/core/monitoring/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Monitor interface {
Close()
}

// NewMonitor creates a monitor based on a process configuration.
// NewMonitor creates beats a monitor based on a process configuration.
func NewMonitor(cfg *configuration.SettingsConfig) (Monitor, error) {
logMetrics := true
if cfg.LoggingConfig != nil {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/core/plugin/process/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (a *Application) start(ctx context.Context, t app.Taggable, cfg map[string]
}()

// starting only if it's not running
// or if it is, then only in case it's restart and this call initiates from restart call
// or if it is, then only in case it's a restart and this call initiates from restart call
if a.Started() && a.state.Status != state.Restarting {
if a.state.ProcessInfo == nil {
// already started if not stopped or crashed
Expand Down
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/core/plugin/service/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (a *Application) Shutdown() {

// OnStatusChange is the handler called by the GRPC server code.
//
// It updates the status of the application and handles restarting the application is needed.
// It updates the status of the application and handles restarting the application when needed.
func (a *Application) OnStatusChange(s *server.ApplicationState, status proto.StateObserved_Status, msg string, payload map[string]interface{}) {
a.appLock.Lock()
defer a.appLock.Unlock()
Expand Down